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.



575
576
577
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 575

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



553
554
555
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 553

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)


558
559
560
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 558

def destination
  @destination
end

#flight_numberFixnum

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

Returns:

  • (Fixnum)


563
564
565
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 563

def flight_number
  @flight_number
end

#operating_carrier_codeString

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

Returns:

  • (String)


568
569
570
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 568

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)


573
574
575
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 573

def origin
  @origin
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



580
581
582
583
584
585
586
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 580

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