Class: Google::Apis::TravelimpactmodelV1::Scope3FlightEmissions

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

Scope 3 flight with emission estimates.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Scope3FlightEmissions

Returns a new instance of Scope3FlightEmissions.



509
510
511
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 509

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

Instance Attribute Details

#flightGoogle::Apis::TravelimpactmodelV1::Scope3FlightSegment

Flight parameters with which the Scope 3 emissions are fetched. Corresponds to the JSON property flight



482
483
484
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 482

def flight
  @flight
end

#sourceString

Optional. The source of the emissions data. Corresponds to the JSON property source

Returns:

  • (String)


487
488
489
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 487

def source
  @source
end

#ttw_emissions_grams_per_paxFixnum

Optional. Tank-to-wake flight emissions per passenger based on the requested info. Corresponds to the JSON property ttwEmissionsGramsPerPax

Returns:

  • (Fixnum)


493
494
495
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 493

def ttw_emissions_grams_per_pax
  @ttw_emissions_grams_per_pax
end

#wtt_emissions_grams_per_paxFixnum

Optional. Well-to-tank flight emissions per passenger based on the requested info. Corresponds to the JSON property wttEmissionsGramsPerPax

Returns:

  • (Fixnum)


499
500
501
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 499

def wtt_emissions_grams_per_pax
  @wtt_emissions_grams_per_pax
end

#wtw_emissions_grams_per_paxFixnum

Optional. Total flight emissions (sum of well-to-tank and tank-to-wake) per passenger based on the requested info. This is the total emissions and unless you have specific reasons for using TTW or WTT emissions, you should use this number. Corresponds to the JSON property wtwEmissionsGramsPerPax

Returns:

  • (Fixnum)


507
508
509
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 507

def wtw_emissions_grams_per_pax
  @wtw_emissions_grams_per_pax
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



514
515
516
517
518
519
520
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 514

def update!(**args)
  @flight = args[:flight] if args.key?(:flight)
  @source = args[:source] if args.key?(:source)
  @ttw_emissions_grams_per_pax = args[:ttw_emissions_grams_per_pax] if args.key?(:ttw_emissions_grams_per_pax)
  @wtt_emissions_grams_per_pax = args[:wtt_emissions_grams_per_pax] if args.key?(:wtt_emissions_grams_per_pax)
  @wtw_emissions_grams_per_pax = args[:wtw_emissions_grams_per_pax] if args.key?(:wtw_emissions_grams_per_pax)
end