commonMain.aws.sdk.kotlin.services.computeoptimizer.model.Gpu.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of computeoptimizer-jvm Show documentation
Show all versions of computeoptimizer-jvm Show documentation
The AWS SDK for Kotlin client for Compute Optimizer
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.computeoptimizer.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Describes the GPU accelerators for the instance type.
*/
public class Gpu private constructor(builder: Builder) {
/**
* The number of GPUs for the instance type.
*/
public val gpuCount: kotlin.Int = builder.gpuCount
/**
* The total size of the memory for the GPU accelerators for the instance type, in MiB.
*/
public val gpuMemorySizeInMib: kotlin.Int = builder.gpuMemorySizeInMib
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.computeoptimizer.model.Gpu = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Gpu(")
append("gpuCount=$gpuCount,")
append("gpuMemorySizeInMib=$gpuMemorySizeInMib")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = gpuCount
result = 31 * result + (gpuMemorySizeInMib)
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 Gpu
if (gpuCount != other.gpuCount) return false
if (gpuMemorySizeInMib != other.gpuMemorySizeInMib) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.computeoptimizer.model.Gpu = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The number of GPUs for the instance type.
*/
public var gpuCount: kotlin.Int = 0
/**
* The total size of the memory for the GPU accelerators for the instance type, in MiB.
*/
public var gpuMemorySizeInMib: kotlin.Int = 0
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.computeoptimizer.model.Gpu) : this() {
this.gpuCount = x.gpuCount
this.gpuMemorySizeInMib = x.gpuMemorySizeInMib
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.computeoptimizer.model.Gpu = Gpu(this)
internal fun correctErrors(): Builder {
return this
}
}
}