/* * 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 { HotelAddress } from './HotelAddress' import { TravelProduct } from './TravelProduct' import { HotelAddressMapper } from './HotelAddressMapper' import { JsonObject, JsonProperty } from 'typescript-json-serializer' import { TravelProductProperties } from './TravelProduct' @JsonObject({ constructorParams: [{}] }) export class Hotel extends TravelProduct { /** * Unique hotel identifier assigned by the partner. */ @JsonProperty({ name: 'hotel_id' }) hotelId: string /** * Identifies if the product price was withheld from the customer during the booking process. */ @JsonProperty({ name: 'price_withheld' }) priceWithheld?: boolean /** * Name of the hotel. */ @JsonProperty({ name: 'hotel_name' }) hotelName: string /** * Total number of rooms booked within the hotel product collection. */ @JsonProperty({ name: 'room_count' }) roomCount?: number @JsonProperty({ name: 'address', type: (property) => HotelAddressMapper.getType(property), }) address: HotelAddress /** * Local date and time of the hotel check-in, in ISO-8601 date and time format `yyyy-MM-ddTHH:mm:ss.SSSZ`. */ @JsonProperty({ name: 'checkin_time' }) checkinTime: Date /** * Local date and time of the hotel check-out, in ISO-8601 date and time format `yyyy-MM-ddTHH:mm:ss.SSSZ`. */ @JsonProperty({ name: 'checkout_time' }) checkoutTime: Date @JsonProperty('type') readonly type = 'HOTEL' public constructor(hotel: HotelProperties) { super({ price: hotel.price, inventoryType: hotel.inventoryType, inventorySource: hotel.inventorySource, travelersReferences: hotel.travelersReferences, payLater: hotel.payLater, }) this.hotelId = hotel.hotelId this.priceWithheld = hotel.priceWithheld this.hotelName = hotel.hotelName this.roomCount = hotel.roomCount this.address = hotel.address this.checkinTime = hotel.checkinTime this.checkoutTime = hotel.checkoutTime } } export interface HotelProperties extends TravelProductProperties { hotelId: string priceWithheld?: boolean hotelName: string roomCount?: number address: HotelAddress checkinTime: Date checkoutTime: Date }