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

commonMain.aws.sdk.kotlin.services.redshiftserverless.model.UpdateUsageLimitRequest.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.redshiftserverless.model

import aws.smithy.kotlin.runtime.SdkDsl

public class UpdateUsageLimitRequest private constructor(builder: Builder) {
    /**
     * The new limit amount. If time-based, this amount is in Redshift Processing Units (RPU) consumed per hour. If data-based, this amount is in terabytes (TB) of data transferred between Regions in cross-account sharing. The value must be a positive number.
     */
    public val amount: kotlin.Long? = builder.amount
    /**
     * The new action that Amazon Redshift Serverless takes when the limit is reached.
     */
    public val breachAction: aws.sdk.kotlin.services.redshiftserverless.model.UsageLimitBreachAction? = builder.breachAction
    /**
     * The identifier of the usage limit to update.
     */
    public val usageLimitId: kotlin.String? = builder.usageLimitId

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateUsageLimitRequest(")
        append("amount=$amount,")
        append("breachAction=$breachAction,")
        append("usageLimitId=$usageLimitId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = amount?.hashCode() ?: 0
        result = 31 * result + (breachAction?.hashCode() ?: 0)
        result = 31 * result + (usageLimitId?.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 UpdateUsageLimitRequest

        if (amount != other.amount) return false
        if (breachAction != other.breachAction) return false
        if (usageLimitId != other.usageLimitId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The new limit amount. If time-based, this amount is in Redshift Processing Units (RPU) consumed per hour. If data-based, this amount is in terabytes (TB) of data transferred between Regions in cross-account sharing. The value must be a positive number.
         */
        public var amount: kotlin.Long? = null
        /**
         * The new action that Amazon Redshift Serverless takes when the limit is reached.
         */
        public var breachAction: aws.sdk.kotlin.services.redshiftserverless.model.UsageLimitBreachAction? = null
        /**
         * The identifier of the usage limit to update.
         */
        public var usageLimitId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.redshiftserverless.model.UpdateUsageLimitRequest) : this() {
            this.amount = x.amount
            this.breachAction = x.breachAction
            this.usageLimitId = x.usageLimitId
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy