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.
193 194 195 |
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 193 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
171 172 173 |
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 171 def departure_date @departure_date end |
#destination ⇒ String
Required. IATA airport code for flight destination, e.g. "JFK".
Corresponds to the JSON property destination
176 177 178 |
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 176 def destination @destination end |
#flight_number ⇒ Fixnum
Required. Flight number, e.g. 324.
Corresponds to the JSON property flightNumber
181 182 183 |
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 181 def flight_number @flight_number end |
#operating_carrier_code ⇒ String
Required. IATA carrier code, e.g. "AA".
Corresponds to the JSON property operatingCarrierCode
186 187 188 |
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 186 def @operating_carrier_code end |
#origin ⇒ String
Required. IATA airport code for flight origin, e.g. "LHR".
Corresponds to the JSON property origin
191 192 193 |
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 191 def origin @origin end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
198 199 200 201 202 203 204 |
# File 'lib/google/apis/travelimpactmodel_v1/classes.rb', line 198 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 |