
commonMain.aws.sdk.kotlin.services.lightsail.model.RelationalDatabaseHardware.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lightsail.model
/**
* Describes the hardware of a database.
*/
public class RelationalDatabaseHardware private constructor(builder: Builder) {
/**
* The number of vCPUs for the database.
*/
public val cpuCount: kotlin.Int? = builder.cpuCount
/**
* The size of the disk for the database.
*/
public val diskSizeInGb: kotlin.Int? = builder.diskSizeInGb
/**
* The amount of RAM in GB for the database.
*/
public val ramSizeInGb: kotlin.Float? = builder.ramSizeInGb
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lightsail.model.RelationalDatabaseHardware = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RelationalDatabaseHardware(")
append("cpuCount=$cpuCount,")
append("diskSizeInGb=$diskSizeInGb,")
append("ramSizeInGb=$ramSizeInGb")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = cpuCount ?: 0
result = 31 * result + (diskSizeInGb ?: 0)
result = 31 * result + (ramSizeInGb?.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 RelationalDatabaseHardware
if (cpuCount != other.cpuCount) return false
if (diskSizeInGb != other.diskSizeInGb) return false
if (ramSizeInGb != other.ramSizeInGb) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lightsail.model.RelationalDatabaseHardware = Builder(this).apply(block).build()
public class Builder {
/**
* The number of vCPUs for the database.
*/
public var cpuCount: kotlin.Int? = null
/**
* The size of the disk for the database.
*/
public var diskSizeInGb: kotlin.Int? = null
/**
* The amount of RAM in GB for the database.
*/
public var ramSizeInGb: kotlin.Float? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lightsail.model.RelationalDatabaseHardware) : this() {
this.cpuCount = x.cpuCount
this.diskSizeInGb = x.diskSizeInGb
this.ramSizeInGb = x.ramSizeInGb
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lightsail.model.RelationalDatabaseHardware = RelationalDatabaseHardware(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy