Class: Google::Apis::TravelimpactmodelV1::Flight
- Inherits:
-
Object
- Object
- Google::Apis::TravelimpactmodelV1::Flight
- 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
-
#departure_date ⇒ Google::Apis::TravelimpactmodelV1::Date
Represents a whole or partial calendar date, such as a birthday.
-
#destination ⇒ String
Required.
-
#flight_number ⇒ Fixnum
Required.
-
#operating_carrier_code ⇒ String
Required.
-
#origin ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Flight
constructor
A new instance of Flight.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Flight
Returns a new instance of Flight.
583 584 585 |
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 583 def initialize(**args) update!(**args) end |
Instance Attribute Details
#departure_date ⇒ Google::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
561 562 563 |
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 561 def departure_date @departure_date end |
#destination ⇒ String
Required. IATA airport code for flight destination, e.g. "JFK".
Corresponds to the JSON property destination
566 567 568 |
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 566 def destination @destination end |
#flight_number ⇒ Fixnum
Required. Flight number, e.g. 324.
Corresponds to the JSON property flightNumber
571 572 573 |
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 571 def flight_number @flight_number end |
#operating_carrier_code ⇒ String
Required. IATA carrier code, e.g. "AA".
Corresponds to the JSON property operatingCarrierCode
576 577 578 |
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 576 def @operating_carrier_code end |
#origin ⇒ String
Required. IATA airport code for flight origin, e.g. "LHR".
Corresponds to the JSON property origin
581 582 583 |
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 581 def origin @origin end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
588 589 590 591 592 593 594 |
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 588 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 |