Class: Google::Apis::TravelimpactmodelV1::EmissionsGramsPerPax

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

Grouped emissions per seating class results.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ EmissionsGramsPerPax

Returns a new instance of EmissionsGramsPerPax.



296
297
298
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 296

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

Instance Attribute Details

#businessFixnum

Emissions for one passenger in business class in grams. This field is always computed and populated, regardless of whether the aircraft has business class seats or not. Corresponds to the JSON property business

Returns:

  • (Fixnum)


273
274
275
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 273

def business
  @business
end

#economyFixnum

Emissions for one passenger in economy class in grams. This field is always computed and populated, regardless of whether the aircraft has economy class seats or not. Corresponds to the JSON property economy

Returns:

  • (Fixnum)


280
281
282
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 280

def economy
  @economy
end

#firstFixnum

Emissions for one passenger in first class in grams. This field is always computed and populated, regardless of whether the aircraft has first class seats or not. Corresponds to the JSON property first

Returns:

  • (Fixnum)


287
288
289
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 287

def first
  @first
end

#premium_economyFixnum

Emissions for one passenger in premium economy class in grams. This field is always computed and populated, regardless of whether the aircraft has premium economy class seats or not. Corresponds to the JSON property premiumEconomy

Returns:

  • (Fixnum)


294
295
296
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 294

def premium_economy
  @premium_economy
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



301
302
303
304
305
306
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 301

def update!(**args)
  @business = args[:business] if args.key?(:business)
  @economy = args[:economy] if args.key?(:economy)
  @first = args[:first] if args.key?(:first)
  @premium_economy = args[:premium_economy] if args.key?(:premium_economy)
end