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

commonMain.aws.sdk.kotlin.services.redshift.model.ReservedNodeOffering.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.redshift.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Describes a reserved node offering.
 */
public class ReservedNodeOffering private constructor(builder: Builder) {
    /**
     * The currency code for the compute nodes offering.
     */
    public val currencyCode: kotlin.String? = builder.currencyCode
    /**
     * The duration, in seconds, for which the offering will reserve the node.
     */
    public val duration: kotlin.Int? = builder.duration
    /**
     * The upfront fixed charge you will pay to purchase the specific reserved node offering.
     */
    public val fixedPrice: kotlin.Double? = builder.fixedPrice
    /**
     * The node type offered by the reserved node offering.
     */
    public val nodeType: kotlin.String? = builder.nodeType
    /**
     * The anticipated utilization of the reserved node, as defined in the reserved node offering.
     */
    public val offeringType: kotlin.String? = builder.offeringType
    /**
     * The charge to your account regardless of whether you are creating any clusters using the node offering. Recurring charges are only in effect for heavy-utilization reserved nodes.
     */
    public val recurringCharges: List? = builder.recurringCharges
    /**
     * The offering identifier.
     */
    public val reservedNodeOfferingId: kotlin.String? = builder.reservedNodeOfferingId
    /**
     *
     */
    public val reservedNodeOfferingType: aws.sdk.kotlin.services.redshift.model.ReservedNodeOfferingType? = builder.reservedNodeOfferingType
    /**
     * The rate you are charged for each hour the cluster that is using the offering is running.
     */
    public val usagePrice: kotlin.Double? = builder.usagePrice

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

    override fun toString(): kotlin.String = buildString {
        append("ReservedNodeOffering(")
        append("currencyCode=$currencyCode,")
        append("duration=$duration,")
        append("fixedPrice=$fixedPrice,")
        append("nodeType=$nodeType,")
        append("offeringType=$offeringType,")
        append("recurringCharges=$recurringCharges,")
        append("reservedNodeOfferingId=$reservedNodeOfferingId,")
        append("reservedNodeOfferingType=$reservedNodeOfferingType,")
        append("usagePrice=$usagePrice")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = currencyCode?.hashCode() ?: 0
        result = 31 * result + (duration ?: 0)
        result = 31 * result + (fixedPrice?.hashCode() ?: 0)
        result = 31 * result + (nodeType?.hashCode() ?: 0)
        result = 31 * result + (offeringType?.hashCode() ?: 0)
        result = 31 * result + (recurringCharges?.hashCode() ?: 0)
        result = 31 * result + (reservedNodeOfferingId?.hashCode() ?: 0)
        result = 31 * result + (reservedNodeOfferingType?.hashCode() ?: 0)
        result = 31 * result + (usagePrice?.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 ReservedNodeOffering

        if (currencyCode != other.currencyCode) return false
        if (duration != other.duration) return false
        if (!(fixedPrice?.equals(other.fixedPrice) ?: (other.fixedPrice == null))) return false
        if (nodeType != other.nodeType) return false
        if (offeringType != other.offeringType) return false
        if (recurringCharges != other.recurringCharges) return false
        if (reservedNodeOfferingId != other.reservedNodeOfferingId) return false
        if (reservedNodeOfferingType != other.reservedNodeOfferingType) return false
        if (!(usagePrice?.equals(other.usagePrice) ?: (other.usagePrice == null))) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The currency code for the compute nodes offering.
         */
        public var currencyCode: kotlin.String? = null
        /**
         * The duration, in seconds, for which the offering will reserve the node.
         */
        public var duration: kotlin.Int? = null
        /**
         * The upfront fixed charge you will pay to purchase the specific reserved node offering.
         */
        public var fixedPrice: kotlin.Double? = null
        /**
         * The node type offered by the reserved node offering.
         */
        public var nodeType: kotlin.String? = null
        /**
         * The anticipated utilization of the reserved node, as defined in the reserved node offering.
         */
        public var offeringType: kotlin.String? = null
        /**
         * The charge to your account regardless of whether you are creating any clusters using the node offering. Recurring charges are only in effect for heavy-utilization reserved nodes.
         */
        public var recurringCharges: List? = null
        /**
         * The offering identifier.
         */
        public var reservedNodeOfferingId: kotlin.String? = null
        /**
         *
         */
        public var reservedNodeOfferingType: aws.sdk.kotlin.services.redshift.model.ReservedNodeOfferingType? = null
        /**
         * The rate you are charged for each hour the cluster that is using the offering is running.
         */
        public var usagePrice: kotlin.Double? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.redshift.model.ReservedNodeOffering) : this() {
            this.currencyCode = x.currencyCode
            this.duration = x.duration
            this.fixedPrice = x.fixedPrice
            this.nodeType = x.nodeType
            this.offeringType = x.offeringType
            this.recurringCharges = x.recurringCharges
            this.reservedNodeOfferingId = x.reservedNodeOfferingId
            this.reservedNodeOfferingType = x.reservedNodeOfferingType
            this.usagePrice = x.usagePrice
        }

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy