Class: Google::Apis::TravelimpactmodelV1::FlightWithEmissions

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

Overview

Direct flight with emission estimates.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ FlightWithEmissions

Returns a new instance of FlightWithEmissions.



222
223
224
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 222

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

Instance Attribute Details

#emissions_grams_per_paxGoogle::Apis::TravelimpactmodelV1::EmissionsGramsPerPax

Grouped emissions per seating class results. Corresponds to the JSON property emissionsGramsPerPax



214
215
216
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 214

def emissions_grams_per_pax
  @emissions_grams_per_pax
end

#flightGoogle::Apis::TravelimpactmodelV1::Flight

All details related to a single request item for a direct flight emission estimates. Corresponds to the JSON property flight



220
221
222
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 220

def flight
  @flight
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



227
228
229
230
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 227

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