google-apis-travelimpactmodel_v1 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/google/apis/travelimpactmodel_v1/classes.rb +174 -4
- data/lib/google/apis/travelimpactmodel_v1/gem_version.rb +3 -3
- data/lib/google/apis/travelimpactmodel_v1/representations.rb +82 -0
- data/lib/google/apis/travelimpactmodel_v1/service.rb +42 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ccf3adb344fc1a1c6f498a25e772165629195bed89b56210434efc53b9dd9e5
|
4
|
+
data.tar.gz: 4797489a766e917e19712d7ad68ee7ce3dc9d886aa22997027f939e2fd38ed33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e90bc66d93d93fbc0e69477301c6430d4fc2170c78136765f39b2687153143fc72dbc4fa28fdeff8a2cf0dc559f4280d8daf318a7952a351bed61050e208ed0c
|
7
|
+
data.tar.gz: 45890ab3bb8a3b5ac028a926c5b8f583fb0a64a278b72d6ca25808ba955186a57ec8795c03c4ac4468b1557099a8d1bee9cf556eb146bbc4ac9f7d1aed33a85a
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Release history for google-apis-travelimpactmodel_v1
|
2
2
|
|
3
|
+
### v0.9.0 (2025-06-29)
|
4
|
+
|
5
|
+
* Regenerated from discovery document revision 20250624
|
6
|
+
|
7
|
+
### v0.8.0 (2025-06-08)
|
8
|
+
|
9
|
+
* Regenerated from discovery document revision 20250605
|
10
|
+
* Regenerated using generator version 0.18.0
|
11
|
+
|
3
12
|
### v0.7.0 (2025-05-04)
|
4
13
|
|
5
14
|
* Regenerated using generator version 0.17.0
|
@@ -51,7 +51,7 @@ module Google
|
|
51
51
|
attr_accessor :flight_emissions
|
52
52
|
|
53
53
|
# Travel Impact Model version. For more information about the model versioning
|
54
|
-
# see https://github.com/google/travel-impact-model/#versioning.
|
54
|
+
# see [GitHub](https://github.com/google/travel-impact-model/#versioning).
|
55
55
|
# Corresponds to the JSON property `modelVersion`
|
56
56
|
# @return [Google::Apis::TravelimpactmodelV1::ModelVersion]
|
57
57
|
attr_accessor :model_version
|
@@ -67,6 +67,52 @@ module Google
|
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
|
+
# A list of pair of airports (markets) to request the typical emissions for.
|
71
|
+
class ComputeTypicalFlightEmissionsRequest
|
72
|
+
include Google::Apis::Core::Hashable
|
73
|
+
|
74
|
+
# Required. Request the typical flight emissions estimates for this market pair.
|
75
|
+
# A maximum of 1000 markets can be requested.
|
76
|
+
# Corresponds to the JSON property `markets`
|
77
|
+
# @return [Array<Google::Apis::TravelimpactmodelV1::Market>]
|
78
|
+
attr_accessor :markets
|
79
|
+
|
80
|
+
def initialize(**args)
|
81
|
+
update!(**args)
|
82
|
+
end
|
83
|
+
|
84
|
+
# Update properties of this object
|
85
|
+
def update!(**args)
|
86
|
+
@markets = args[:markets] if args.key?(:markets)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
# The response includes the emissions but also the model version.
|
91
|
+
class ComputeTypicalFlightEmissionsResponse
|
92
|
+
include Google::Apis::Core::Hashable
|
93
|
+
|
94
|
+
# Travel Impact Model version. For more information about the model versioning
|
95
|
+
# see [GitHub](https://github.com/google/travel-impact-model/#versioning).
|
96
|
+
# Corresponds to the JSON property `modelVersion`
|
97
|
+
# @return [Google::Apis::TravelimpactmodelV1::ModelVersion]
|
98
|
+
attr_accessor :model_version
|
99
|
+
|
100
|
+
# Market's Typical Flight Emissions requested.
|
101
|
+
# Corresponds to the JSON property `typicalFlightEmissions`
|
102
|
+
# @return [Array<Google::Apis::TravelimpactmodelV1::TypicalFlightEmissions>]
|
103
|
+
attr_accessor :typical_flight_emissions
|
104
|
+
|
105
|
+
def initialize(**args)
|
106
|
+
update!(**args)
|
107
|
+
end
|
108
|
+
|
109
|
+
# Update properties of this object
|
110
|
+
def update!(**args)
|
111
|
+
@model_version = args[:model_version] if args.key?(:model_version)
|
112
|
+
@typical_flight_emissions = args[:typical_flight_emissions] if args.key?(:typical_flight_emissions)
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
70
116
|
# Represents a whole or partial calendar date, such as a birthday. The time of
|
71
117
|
# day and time zone are either specified elsewhere or are insignificant. The
|
72
118
|
# date is relative to the Gregorian Calendar. This can represent one of the
|
@@ -108,6 +154,61 @@ module Google
|
|
108
154
|
end
|
109
155
|
end
|
110
156
|
|
157
|
+
# Metadata about the EASA Flight Emissions Label.
|
158
|
+
class EasaLabelMetadata
|
159
|
+
include Google::Apis::Core::Hashable
|
160
|
+
|
161
|
+
# Represents a whole or partial calendar date, such as a birthday. The time of
|
162
|
+
# day and time zone are either specified elsewhere or are insignificant. The
|
163
|
+
# date is relative to the Gregorian Calendar. This can represent one of the
|
164
|
+
# following: * A full date, with non-zero year, month, and day values. * A month
|
165
|
+
# and day, with a zero year (for example, an anniversary). * A year on its own,
|
166
|
+
# with a zero month and a zero day. * A year and month, with a zero day (for
|
167
|
+
# example, a credit card expiration date). Related types: * google.type.
|
168
|
+
# TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
|
169
|
+
# Corresponds to the JSON property `labelExpiryDate`
|
170
|
+
# @return [Google::Apis::TravelimpactmodelV1::Date]
|
171
|
+
attr_accessor :label_expiry_date
|
172
|
+
|
173
|
+
# Represents a whole or partial calendar date, such as a birthday. The time of
|
174
|
+
# day and time zone are either specified elsewhere or are insignificant. The
|
175
|
+
# date is relative to the Gregorian Calendar. This can represent one of the
|
176
|
+
# following: * A full date, with non-zero year, month, and day values. * A month
|
177
|
+
# and day, with a zero year (for example, an anniversary). * A year on its own,
|
178
|
+
# with a zero month and a zero day. * A year and month, with a zero day (for
|
179
|
+
# example, a credit card expiration date). Related types: * google.type.
|
180
|
+
# TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
|
181
|
+
# Corresponds to the JSON property `labelIssueDate`
|
182
|
+
# @return [Google::Apis::TravelimpactmodelV1::Date]
|
183
|
+
attr_accessor :label_issue_date
|
184
|
+
|
185
|
+
# Version of the label.
|
186
|
+
# Corresponds to the JSON property `labelVersion`
|
187
|
+
# @return [String]
|
188
|
+
attr_accessor :label_version
|
189
|
+
|
190
|
+
# Sustainable Aviation Fuel (SAF) emissions discount percentage applied to the
|
191
|
+
# label. It is a percentage as a decimal. The values are in the interval [0,1].
|
192
|
+
# For example, 0.0021 means 0.21%. This discount and reduction in emissions are
|
193
|
+
# reported by the EASA label but they are not included in the CO2e estimates
|
194
|
+
# distributed by this API.
|
195
|
+
# Corresponds to the JSON property `safDiscountPercentage`
|
196
|
+
# @return [Float]
|
197
|
+
attr_accessor :saf_discount_percentage
|
198
|
+
|
199
|
+
def initialize(**args)
|
200
|
+
update!(**args)
|
201
|
+
end
|
202
|
+
|
203
|
+
# Update properties of this object
|
204
|
+
def update!(**args)
|
205
|
+
@label_expiry_date = args[:label_expiry_date] if args.key?(:label_expiry_date)
|
206
|
+
@label_issue_date = args[:label_issue_date] if args.key?(:label_issue_date)
|
207
|
+
@label_version = args[:label_version] if args.key?(:label_version)
|
208
|
+
@saf_discount_percentage = args[:saf_discount_percentage] if args.key?(:saf_discount_percentage)
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
111
212
|
# Grouped emissions per seating class results.
|
112
213
|
class EmissionsGramsPerPax
|
113
214
|
include Google::Apis::Core::Hashable
|
@@ -208,6 +309,17 @@ module Google
|
|
208
309
|
class FlightWithEmissions
|
209
310
|
include Google::Apis::Core::Hashable
|
210
311
|
|
312
|
+
# Optional. The significance of contrails warming impact compared to the total
|
313
|
+
# CO2e emissions impact.
|
314
|
+
# Corresponds to the JSON property `contrailsImpactBucket`
|
315
|
+
# @return [String]
|
316
|
+
attr_accessor :contrails_impact_bucket
|
317
|
+
|
318
|
+
# Metadata about the EASA Flight Emissions Label.
|
319
|
+
# Corresponds to the JSON property `easaLabelMetadata`
|
320
|
+
# @return [Google::Apis::TravelimpactmodelV1::EasaLabelMetadata]
|
321
|
+
attr_accessor :easa_label_metadata
|
322
|
+
|
211
323
|
# Grouped emissions per seating class results.
|
212
324
|
# Corresponds to the JSON property `emissionsGramsPerPax`
|
213
325
|
# @return [Google::Apis::TravelimpactmodelV1::EmissionsGramsPerPax]
|
@@ -219,19 +331,52 @@ module Google
|
|
219
331
|
# @return [Google::Apis::TravelimpactmodelV1::Flight]
|
220
332
|
attr_accessor :flight
|
221
333
|
|
334
|
+
# Optional. The source of the emissions data.
|
335
|
+
# Corresponds to the JSON property `source`
|
336
|
+
# @return [String]
|
337
|
+
attr_accessor :source
|
338
|
+
|
222
339
|
def initialize(**args)
|
223
340
|
update!(**args)
|
224
341
|
end
|
225
342
|
|
226
343
|
# Update properties of this object
|
227
344
|
def update!(**args)
|
345
|
+
@contrails_impact_bucket = args[:contrails_impact_bucket] if args.key?(:contrails_impact_bucket)
|
346
|
+
@easa_label_metadata = args[:easa_label_metadata] if args.key?(:easa_label_metadata)
|
228
347
|
@emissions_grams_per_pax = args[:emissions_grams_per_pax] if args.key?(:emissions_grams_per_pax)
|
229
348
|
@flight = args[:flight] if args.key?(:flight)
|
349
|
+
@source = args[:source] if args.key?(:source)
|
350
|
+
end
|
351
|
+
end
|
352
|
+
|
353
|
+
# A pair of airports.
|
354
|
+
class Market
|
355
|
+
include Google::Apis::Core::Hashable
|
356
|
+
|
357
|
+
# Required. IATA airport code for flight destination, e.g. "JFK".
|
358
|
+
# Corresponds to the JSON property `destination`
|
359
|
+
# @return [String]
|
360
|
+
attr_accessor :destination
|
361
|
+
|
362
|
+
# Required. IATA airport code for flight origin, e.g. "LHR".
|
363
|
+
# Corresponds to the JSON property `origin`
|
364
|
+
# @return [String]
|
365
|
+
attr_accessor :origin
|
366
|
+
|
367
|
+
def initialize(**args)
|
368
|
+
update!(**args)
|
369
|
+
end
|
370
|
+
|
371
|
+
# Update properties of this object
|
372
|
+
def update!(**args)
|
373
|
+
@destination = args[:destination] if args.key?(:destination)
|
374
|
+
@origin = args[:origin] if args.key?(:origin)
|
230
375
|
end
|
231
376
|
end
|
232
377
|
|
233
378
|
# Travel Impact Model version. For more information about the model versioning
|
234
|
-
# see https://github.com/google/travel-impact-model/#versioning.
|
379
|
+
# see [GitHub](https://github.com/google/travel-impact-model/#versioning).
|
235
380
|
class ModelVersion
|
236
381
|
include Google::Apis::Core::Hashable
|
237
382
|
|
@@ -244,8 +389,8 @@ module Google
|
|
244
389
|
# Major versions: Major changes to methodology (e.g. adding new data sources to
|
245
390
|
# the model that lead to major output changes). Such changes will be infrequent
|
246
391
|
# and announced well in advance. Might involve API version changes, which will
|
247
|
-
# respect
|
248
|
-
# versioning-an-api#backwards-incompatible
|
392
|
+
# respect [Google Cloud API guidelines](https://cloud.google.com/endpoints/docs/
|
393
|
+
# openapi/versioning-an-api#backwards-incompatible)
|
249
394
|
# Corresponds to the JSON property `major`
|
250
395
|
# @return [Fixnum]
|
251
396
|
attr_accessor :major
|
@@ -274,6 +419,31 @@ module Google
|
|
274
419
|
@patch = args[:patch] if args.key?(:patch)
|
275
420
|
end
|
276
421
|
end
|
422
|
+
|
423
|
+
# Typical flight emission estimates for a certain market
|
424
|
+
class TypicalFlightEmissions
|
425
|
+
include Google::Apis::Core::Hashable
|
426
|
+
|
427
|
+
# Grouped emissions per seating class results.
|
428
|
+
# Corresponds to the JSON property `emissionsGramsPerPax`
|
429
|
+
# @return [Google::Apis::TravelimpactmodelV1::EmissionsGramsPerPax]
|
430
|
+
attr_accessor :emissions_grams_per_pax
|
431
|
+
|
432
|
+
# A pair of airports.
|
433
|
+
# Corresponds to the JSON property `market`
|
434
|
+
# @return [Google::Apis::TravelimpactmodelV1::Market]
|
435
|
+
attr_accessor :market
|
436
|
+
|
437
|
+
def initialize(**args)
|
438
|
+
update!(**args)
|
439
|
+
end
|
440
|
+
|
441
|
+
# Update properties of this object
|
442
|
+
def update!(**args)
|
443
|
+
@emissions_grams_per_pax = args[:emissions_grams_per_pax] if args.key?(:emissions_grams_per_pax)
|
444
|
+
@market = args[:market] if args.key?(:market)
|
445
|
+
end
|
446
|
+
end
|
277
447
|
end
|
278
448
|
end
|
279
449
|
end
|
@@ -16,13 +16,13 @@ module Google
|
|
16
16
|
module Apis
|
17
17
|
module TravelimpactmodelV1
|
18
18
|
# Version of the google-apis-travelimpactmodel_v1 gem
|
19
|
-
GEM_VERSION = "0.
|
19
|
+
GEM_VERSION = "0.9.0"
|
20
20
|
|
21
21
|
# Version of the code generator used to generate this client
|
22
|
-
GENERATOR_VERSION = "0.
|
22
|
+
GENERATOR_VERSION = "0.18.0"
|
23
23
|
|
24
24
|
# Revision of the discovery document this client was generated from
|
25
|
-
REVISION = "
|
25
|
+
REVISION = "20250624"
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -34,12 +34,30 @@ module Google
|
|
34
34
|
include Google::Apis::Core::JsonObjectSupport
|
35
35
|
end
|
36
36
|
|
37
|
+
class ComputeTypicalFlightEmissionsRequest
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
41
|
+
end
|
42
|
+
|
43
|
+
class ComputeTypicalFlightEmissionsResponse
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
|
+
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
47
|
+
end
|
48
|
+
|
37
49
|
class Date
|
38
50
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
51
|
|
40
52
|
include Google::Apis::Core::JsonObjectSupport
|
41
53
|
end
|
42
54
|
|
55
|
+
class EasaLabelMetadata
|
56
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
57
|
+
|
58
|
+
include Google::Apis::Core::JsonObjectSupport
|
59
|
+
end
|
60
|
+
|
43
61
|
class EmissionsGramsPerPax
|
44
62
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
63
|
|
@@ -58,12 +76,24 @@ module Google
|
|
58
76
|
include Google::Apis::Core::JsonObjectSupport
|
59
77
|
end
|
60
78
|
|
79
|
+
class Market
|
80
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
81
|
+
|
82
|
+
include Google::Apis::Core::JsonObjectSupport
|
83
|
+
end
|
84
|
+
|
61
85
|
class ModelVersion
|
62
86
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
87
|
|
64
88
|
include Google::Apis::Core::JsonObjectSupport
|
65
89
|
end
|
66
90
|
|
91
|
+
class TypicalFlightEmissions
|
92
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
93
|
+
|
94
|
+
include Google::Apis::Core::JsonObjectSupport
|
95
|
+
end
|
96
|
+
|
67
97
|
class ComputeFlightEmissionsRequest
|
68
98
|
# @private
|
69
99
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -82,6 +112,24 @@ module Google
|
|
82
112
|
end
|
83
113
|
end
|
84
114
|
|
115
|
+
class ComputeTypicalFlightEmissionsRequest
|
116
|
+
# @private
|
117
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
118
|
+
collection :markets, as: 'markets', class: Google::Apis::TravelimpactmodelV1::Market, decorator: Google::Apis::TravelimpactmodelV1::Market::Representation
|
119
|
+
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
class ComputeTypicalFlightEmissionsResponse
|
124
|
+
# @private
|
125
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
126
|
+
property :model_version, as: 'modelVersion', class: Google::Apis::TravelimpactmodelV1::ModelVersion, decorator: Google::Apis::TravelimpactmodelV1::ModelVersion::Representation
|
127
|
+
|
128
|
+
collection :typical_flight_emissions, as: 'typicalFlightEmissions', class: Google::Apis::TravelimpactmodelV1::TypicalFlightEmissions, decorator: Google::Apis::TravelimpactmodelV1::TypicalFlightEmissions::Representation
|
129
|
+
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
85
133
|
class Date
|
86
134
|
# @private
|
87
135
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -91,6 +139,18 @@ module Google
|
|
91
139
|
end
|
92
140
|
end
|
93
141
|
|
142
|
+
class EasaLabelMetadata
|
143
|
+
# @private
|
144
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
145
|
+
property :label_expiry_date, as: 'labelExpiryDate', class: Google::Apis::TravelimpactmodelV1::Date, decorator: Google::Apis::TravelimpactmodelV1::Date::Representation
|
146
|
+
|
147
|
+
property :label_issue_date, as: 'labelIssueDate', class: Google::Apis::TravelimpactmodelV1::Date, decorator: Google::Apis::TravelimpactmodelV1::Date::Representation
|
148
|
+
|
149
|
+
property :label_version, as: 'labelVersion'
|
150
|
+
property :saf_discount_percentage, as: 'safDiscountPercentage'
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
94
154
|
class EmissionsGramsPerPax
|
95
155
|
# @private
|
96
156
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -116,10 +176,22 @@ module Google
|
|
116
176
|
class FlightWithEmissions
|
117
177
|
# @private
|
118
178
|
class Representation < Google::Apis::Core::JsonRepresentation
|
179
|
+
property :contrails_impact_bucket, as: 'contrailsImpactBucket'
|
180
|
+
property :easa_label_metadata, as: 'easaLabelMetadata', class: Google::Apis::TravelimpactmodelV1::EasaLabelMetadata, decorator: Google::Apis::TravelimpactmodelV1::EasaLabelMetadata::Representation
|
181
|
+
|
119
182
|
property :emissions_grams_per_pax, as: 'emissionsGramsPerPax', class: Google::Apis::TravelimpactmodelV1::EmissionsGramsPerPax, decorator: Google::Apis::TravelimpactmodelV1::EmissionsGramsPerPax::Representation
|
120
183
|
|
121
184
|
property :flight, as: 'flight', class: Google::Apis::TravelimpactmodelV1::Flight, decorator: Google::Apis::TravelimpactmodelV1::Flight::Representation
|
122
185
|
|
186
|
+
property :source, as: 'source'
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
class Market
|
191
|
+
# @private
|
192
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
193
|
+
property :destination, as: 'destination'
|
194
|
+
property :origin, as: 'origin'
|
123
195
|
end
|
124
196
|
end
|
125
197
|
|
@@ -132,6 +204,16 @@ module Google
|
|
132
204
|
property :patch, as: 'patch'
|
133
205
|
end
|
134
206
|
end
|
207
|
+
|
208
|
+
class TypicalFlightEmissions
|
209
|
+
# @private
|
210
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
211
|
+
property :emissions_grams_per_pax, as: 'emissionsGramsPerPax', class: Google::Apis::TravelimpactmodelV1::EmissionsGramsPerPax, decorator: Google::Apis::TravelimpactmodelV1::EmissionsGramsPerPax::Representation
|
212
|
+
|
213
|
+
property :market, as: 'market', class: Google::Apis::TravelimpactmodelV1::Market, decorator: Google::Apis::TravelimpactmodelV1::Market::Representation
|
214
|
+
|
215
|
+
end
|
216
|
+
end
|
135
217
|
end
|
136
218
|
end
|
137
219
|
end
|
@@ -52,11 +52,11 @@ module Google
|
|
52
52
|
end
|
53
53
|
|
54
54
|
# Stateless method to retrieve emission estimates. Details on how emission
|
55
|
-
# estimates are computed
|
56
|
-
# response will contain all entries that match the input flight legs,
|
57
|
-
# same order. If there are no estimates available for a certain flight
|
58
|
-
# response will return the flight leg object with empty emission fields.
|
59
|
-
# request will still be considered successful. Reasons for missing emission
|
55
|
+
# estimates are computed are in [GitHub](https://github.com/google/travel-impact-
|
56
|
+
# model) The response will contain all entries that match the input flight legs,
|
57
|
+
# in the same order. If there are no estimates available for a certain flight
|
58
|
+
# leg, the response will return the flight leg object with empty emission fields.
|
59
|
+
# The request will still be considered successful. Reasons for missing emission
|
60
60
|
# estimates include: * The flight is unknown to the server. * The input flight
|
61
61
|
# leg is missing one or more identifiers. * The flight date is in the past. *
|
62
62
|
# The aircraft type is not supported by the model. * Missing seat configuration.
|
@@ -90,6 +90,43 @@ module Google
|
|
90
90
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
91
91
|
execute_or_queue_command(command, &block)
|
92
92
|
end
|
93
|
+
|
94
|
+
# Retrieves typical flight emissions estimates between two airports, also known
|
95
|
+
# as a market. If there are no estimates available for a certain market, the
|
96
|
+
# response will return the market object with empty emission fields. The request
|
97
|
+
# will still be considered successful. Details on how the typical emissions
|
98
|
+
# estimates are computed are on [GitHub](https://github.com/google/travel-impact-
|
99
|
+
# model/blob/main/projects/typical_flight_emissions.md). The request can contain
|
100
|
+
# up to 1000 markets. If the request has more than 1000 markets, it will fail
|
101
|
+
# with an INVALID_ARGUMENT error.
|
102
|
+
# @param [Google::Apis::TravelimpactmodelV1::ComputeTypicalFlightEmissionsRequest] compute_typical_flight_emissions_request_object
|
103
|
+
# @param [String] fields
|
104
|
+
# Selector specifying which fields to include in a partial response.
|
105
|
+
# @param [String] quota_user
|
106
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
107
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
108
|
+
# @param [Google::Apis::RequestOptions] options
|
109
|
+
# Request-specific options
|
110
|
+
#
|
111
|
+
# @yield [result, err] Result & error if block supplied
|
112
|
+
# @yieldparam result [Google::Apis::TravelimpactmodelV1::ComputeTypicalFlightEmissionsResponse] parsed result object
|
113
|
+
# @yieldparam err [StandardError] error object if request failed
|
114
|
+
#
|
115
|
+
# @return [Google::Apis::TravelimpactmodelV1::ComputeTypicalFlightEmissionsResponse]
|
116
|
+
#
|
117
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
118
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
119
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
120
|
+
def compute_typical_flight_emissions(compute_typical_flight_emissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
121
|
+
command = make_simple_command(:post, 'v1/flights:computeTypicalFlightEmissions', options)
|
122
|
+
command.request_representation = Google::Apis::TravelimpactmodelV1::ComputeTypicalFlightEmissionsRequest::Representation
|
123
|
+
command.request_object = compute_typical_flight_emissions_request_object
|
124
|
+
command.response_representation = Google::Apis::TravelimpactmodelV1::ComputeTypicalFlightEmissionsResponse::Representation
|
125
|
+
command.response_class = Google::Apis::TravelimpactmodelV1::ComputeTypicalFlightEmissionsResponse
|
126
|
+
command.query['fields'] = fields unless fields.nil?
|
127
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
128
|
+
execute_or_queue_command(command, &block)
|
129
|
+
end
|
93
130
|
|
94
131
|
protected
|
95
132
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-apis-travelimpactmodel_v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
@@ -57,7 +57,7 @@ licenses:
|
|
57
57
|
metadata:
|
58
58
|
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
59
59
|
changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-travelimpactmodel_v1/CHANGELOG.md
|
60
|
-
documentation_uri: https://googleapis.dev/ruby/google-apis-travelimpactmodel_v1/v0.
|
60
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-travelimpactmodel_v1/v0.9.0
|
61
61
|
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-travelimpactmodel_v1
|
62
62
|
rdoc_options: []
|
63
63
|
require_paths:
|
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0'
|
75
75
|
requirements: []
|
76
|
-
rubygems_version: 3.6.
|
76
|
+
rubygems_version: 3.6.9
|
77
77
|
specification_version: 4
|
78
78
|
summary: Simple REST client for Travel Impact Model API V1
|
79
79
|
test_files: []
|