/* * 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 { Name } from './Name' import { NameMapper } from './NameMapper' import { Telephone } from './Telephone' import { TelephoneMapper } from './TelephoneMapper' import { JsonObject, JsonProperty } from 'typescript-json-serializer' @JsonObject({ constructorParams: [{}] }) export class Traveler { @JsonProperty({ name: 'traveler_name', type: (property) => NameMapper.getType(property), }) travelerName: Name /** * Email address associated with the traveler as supplied by the partner system. */ @JsonProperty({ name: 'email_address' }) emailAddress?: string @JsonProperty({ name: 'telephones', type: (property) => TelephoneMapper.getType(property), }) telephones?: Array /** * Indicator for one of the travelers who is the primary traveler. One traveler in each itinerary item must be listed as primary. By default, for a single traveler this should be set to `true`. */ @JsonProperty({ name: 'primary' }) primary: boolean /** * Age of the traveler. */ @JsonProperty({ name: 'age' }) age?: number /** * Date of birth for traveler, in ISO-8601 date and time format `yyyy-MM-ddTHH:mm:ss.SSSZ`. */ @JsonProperty({ name: 'birth_date' }) birthDate?: Date /** * The alpha-3 ISO country code of the traveler\'s nationality. */ @JsonProperty({ name: 'citizenship_country_code' }) citizenshipCountryCode?: string /** * A unique identifier for travelers in the transaction. */ @JsonProperty({ name: 'traveler_id' }) travelerId?: string public constructor(traveler: TravelerProperties) { this.travelerName = traveler.travelerName this.emailAddress = traveler.emailAddress this.telephones = traveler.telephones this.primary = traveler.primary this.age = traveler.age this.birthDate = traveler.birthDate this.citizenshipCountryCode = traveler.citizenshipCountryCode this.travelerId = traveler.travelerId } } export interface TravelerProperties { travelerName: Name emailAddress?: string telephones?: Array primary: boolean age?: number birthDate?: Date citizenshipCountryCode?: string travelerId?: string }