google-apis-travelimpactmodel_v1 0.8.0 → 0.10.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 +8 -0
- data/lib/google/apis/travelimpactmodel_v1/classes.rb +257 -0
- data/lib/google/apis/travelimpactmodel_v1/gem_version.rb +2 -2
- data/lib/google/apis/travelimpactmodel_v1/representations.rb +92 -0
- data/lib/google/apis/travelimpactmodel_v1/service.rb +65 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82f49f15572a2deec549d904bd480650bc3166f2d546089d2e1fcd7da47a7c1f
|
4
|
+
data.tar.gz: 85e3761e52709d5e06ba59c643580c53663f21e14c0fc9b34908bb7086e07a7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbfba6ccdfe5099732c62cceff5f17ee94559046e45b1c01c300f65b7cab53ee741e8efddf60a94d01e19081a7903f2d650965bb45771b40a733f8eb7d286e1f
|
7
|
+
data.tar.gz: 4a183e4533d5cbe808c4181eaa84b10df43e9d92eaadee39766712e6bd89e6d1aab8566f07879f9ccf74e7137896d0561759ab3458ab7943a8986d0ff0128877
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Release history for google-apis-travelimpactmodel_v1
|
2
2
|
|
3
|
+
### v0.10.0 (2025-10-12)
|
4
|
+
|
5
|
+
* Regenerated from discovery document revision 20251008
|
6
|
+
|
7
|
+
### v0.9.0 (2025-06-29)
|
8
|
+
|
9
|
+
* Regenerated from discovery document revision 20250624
|
10
|
+
|
3
11
|
### v0.8.0 (2025-06-08)
|
4
12
|
|
5
13
|
* Regenerated from discovery document revision 20250605
|
@@ -67,6 +67,58 @@ module Google
|
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
|
+
# A list of flight segments to request the Scope 3 emissions for.
|
71
|
+
class ComputeScope3FlightEmissionsRequest
|
72
|
+
include Google::Apis::Core::Hashable
|
73
|
+
|
74
|
+
# Required. Flights to return emission estimates for.
|
75
|
+
# Corresponds to the JSON property `flights`
|
76
|
+
# @return [Array<Google::Apis::TravelimpactmodelV1::Scope3FlightSegment>]
|
77
|
+
attr_accessor :flights
|
78
|
+
|
79
|
+
# Travel Impact Model version. For more information about the model versioning
|
80
|
+
# see [GitHub](https://github.com/google/travel-impact-model/#versioning).
|
81
|
+
# Corresponds to the JSON property `modelVersion`
|
82
|
+
# @return [Google::Apis::TravelimpactmodelV1::ModelVersion]
|
83
|
+
attr_accessor :model_version
|
84
|
+
|
85
|
+
def initialize(**args)
|
86
|
+
update!(**args)
|
87
|
+
end
|
88
|
+
|
89
|
+
# Update properties of this object
|
90
|
+
def update!(**args)
|
91
|
+
@flights = args[:flights] if args.key?(:flights)
|
92
|
+
@model_version = args[:model_version] if args.key?(:model_version)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
# A list of flights with Scope 3 emission estimates.
|
97
|
+
class ComputeScope3FlightEmissionsResponse
|
98
|
+
include Google::Apis::Core::Hashable
|
99
|
+
|
100
|
+
# List of flight segments with emission estimates.
|
101
|
+
# Corresponds to the JSON property `flightEmissions`
|
102
|
+
# @return [Array<Google::Apis::TravelimpactmodelV1::Scope3FlightEmissions>]
|
103
|
+
attr_accessor :flight_emissions
|
104
|
+
|
105
|
+
# Travel Impact Model version. For more information about the model versioning
|
106
|
+
# see [GitHub](https://github.com/google/travel-impact-model/#versioning).
|
107
|
+
# Corresponds to the JSON property `modelVersion`
|
108
|
+
# @return [Google::Apis::TravelimpactmodelV1::ModelVersion]
|
109
|
+
attr_accessor :model_version
|
110
|
+
|
111
|
+
def initialize(**args)
|
112
|
+
update!(**args)
|
113
|
+
end
|
114
|
+
|
115
|
+
# Update properties of this object
|
116
|
+
def update!(**args)
|
117
|
+
@flight_emissions = args[:flight_emissions] if args.key?(:flight_emissions)
|
118
|
+
@model_version = args[:model_version] if args.key?(:model_version)
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
70
122
|
# A list of pair of airports (markets) to request the typical emissions for.
|
71
123
|
class ComputeTypicalFlightEmissionsRequest
|
72
124
|
include Google::Apis::Core::Hashable
|
@@ -154,6 +206,61 @@ module Google
|
|
154
206
|
end
|
155
207
|
end
|
156
208
|
|
209
|
+
# Metadata about the EASA Flight Emissions Label.
|
210
|
+
class EasaLabelMetadata
|
211
|
+
include Google::Apis::Core::Hashable
|
212
|
+
|
213
|
+
# Represents a whole or partial calendar date, such as a birthday. The time of
|
214
|
+
# day and time zone are either specified elsewhere or are insignificant. The
|
215
|
+
# date is relative to the Gregorian Calendar. This can represent one of the
|
216
|
+
# following: * A full date, with non-zero year, month, and day values. * A month
|
217
|
+
# and day, with a zero year (for example, an anniversary). * A year on its own,
|
218
|
+
# with a zero month and a zero day. * A year and month, with a zero day (for
|
219
|
+
# example, a credit card expiration date). Related types: * google.type.
|
220
|
+
# TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
|
221
|
+
# Corresponds to the JSON property `labelExpiryDate`
|
222
|
+
# @return [Google::Apis::TravelimpactmodelV1::Date]
|
223
|
+
attr_accessor :label_expiry_date
|
224
|
+
|
225
|
+
# Represents a whole or partial calendar date, such as a birthday. The time of
|
226
|
+
# day and time zone are either specified elsewhere or are insignificant. The
|
227
|
+
# date is relative to the Gregorian Calendar. This can represent one of the
|
228
|
+
# following: * A full date, with non-zero year, month, and day values. * A month
|
229
|
+
# and day, with a zero year (for example, an anniversary). * A year on its own,
|
230
|
+
# with a zero month and a zero day. * A year and month, with a zero day (for
|
231
|
+
# example, a credit card expiration date). Related types: * google.type.
|
232
|
+
# TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
|
233
|
+
# Corresponds to the JSON property `labelIssueDate`
|
234
|
+
# @return [Google::Apis::TravelimpactmodelV1::Date]
|
235
|
+
attr_accessor :label_issue_date
|
236
|
+
|
237
|
+
# Version of the label.
|
238
|
+
# Corresponds to the JSON property `labelVersion`
|
239
|
+
# @return [String]
|
240
|
+
attr_accessor :label_version
|
241
|
+
|
242
|
+
# Sustainable Aviation Fuel (SAF) emissions discount percentage applied to the
|
243
|
+
# label. It is a percentage as a decimal. The values are in the interval [0,1].
|
244
|
+
# For example, 0.0021 means 0.21%. This discount and reduction in emissions are
|
245
|
+
# reported by the EASA label but they are not included in the CO2e estimates
|
246
|
+
# distributed by this API.
|
247
|
+
# Corresponds to the JSON property `safDiscountPercentage`
|
248
|
+
# @return [Float]
|
249
|
+
attr_accessor :saf_discount_percentage
|
250
|
+
|
251
|
+
def initialize(**args)
|
252
|
+
update!(**args)
|
253
|
+
end
|
254
|
+
|
255
|
+
# Update properties of this object
|
256
|
+
def update!(**args)
|
257
|
+
@label_expiry_date = args[:label_expiry_date] if args.key?(:label_expiry_date)
|
258
|
+
@label_issue_date = args[:label_issue_date] if args.key?(:label_issue_date)
|
259
|
+
@label_version = args[:label_version] if args.key?(:label_version)
|
260
|
+
@saf_discount_percentage = args[:saf_discount_percentage] if args.key?(:saf_discount_percentage)
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
157
264
|
# Grouped emissions per seating class results.
|
158
265
|
class EmissionsGramsPerPax
|
159
266
|
include Google::Apis::Core::Hashable
|
@@ -254,6 +361,17 @@ module Google
|
|
254
361
|
class FlightWithEmissions
|
255
362
|
include Google::Apis::Core::Hashable
|
256
363
|
|
364
|
+
# Optional. The significance of contrails warming impact compared to the total
|
365
|
+
# CO2e emissions impact.
|
366
|
+
# Corresponds to the JSON property `contrailsImpactBucket`
|
367
|
+
# @return [String]
|
368
|
+
attr_accessor :contrails_impact_bucket
|
369
|
+
|
370
|
+
# Metadata about the EASA Flight Emissions Label.
|
371
|
+
# Corresponds to the JSON property `easaLabelMetadata`
|
372
|
+
# @return [Google::Apis::TravelimpactmodelV1::EasaLabelMetadata]
|
373
|
+
attr_accessor :easa_label_metadata
|
374
|
+
|
257
375
|
# Grouped emissions per seating class results.
|
258
376
|
# Corresponds to the JSON property `emissionsGramsPerPax`
|
259
377
|
# @return [Google::Apis::TravelimpactmodelV1::EmissionsGramsPerPax]
|
@@ -265,14 +383,22 @@ module Google
|
|
265
383
|
# @return [Google::Apis::TravelimpactmodelV1::Flight]
|
266
384
|
attr_accessor :flight
|
267
385
|
|
386
|
+
# Optional. The source of the emissions data.
|
387
|
+
# Corresponds to the JSON property `source`
|
388
|
+
# @return [String]
|
389
|
+
attr_accessor :source
|
390
|
+
|
268
391
|
def initialize(**args)
|
269
392
|
update!(**args)
|
270
393
|
end
|
271
394
|
|
272
395
|
# Update properties of this object
|
273
396
|
def update!(**args)
|
397
|
+
@contrails_impact_bucket = args[:contrails_impact_bucket] if args.key?(:contrails_impact_bucket)
|
398
|
+
@easa_label_metadata = args[:easa_label_metadata] if args.key?(:easa_label_metadata)
|
274
399
|
@emissions_grams_per_pax = args[:emissions_grams_per_pax] if args.key?(:emissions_grams_per_pax)
|
275
400
|
@flight = args[:flight] if args.key?(:flight)
|
401
|
+
@source = args[:source] if args.key?(:source)
|
276
402
|
end
|
277
403
|
end
|
278
404
|
|
@@ -346,6 +472,137 @@ module Google
|
|
346
472
|
end
|
347
473
|
end
|
348
474
|
|
475
|
+
# Scope 3 flight with emission estimates.
|
476
|
+
class Scope3FlightEmissions
|
477
|
+
include Google::Apis::Core::Hashable
|
478
|
+
|
479
|
+
# Flight parameters with which the Scope 3 emissions are fetched.
|
480
|
+
# Corresponds to the JSON property `flight`
|
481
|
+
# @return [Google::Apis::TravelimpactmodelV1::Scope3FlightSegment]
|
482
|
+
attr_accessor :flight
|
483
|
+
|
484
|
+
# Optional. The source of the emissions data.
|
485
|
+
# Corresponds to the JSON property `source`
|
486
|
+
# @return [String]
|
487
|
+
attr_accessor :source
|
488
|
+
|
489
|
+
# Optional. Tank-to-wake flight emissions per passenger based on the requested
|
490
|
+
# info.
|
491
|
+
# Corresponds to the JSON property `ttwEmissionsGramsPerPax`
|
492
|
+
# @return [Fixnum]
|
493
|
+
attr_accessor :ttw_emissions_grams_per_pax
|
494
|
+
|
495
|
+
# Optional. Well-to-tank flight emissions per passenger based on the requested
|
496
|
+
# info.
|
497
|
+
# Corresponds to the JSON property `wttEmissionsGramsPerPax`
|
498
|
+
# @return [Fixnum]
|
499
|
+
attr_accessor :wtt_emissions_grams_per_pax
|
500
|
+
|
501
|
+
# Optional. Total flight emissions (sum of well-to-tank and tank-to-wake) per
|
502
|
+
# passenger based on the requested info. This is the total emissions and unless
|
503
|
+
# you have specific reasons for using TTW or WTT emissions, you should use this
|
504
|
+
# number.
|
505
|
+
# Corresponds to the JSON property `wtwEmissionsGramsPerPax`
|
506
|
+
# @return [Fixnum]
|
507
|
+
attr_accessor :wtw_emissions_grams_per_pax
|
508
|
+
|
509
|
+
def initialize(**args)
|
510
|
+
update!(**args)
|
511
|
+
end
|
512
|
+
|
513
|
+
# Update properties of this object
|
514
|
+
def update!(**args)
|
515
|
+
@flight = args[:flight] if args.key?(:flight)
|
516
|
+
@source = args[:source] if args.key?(:source)
|
517
|
+
@ttw_emissions_grams_per_pax = args[:ttw_emissions_grams_per_pax] if args.key?(:ttw_emissions_grams_per_pax)
|
518
|
+
@wtt_emissions_grams_per_pax = args[:wtt_emissions_grams_per_pax] if args.key?(:wtt_emissions_grams_per_pax)
|
519
|
+
@wtw_emissions_grams_per_pax = args[:wtw_emissions_grams_per_pax] if args.key?(:wtw_emissions_grams_per_pax)
|
520
|
+
end
|
521
|
+
end
|
522
|
+
|
523
|
+
# Flight parameters with which the Scope 3 emissions are fetched.
|
524
|
+
class Scope3FlightSegment
|
525
|
+
include Google::Apis::Core::Hashable
|
526
|
+
|
527
|
+
# Required. The cabin class of the flight.
|
528
|
+
# Corresponds to the JSON property `cabinClass`
|
529
|
+
# @return [String]
|
530
|
+
attr_accessor :cabin_class
|
531
|
+
|
532
|
+
# Optional. IATA carrier code, e.g. `KE`. This is required if specific flight
|
533
|
+
# matching is desired. Otherwise, this is unused for typical flight and distance-
|
534
|
+
# based emissions models. This could be both operating and marketing carrier
|
535
|
+
# code (i.e. codeshare is covered).
|
536
|
+
# Corresponds to the JSON property `carrierCode`
|
537
|
+
# @return [String]
|
538
|
+
attr_accessor :carrier_code
|
539
|
+
|
540
|
+
# Represents a whole or partial calendar date, such as a birthday. The time of
|
541
|
+
# day and time zone are either specified elsewhere or are insignificant. The
|
542
|
+
# date is relative to the Gregorian Calendar. This can represent one of the
|
543
|
+
# following: * A full date, with non-zero year, month, and day values. * A month
|
544
|
+
# and day, with a zero year (for example, an anniversary). * A year on its own,
|
545
|
+
# with a zero month and a zero day. * A year and month, with a zero day (for
|
546
|
+
# example, a credit card expiration date). Related types: * google.type.
|
547
|
+
# TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
|
548
|
+
# Corresponds to the JSON property `departureDate`
|
549
|
+
# @return [Google::Apis::TravelimpactmodelV1::Date]
|
550
|
+
attr_accessor :departure_date
|
551
|
+
|
552
|
+
# Optional. IATA airport code for flight destination, e.g. `ICN`. This is used
|
553
|
+
# to match specific flight if provided alongside origin, carrier, and flight
|
554
|
+
# number. If there is no match, we will first try to match the flight to a
|
555
|
+
# typical flight between the provided origin and destination airports. Otherwise,
|
556
|
+
# we will use the distance-based emissions model if the flight distance is
|
557
|
+
# provided.
|
558
|
+
# Corresponds to the JSON property `destination`
|
559
|
+
# @return [String]
|
560
|
+
attr_accessor :destination
|
561
|
+
|
562
|
+
# Optional. Distance in kilometers, e.g. `2423`. This is used to match a flight
|
563
|
+
# to distance-based emissions when origin and destination are not provided or
|
564
|
+
# there are no matching typical flights. This field supports values between 0
|
565
|
+
# and 2.5e16 km.
|
566
|
+
# Corresponds to the JSON property `distanceKm`
|
567
|
+
# @return [Fixnum]
|
568
|
+
attr_accessor :distance_km
|
569
|
+
|
570
|
+
# Optional. Flight number, e.g. `71`. This is first used to match a specific
|
571
|
+
# flight if a flight number is specified alongside origin, destination, and
|
572
|
+
# carrier. If a flight number is not specified, we will first try to match the
|
573
|
+
# flight to a typical flight between the provided origin and destination
|
574
|
+
# airports. If that fails and/or origin & destination are not provided, we will
|
575
|
+
# use the distance-based emissions model based on the flight distance provided.
|
576
|
+
# Corresponds to the JSON property `flightNumber`
|
577
|
+
# @return [Fixnum]
|
578
|
+
attr_accessor :flight_number
|
579
|
+
|
580
|
+
# Optional. IATA airport code for flight origin, e.g. `YVR`. This is used to
|
581
|
+
# match specific flight if provided alongside destination, carrier, and flight
|
582
|
+
# number. If there is no match, we will first try to match the flight to a
|
583
|
+
# typical flight between the provided origin and destination airports. Otherwise,
|
584
|
+
# we will use the distance-based emissions model if the flight distance is
|
585
|
+
# provided.
|
586
|
+
# Corresponds to the JSON property `origin`
|
587
|
+
# @return [String]
|
588
|
+
attr_accessor :origin
|
589
|
+
|
590
|
+
def initialize(**args)
|
591
|
+
update!(**args)
|
592
|
+
end
|
593
|
+
|
594
|
+
# Update properties of this object
|
595
|
+
def update!(**args)
|
596
|
+
@cabin_class = args[:cabin_class] if args.key?(:cabin_class)
|
597
|
+
@carrier_code = args[:carrier_code] if args.key?(:carrier_code)
|
598
|
+
@departure_date = args[:departure_date] if args.key?(:departure_date)
|
599
|
+
@destination = args[:destination] if args.key?(:destination)
|
600
|
+
@distance_km = args[:distance_km] if args.key?(:distance_km)
|
601
|
+
@flight_number = args[:flight_number] if args.key?(:flight_number)
|
602
|
+
@origin = args[:origin] if args.key?(:origin)
|
603
|
+
end
|
604
|
+
end
|
605
|
+
|
349
606
|
# Typical flight emission estimates for a certain market
|
350
607
|
class TypicalFlightEmissions
|
351
608
|
include Google::Apis::Core::Hashable
|
@@ -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.10.0"
|
20
20
|
|
21
21
|
# Version of the code generator used to generate this client
|
22
22
|
GENERATOR_VERSION = "0.18.0"
|
23
23
|
|
24
24
|
# Revision of the discovery document this client was generated from
|
25
|
-
REVISION = "
|
25
|
+
REVISION = "20251008"
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -34,6 +34,18 @@ module Google
|
|
34
34
|
include Google::Apis::Core::JsonObjectSupport
|
35
35
|
end
|
36
36
|
|
37
|
+
class ComputeScope3FlightEmissionsRequest
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
41
|
+
end
|
42
|
+
|
43
|
+
class ComputeScope3FlightEmissionsResponse
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
|
+
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
47
|
+
end
|
48
|
+
|
37
49
|
class ComputeTypicalFlightEmissionsRequest
|
38
50
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
51
|
|
@@ -52,6 +64,12 @@ module Google
|
|
52
64
|
include Google::Apis::Core::JsonObjectSupport
|
53
65
|
end
|
54
66
|
|
67
|
+
class EasaLabelMetadata
|
68
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
69
|
+
|
70
|
+
include Google::Apis::Core::JsonObjectSupport
|
71
|
+
end
|
72
|
+
|
55
73
|
class EmissionsGramsPerPax
|
56
74
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
57
75
|
|
@@ -82,6 +100,18 @@ module Google
|
|
82
100
|
include Google::Apis::Core::JsonObjectSupport
|
83
101
|
end
|
84
102
|
|
103
|
+
class Scope3FlightEmissions
|
104
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
105
|
+
|
106
|
+
include Google::Apis::Core::JsonObjectSupport
|
107
|
+
end
|
108
|
+
|
109
|
+
class Scope3FlightSegment
|
110
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
111
|
+
|
112
|
+
include Google::Apis::Core::JsonObjectSupport
|
113
|
+
end
|
114
|
+
|
85
115
|
class TypicalFlightEmissions
|
86
116
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
87
117
|
|
@@ -106,6 +136,26 @@ module Google
|
|
106
136
|
end
|
107
137
|
end
|
108
138
|
|
139
|
+
class ComputeScope3FlightEmissionsRequest
|
140
|
+
# @private
|
141
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
142
|
+
collection :flights, as: 'flights', class: Google::Apis::TravelimpactmodelV1::Scope3FlightSegment, decorator: Google::Apis::TravelimpactmodelV1::Scope3FlightSegment::Representation
|
143
|
+
|
144
|
+
property :model_version, as: 'modelVersion', class: Google::Apis::TravelimpactmodelV1::ModelVersion, decorator: Google::Apis::TravelimpactmodelV1::ModelVersion::Representation
|
145
|
+
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
class ComputeScope3FlightEmissionsResponse
|
150
|
+
# @private
|
151
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
152
|
+
collection :flight_emissions, as: 'flightEmissions', class: Google::Apis::TravelimpactmodelV1::Scope3FlightEmissions, decorator: Google::Apis::TravelimpactmodelV1::Scope3FlightEmissions::Representation
|
153
|
+
|
154
|
+
property :model_version, as: 'modelVersion', class: Google::Apis::TravelimpactmodelV1::ModelVersion, decorator: Google::Apis::TravelimpactmodelV1::ModelVersion::Representation
|
155
|
+
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
109
159
|
class ComputeTypicalFlightEmissionsRequest
|
110
160
|
# @private
|
111
161
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -133,6 +183,18 @@ module Google
|
|
133
183
|
end
|
134
184
|
end
|
135
185
|
|
186
|
+
class EasaLabelMetadata
|
187
|
+
# @private
|
188
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
189
|
+
property :label_expiry_date, as: 'labelExpiryDate', class: Google::Apis::TravelimpactmodelV1::Date, decorator: Google::Apis::TravelimpactmodelV1::Date::Representation
|
190
|
+
|
191
|
+
property :label_issue_date, as: 'labelIssueDate', class: Google::Apis::TravelimpactmodelV1::Date, decorator: Google::Apis::TravelimpactmodelV1::Date::Representation
|
192
|
+
|
193
|
+
property :label_version, as: 'labelVersion'
|
194
|
+
property :saf_discount_percentage, as: 'safDiscountPercentage'
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
136
198
|
class EmissionsGramsPerPax
|
137
199
|
# @private
|
138
200
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -158,10 +220,14 @@ module Google
|
|
158
220
|
class FlightWithEmissions
|
159
221
|
# @private
|
160
222
|
class Representation < Google::Apis::Core::JsonRepresentation
|
223
|
+
property :contrails_impact_bucket, as: 'contrailsImpactBucket'
|
224
|
+
property :easa_label_metadata, as: 'easaLabelMetadata', class: Google::Apis::TravelimpactmodelV1::EasaLabelMetadata, decorator: Google::Apis::TravelimpactmodelV1::EasaLabelMetadata::Representation
|
225
|
+
|
161
226
|
property :emissions_grams_per_pax, as: 'emissionsGramsPerPax', class: Google::Apis::TravelimpactmodelV1::EmissionsGramsPerPax, decorator: Google::Apis::TravelimpactmodelV1::EmissionsGramsPerPax::Representation
|
162
227
|
|
163
228
|
property :flight, as: 'flight', class: Google::Apis::TravelimpactmodelV1::Flight, decorator: Google::Apis::TravelimpactmodelV1::Flight::Representation
|
164
229
|
|
230
|
+
property :source, as: 'source'
|
165
231
|
end
|
166
232
|
end
|
167
233
|
|
@@ -183,6 +249,32 @@ module Google
|
|
183
249
|
end
|
184
250
|
end
|
185
251
|
|
252
|
+
class Scope3FlightEmissions
|
253
|
+
# @private
|
254
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
255
|
+
property :flight, as: 'flight', class: Google::Apis::TravelimpactmodelV1::Scope3FlightSegment, decorator: Google::Apis::TravelimpactmodelV1::Scope3FlightSegment::Representation
|
256
|
+
|
257
|
+
property :source, as: 'source'
|
258
|
+
property :ttw_emissions_grams_per_pax, :numeric_string => true, as: 'ttwEmissionsGramsPerPax'
|
259
|
+
property :wtt_emissions_grams_per_pax, :numeric_string => true, as: 'wttEmissionsGramsPerPax'
|
260
|
+
property :wtw_emissions_grams_per_pax, :numeric_string => true, as: 'wtwEmissionsGramsPerPax'
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
class Scope3FlightSegment
|
265
|
+
# @private
|
266
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
267
|
+
property :cabin_class, as: 'cabinClass'
|
268
|
+
property :carrier_code, as: 'carrierCode'
|
269
|
+
property :departure_date, as: 'departureDate', class: Google::Apis::TravelimpactmodelV1::Date, decorator: Google::Apis::TravelimpactmodelV1::Date::Representation
|
270
|
+
|
271
|
+
property :destination, as: 'destination'
|
272
|
+
property :distance_km, :numeric_string => true, as: 'distanceKm'
|
273
|
+
property :flight_number, as: 'flightNumber'
|
274
|
+
property :origin, as: 'origin'
|
275
|
+
end
|
276
|
+
end
|
277
|
+
|
186
278
|
class TypicalFlightEmissions
|
187
279
|
# @private
|
188
280
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -91,6 +91,71 @@ module Google
|
|
91
91
|
execute_or_queue_command(command, &block)
|
92
92
|
end
|
93
93
|
|
94
|
+
# Stateless method to retrieve GHG emissions estimates for a set of flight
|
95
|
+
# segments for Scope 3 reporting. The response will contain all entries that
|
96
|
+
# match the input Scope3FlightSegment flight segments, in the same order
|
97
|
+
# provided. The estimates will be computed using the following cascading logic (
|
98
|
+
# using the first one that is available): 1. TIM-based emissions given origin,
|
99
|
+
# destination, carrier, flightNumber, departureDate, and cabinClass. 2. Typical
|
100
|
+
# flight emissions given origin, destination, year in departureDate, and
|
101
|
+
# cabinClass. 3. Distance-based emissions calculated using distanceKm, year in
|
102
|
+
# departureDate, and cabinClass. If there is a future flight requested in this
|
103
|
+
# calendar year, we do not support Tier 1 emissions and will fallback to Tier 2
|
104
|
+
# or 3 emissions. If the requested future flight is in not in this calendar year,
|
105
|
+
# we will return an empty response. We recommend that for future flights,
|
106
|
+
# computeFlightEmissions API is used instead. If there are no estimates
|
107
|
+
# available for a certain flight with any of the three methods, the response
|
108
|
+
# will return a Scope3FlightEmissions object with empty emission fields. The
|
109
|
+
# request will still be considered successful. Generally, missing emissions
|
110
|
+
# estimates occur when the flight is unknown to the server (e.g. no specific
|
111
|
+
# flight exists, or typical flight emissions are not available for the requested
|
112
|
+
# pair). The request will fail with an `INVALID_ARGUMENT` error if: * The
|
113
|
+
# request contains more than 1,000 flight legs. * The input flight leg is
|
114
|
+
# missing one or more identifiers. For example, missing origin/destination
|
115
|
+
# without a valid distance for TIM_EMISSIONS or TYPICAL_FLIGHT_EMISSIONS type
|
116
|
+
# matching, or missing distance for a DISTANCE_BASED_EMISSIONS type matching (if
|
117
|
+
# you want to fallback to distance-based emissions or want a distance-based
|
118
|
+
# emissions estimate, you need to specify a distance). * The flight date is
|
119
|
+
# before 2019 (Scope 3 data is only available for 2019 and after). * The flight
|
120
|
+
# distance is 0 or lower. * Missing cabin class. Because the request is
|
121
|
+
# processed with fallback logic, it is possible that misconfigured requests
|
122
|
+
# return valid emissions estimates using fallback methods. For example, if a
|
123
|
+
# request has the wrong flight number but specifies the origin and destination,
|
124
|
+
# the request will still succeed, but the returned emissions will be based
|
125
|
+
# solely on the typical flight emissions. Similarly, if a request is missing the
|
126
|
+
# origin for a typical flight emissions request, but specifies a valid distance,
|
127
|
+
# the request could succeed based solely on the distance-based emissions.
|
128
|
+
# Consequently, one should check the source of the returned emissions (source)
|
129
|
+
# to confirm the results are as expected.
|
130
|
+
# @param [Google::Apis::TravelimpactmodelV1::ComputeScope3FlightEmissionsRequest] compute_scope3_flight_emissions_request_object
|
131
|
+
# @param [String] fields
|
132
|
+
# Selector specifying which fields to include in a partial response.
|
133
|
+
# @param [String] quota_user
|
134
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
135
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
136
|
+
# @param [Google::Apis::RequestOptions] options
|
137
|
+
# Request-specific options
|
138
|
+
#
|
139
|
+
# @yield [result, err] Result & error if block supplied
|
140
|
+
# @yieldparam result [Google::Apis::TravelimpactmodelV1::ComputeScope3FlightEmissionsResponse] parsed result object
|
141
|
+
# @yieldparam err [StandardError] error object if request failed
|
142
|
+
#
|
143
|
+
# @return [Google::Apis::TravelimpactmodelV1::ComputeScope3FlightEmissionsResponse]
|
144
|
+
#
|
145
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
146
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
147
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
148
|
+
def compute_scope3_flight_emissions(compute_scope3_flight_emissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
149
|
+
command = make_simple_command(:post, 'v1/flights:computeScope3FlightEmissions', options)
|
150
|
+
command.request_representation = Google::Apis::TravelimpactmodelV1::ComputeScope3FlightEmissionsRequest::Representation
|
151
|
+
command.request_object = compute_scope3_flight_emissions_request_object
|
152
|
+
command.response_representation = Google::Apis::TravelimpactmodelV1::ComputeScope3FlightEmissionsResponse::Representation
|
153
|
+
command.response_class = Google::Apis::TravelimpactmodelV1::ComputeScope3FlightEmissionsResponse
|
154
|
+
command.query['fields'] = fields unless fields.nil?
|
155
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
156
|
+
execute_or_queue_command(command, &block)
|
157
|
+
end
|
158
|
+
|
94
159
|
# Retrieves typical flight emissions estimates between two airports, also known
|
95
160
|
# as a market. If there are no estimates available for a certain market, the
|
96
161
|
# response will return the market object with empty emission fields. The request
|
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.10.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.10.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:
|