Class: Google::Apis::TravelimpactmodelV1::Flight

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

All details related to a single request item for a direct flight emission estimates.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Flight

Returns a new instance of Flight.



346
347
348
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 346

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

Instance Attribute Details

#departure_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 departureDate



324
325
326
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 324

def departure_date
  @departure_date
end

#destinationString

Required. IATA airport code for flight destination, e.g. "JFK". Corresponds to the JSON property destination

Returns:

  • (String)


329
330
331
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 329

def destination
  @destination
end

#flight_numberFixnum

Required. Flight number, e.g. 324. Corresponds to the JSON property flightNumber

Returns:

  • (Fixnum)


334
335
336
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 334

def flight_number
  @flight_number
end

#operating_carrier_codeString

Required. IATA carrier code, e.g. "AA". Corresponds to the JSON property operatingCarrierCode

Returns:

  • (String)


339
340
341
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 339

def operating_carrier_code
  @operating_carrier_code
end

#originString

Required. IATA airport code for flight origin, e.g. "LHR". Corresponds to the JSON property origin

Returns:

  • (String)


344
345
346
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 344

def origin
  @origin
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



351
352
353
354
355
356
357
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 351

def update!(**args)
  @departure_date = args[:departure_date] if args.key?(:departure_date)
  @destination = args[:destination] if args.key?(:destination)
  @flight_number = args[:flight_number] if args.key?(:flight_number)
  @operating_carrier_code = args[:operating_carrier_code] if args.key?(:operating_carrier_code)
  @origin = args[:origin] if args.key?(:origin)
end