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

commonMain.aws.sdk.kotlin.services.mediaconnect.model.PurchaseOfferingResponse.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.mediaconnect.model



class PurchaseOfferingResponse private constructor(builder: Builder) {
    /**
     * A pricing agreement for a discounted rate for a specific outbound bandwidth that your MediaConnect account will use each month over a specific time period. The discounted rate in the reservation applies to outbound bandwidth for all flows from your account until your account reaches the amount of bandwidth in your reservation. If you use more outbound bandwidth than the agreed upon amount in a single month, the overage is charged at the on-demand rate.
     */
    val reservation: aws.sdk.kotlin.services.mediaconnect.model.Reservation? = builder.reservation

    companion object {
        operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.mediaconnect.model.PurchaseOfferingResponse = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("PurchaseOfferingResponse(")
        append("reservation=$reservation)")
    }

    override fun hashCode(): kotlin.Int {
        var result = reservation?.hashCode() ?: 0
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (other == null || this::class != other::class) return false

        other as PurchaseOfferingResponse

        if (reservation != other.reservation) return false

        return true
    }

    inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.mediaconnect.model.PurchaseOfferingResponse = Builder(this).apply(block).build()

    class Builder {
        /**
         * A pricing agreement for a discounted rate for a specific outbound bandwidth that your MediaConnect account will use each month over a specific time period. The discounted rate in the reservation applies to outbound bandwidth for all flows from your account until your account reaches the amount of bandwidth in your reservation. If you use more outbound bandwidth than the agreed upon amount in a single month, the overage is charged at the on-demand rate.
         */
        var reservation: aws.sdk.kotlin.services.mediaconnect.model.Reservation? = null

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.mediaconnect.model.PurchaseOfferingResponse) : this() {
            this.reservation = x.reservation
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.mediaconnect.model.PurchaseOfferingResponse = PurchaseOfferingResponse(this)

        /**
         * construct an [aws.sdk.kotlin.services.mediaconnect.model.Reservation] inside the given [block]
         */
        fun reservation(block: aws.sdk.kotlin.services.mediaconnect.model.Reservation.Builder.() -> kotlin.Unit) {
            this.reservation = aws.sdk.kotlin.services.mediaconnect.model.Reservation.invoke(block)
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy