commonMain.aws.sdk.kotlin.services.computeoptimizer.model.ContainerConfiguration.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 container configurations within the tasks of your Amazon ECS service.
*/
public class ContainerConfiguration private constructor(builder: Builder) {
/**
* The name of the container.
*/
public val containerName: kotlin.String? = builder.containerName
/**
* The number of CPU units reserved for the container.
*/
public val cpu: kotlin.Int? = builder.cpu
/**
* The memory size configurations for the container.
*/
public val memorySizeConfiguration: aws.sdk.kotlin.services.computeoptimizer.model.MemorySizeConfiguration? = builder.memorySizeConfiguration
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.computeoptimizer.model.ContainerConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ContainerConfiguration(")
append("containerName=$containerName,")
append("cpu=$cpu,")
append("memorySizeConfiguration=$memorySizeConfiguration")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = containerName?.hashCode() ?: 0
result = 31 * result + (cpu ?: 0)
result = 31 * result + (memorySizeConfiguration?.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 ContainerConfiguration
if (containerName != other.containerName) return false
if (cpu != other.cpu) return false
if (memorySizeConfiguration != other.memorySizeConfiguration) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.computeoptimizer.model.ContainerConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the container.
*/
public var containerName: kotlin.String? = null
/**
* The number of CPU units reserved for the container.
*/
public var cpu: kotlin.Int? = null
/**
* The memory size configurations for the container.
*/
public var memorySizeConfiguration: aws.sdk.kotlin.services.computeoptimizer.model.MemorySizeConfiguration? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.computeoptimizer.model.ContainerConfiguration) : this() {
this.containerName = x.containerName
this.cpu = x.cpu
this.memorySizeConfiguration = x.memorySizeConfiguration
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.computeoptimizer.model.ContainerConfiguration = ContainerConfiguration(this)
/**
* construct an [aws.sdk.kotlin.services.computeoptimizer.model.MemorySizeConfiguration] inside the given [block]
*/
public fun memorySizeConfiguration(block: aws.sdk.kotlin.services.computeoptimizer.model.MemorySizeConfiguration.Builder.() -> kotlin.Unit) {
this.memorySizeConfiguration = aws.sdk.kotlin.services.computeoptimizer.model.MemorySizeConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}