Class: Google::Apis::TravelimpactmodelV1::EasaLabelMetadata

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

Metadata about the EASA Flight Emissions Label.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ EasaLabelMetadata

Returns a new instance of EasaLabelMetadata.



251
252
253
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 251

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

Instance Attribute Details

#label_expiry_dateGoogle::Apis::TravelimpactmodelV1::Date

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type. TimeOfDay * google.type.DateTime * google.protobuf.Timestamp Corresponds to the JSON property labelExpiryDate



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

def label_expiry_date
  @label_expiry_date
end

#label_issue_dateGoogle::Apis::TravelimpactmodelV1::Date

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type. TimeOfDay * google.type.DateTime * google.protobuf.Timestamp Corresponds to the JSON property labelIssueDate



235
236
237
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 235

def label_issue_date
  @label_issue_date
end

#label_versionString

Version of the label. Corresponds to the JSON property labelVersion

Returns:

  • (String)


240
241
242
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 240

def label_version
  @label_version
end

#saf_discount_percentageFloat

Sustainable Aviation Fuel (SAF) emissions discount percentage applied to the label. It is a percentage as a decimal. The values are in the interval [0,1]. For example, 0.0021 means 0.21%. This discount and reduction in emissions are reported by the EASA label but they are not included in the CO2e estimates distributed by this API. Corresponds to the JSON property safDiscountPercentage

Returns:

  • (Float)


249
250
251
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 249

def saf_discount_percentage
  @saf_discount_percentage
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



256
257
258
259
260
261
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 256

def update!(**args)
  @label_expiry_date = args[:label_expiry_date] if args.key?(:label_expiry_date)
  @label_issue_date = args[:label_issue_date] if args.key?(:label_issue_date)
  @label_version = args[:label_version] if args.key?(:label_version)
  @saf_discount_percentage = args[:saf_discount_percentage] if args.key?(:saf_discount_percentage)
end