commonMain.aws.sdk.kotlin.services.redshift.model.ModifyUsageLimitRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redshift-jvm Show documentation
Show all versions of redshift-jvm Show documentation
The AWS SDK for Kotlin client for Redshift
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.redshift.model
import aws.smithy.kotlin.runtime.SdkDsl
public class ModifyUsageLimitRequest private constructor(builder: Builder) {
/**
* The new limit amount. For more information about this parameter, see UsageLimit.
*/
public val amount: kotlin.Long? = builder.amount
/**
* The new action that Amazon Redshift takes when the limit is reached. For more information about this parameter, see UsageLimit.
*/
public val breachAction: aws.sdk.kotlin.services.redshift.model.UsageLimitBreachAction? = builder.breachAction
/**
* The identifier of the usage limit to modify.
*/
public val usageLimitId: kotlin.String? = builder.usageLimitId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.redshift.model.ModifyUsageLimitRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ModifyUsageLimitRequest(")
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 ModifyUsageLimitRequest
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.redshift.model.ModifyUsageLimitRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The new limit amount. For more information about this parameter, see UsageLimit.
*/
public var amount: kotlin.Long? = null
/**
* The new action that Amazon Redshift takes when the limit is reached. For more information about this parameter, see UsageLimit.
*/
public var breachAction: aws.sdk.kotlin.services.redshift.model.UsageLimitBreachAction? = null
/**
* The identifier of the usage limit to modify.
*/
public var usageLimitId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.redshift.model.ModifyUsageLimitRequest) : this() {
this.amount = x.amount
this.breachAction = x.breachAction
this.usageLimitId = x.usageLimitId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.redshift.model.ModifyUsageLimitRequest = ModifyUsageLimitRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}