commonMain.aws.sdk.kotlin.services.codebuild.model.ComputeConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codebuild-jvm Show documentation
Show all versions of codebuild-jvm Show documentation
The AWS SDK for Kotlin client for CodeBuild
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codebuild.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Contains compute attributes. These attributes only need be specified when your project's or fleet's `computeType` is set to `ATTRIBUTE_BASED_COMPUTE`.
*/
public class ComputeConfiguration private constructor(builder: Builder) {
/**
* The amount of disk space of the instance type included in your fleet.
*/
public val disk: kotlin.Long? = builder.disk
/**
* The machine type of the instance type included in your fleet.
*/
public val machineType: aws.sdk.kotlin.services.codebuild.model.MachineType? = builder.machineType
/**
* The amount of memory of the instance type included in your fleet.
*/
public val memory: kotlin.Long? = builder.memory
/**
* The number of vCPUs of the instance type included in your fleet.
*/
public val vCpu: kotlin.Long? = builder.vCpu
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codebuild.model.ComputeConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ComputeConfiguration(")
append("disk=$disk,")
append("machineType=$machineType,")
append("memory=$memory,")
append("vCpu=$vCpu")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = disk?.hashCode() ?: 0
result = 31 * result + (machineType?.hashCode() ?: 0)
result = 31 * result + (memory?.hashCode() ?: 0)
result = 31 * result + (vCpu?.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 ComputeConfiguration
if (disk != other.disk) return false
if (machineType != other.machineType) return false
if (memory != other.memory) return false
if (vCpu != other.vCpu) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codebuild.model.ComputeConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The amount of disk space of the instance type included in your fleet.
*/
public var disk: kotlin.Long? = null
/**
* The machine type of the instance type included in your fleet.
*/
public var machineType: aws.sdk.kotlin.services.codebuild.model.MachineType? = null
/**
* The amount of memory of the instance type included in your fleet.
*/
public var memory: kotlin.Long? = null
/**
* The number of vCPUs of the instance type included in your fleet.
*/
public var vCpu: kotlin.Long? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codebuild.model.ComputeConfiguration) : this() {
this.disk = x.disk
this.machineType = x.machineType
this.memory = x.memory
this.vCpu = x.vCpu
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codebuild.model.ComputeConfiguration = ComputeConfiguration(this)
internal fun correctErrors(): Builder {
return this
}
}
}