commonMain.aws.sdk.kotlin.services.elasticache.model.CacheUsageLimits.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of elasticache-jvm Show documentation
Show all versions of elasticache-jvm Show documentation
The AWS SDK for Kotlin client for ElastiCache
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.elasticache.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The usage limits for storage and ElastiCache Processing Units for the cache.
*/
public class CacheUsageLimits private constructor(builder: Builder) {
/**
* The maximum data storage limit in the cache, expressed in Gigabytes.
*/
public val dataStorage: aws.sdk.kotlin.services.elasticache.model.DataStorage? = builder.dataStorage
/**
* The configuration for the number of ElastiCache Processing Units (ECPU) the cache can consume per second.
*/
public val ecpuPerSecond: aws.sdk.kotlin.services.elasticache.model.EcpuPerSecond? = builder.ecpuPerSecond
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.elasticache.model.CacheUsageLimits = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CacheUsageLimits(")
append("dataStorage=$dataStorage,")
append("ecpuPerSecond=$ecpuPerSecond")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = dataStorage?.hashCode() ?: 0
result = 31 * result + (ecpuPerSecond?.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 CacheUsageLimits
if (dataStorage != other.dataStorage) return false
if (ecpuPerSecond != other.ecpuPerSecond) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.elasticache.model.CacheUsageLimits = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The maximum data storage limit in the cache, expressed in Gigabytes.
*/
public var dataStorage: aws.sdk.kotlin.services.elasticache.model.DataStorage? = null
/**
* The configuration for the number of ElastiCache Processing Units (ECPU) the cache can consume per second.
*/
public var ecpuPerSecond: aws.sdk.kotlin.services.elasticache.model.EcpuPerSecond? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.elasticache.model.CacheUsageLimits) : this() {
this.dataStorage = x.dataStorage
this.ecpuPerSecond = x.ecpuPerSecond
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.elasticache.model.CacheUsageLimits = CacheUsageLimits(this)
/**
* construct an [aws.sdk.kotlin.services.elasticache.model.DataStorage] inside the given [block]
*/
public fun dataStorage(block: aws.sdk.kotlin.services.elasticache.model.DataStorage.Builder.() -> kotlin.Unit) {
this.dataStorage = aws.sdk.kotlin.services.elasticache.model.DataStorage.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.elasticache.model.EcpuPerSecond] inside the given [block]
*/
public fun ecpuPerSecond(block: aws.sdk.kotlin.services.elasticache.model.EcpuPerSecond.Builder.() -> kotlin.Unit) {
this.ecpuPerSecond = aws.sdk.kotlin.services.elasticache.model.EcpuPerSecond.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}