/* * Copyright (C) 2023 Expedia, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { AirSegment } from './AirSegment' import { TravelProduct } from './TravelProduct' import { AirSegmentMapper } from './AirSegmentMapper' import { JsonObject, JsonProperty } from 'typescript-json-serializer' import { TravelProductProperties } from './TravelProduct' @JsonObject({ constructorParams: [{}] }) export class Air extends TravelProduct { /** * Local date and time of departure from original departure location, in ISO-8601 date and time format `yyyy-MM-ddTHH:mm:ss.SSSZ`. */ @JsonProperty({ name: 'departure_time' }) departureTime: Date /** * Local date and time of arrival to final destination location, in ISO-8601 date and time format `yyyy-MM-ddTHH:mm:ss.SSSZ`. */ @JsonProperty({ name: 'arrival_time' }) arrivalTime: Date /** * Additional airline and flight details for each of the trip segments. */ @JsonProperty({ name: 'air_segments', type: (property) => AirSegmentMapper.getType(property), }) airSegments: Array /** * Identifies the type of air trip based on the air destinations. */ @JsonProperty({ name: 'flight_type' }) flightType?: AirFlightTypeEnum /** * Airline booking confirmation code for the trip. */ @JsonProperty({ name: 'passenger_name_record' }) passengerNameRecord?: string /** * Associated with Passenger Name Record (PNR). */ @JsonProperty({ name: 'global_distribution_system_type' }) globalDistributionSystemType?: string @JsonProperty('type') readonly type = 'AIR' public constructor(air: AirProperties) { super({ price: air.price, inventoryType: air.inventoryType, inventorySource: air.inventorySource, travelersReferences: air.travelersReferences, payLater: air.payLater, }) this.departureTime = air.departureTime this.arrivalTime = air.arrivalTime this.airSegments = air.airSegments this.flightType = air.flightType this.passengerNameRecord = air.passengerNameRecord this.globalDistributionSystemType = air.globalDistributionSystemType } } export type AirFlightTypeEnum = 'ROUNDTRIP' | 'ONEWAY' | 'MULTIPLE_DESTINATION' export interface AirProperties extends TravelProductProperties { departureTime: Date arrivalTime: Date airSegments: Array flightType?: AirFlightTypeEnum passengerNameRecord?: string globalDistributionSystemType?: string }