All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.expediagroup.sdk.xap.models.RatePlanStandalonePrice.kt Maven / Gradle / Ivy

/*
 * Copyright (C) 2022 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.
 */
/**
 *
 * Please note:
 * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * Do not edit this file manually.
 *
 */

@file:Suppress(
    "ArrayInDataClass",
    "EnumEntryName",
    "RemoveRedundantQualifierName",
    "UnusedImport"
)

package com.expediagroup.sdk.xap.models

import com.expediagroup.sdk.xap.models.RatePlanStandalonePriceAvgNightlyRate
import com.expediagroup.sdk.xap.models.RatePlanStandalonePriceBaseRate
import com.expediagroup.sdk.xap.models.RatePlanStandalonePriceHotelMandatoryFees
import com.expediagroup.sdk.xap.models.RatePlanStandalonePriceTaxesAndFees
import com.expediagroup.sdk.xap.models.RatePlanStandalonePriceTotalPrice
import com.fasterxml.jackson.annotation.JsonProperty
import org.hibernate.validator.constraints.Length
import javax.validation.Valid
import javax.validation.constraints.Max
import javax.validation.constraints.Min
import javax.validation.constraints.Pattern
import javax.validation.constraints.Size

/**
 * The corresponded standalone price to the package rate plan (to show the `strikethrough`).  Only returned when the returned `rateplan` is being used as part of a package.
 * @param baseRate
 * @param taxesAndFees
 * @param totalPrice
 * @param avgNightlyRate
 * @param hotelMandatoryFees
 */
data class RatePlanStandalonePrice(
    @JsonProperty("BaseRate")
    @field:Valid
    val baseRate: RatePlanStandalonePriceBaseRate? = null,
    @JsonProperty("TaxesAndFees")
    @field:Valid
    val taxesAndFees: RatePlanStandalonePriceTaxesAndFees? = null,
    @JsonProperty("TotalPrice")
    @field:Valid
    val totalPrice: RatePlanStandalonePriceTotalPrice? = null,
    @JsonProperty("AvgNightlyRate")
    @field:Valid
    val avgNightlyRate: RatePlanStandalonePriceAvgNightlyRate? = null,
    @JsonProperty("HotelMandatoryFees")
    @field:Valid
    val hotelMandatoryFees: RatePlanStandalonePriceHotelMandatoryFees? = null
) {
    companion object {
        @JvmStatic
        fun builder() = Builder()
    }

    class Builder(
        private var baseRate: RatePlanStandalonePriceBaseRate? = null,
        private var taxesAndFees: RatePlanStandalonePriceTaxesAndFees? = null,
        private var totalPrice: RatePlanStandalonePriceTotalPrice? = null,
        private var avgNightlyRate: RatePlanStandalonePriceAvgNightlyRate? = null,
        private var hotelMandatoryFees: RatePlanStandalonePriceHotelMandatoryFees? = null
    ) {
        fun baseRate(baseRate: RatePlanStandalonePriceBaseRate?) = apply { this.baseRate = baseRate }

        fun taxesAndFees(taxesAndFees: RatePlanStandalonePriceTaxesAndFees?) = apply { this.taxesAndFees = taxesAndFees }

        fun totalPrice(totalPrice: RatePlanStandalonePriceTotalPrice?) = apply { this.totalPrice = totalPrice }

        fun avgNightlyRate(avgNightlyRate: RatePlanStandalonePriceAvgNightlyRate?) = apply { this.avgNightlyRate = avgNightlyRate }

        fun hotelMandatoryFees(hotelMandatoryFees: RatePlanStandalonePriceHotelMandatoryFees?) = apply { this.hotelMandatoryFees = hotelMandatoryFees }

        fun build(): RatePlanStandalonePrice {
            return RatePlanStandalonePrice(
                baseRate = baseRate,
                taxesAndFees = taxesAndFees,
                totalPrice = totalPrice,
                avgNightlyRate = avgNightlyRate,
                hotelMandatoryFees = hotelMandatoryFees
            )
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy