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.



810
811
812
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 810

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



783
784
785
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 783

def flight
  @flight
end

#sourceString

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

Returns:

  • (String)


788
789
790
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 788

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)


794
795
796
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 794

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)


800
801
802
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 800

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)


808
809
810
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 808

def wtw_emissions_grams_per_pax
  @wtw_emissions_grams_per_pax
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



815
816
817
818
819
820
821
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 815

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