commonMain.aws.sdk.kotlin.services.computeoptimizer.model.EcsServiceRecommendedOptionProjectedMetric.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 projected metrics of an Amazon ECS service recommendation option.
*
* To determine the performance difference between your current Amazon ECS service and the recommended option, compare the metric data of your service against its projected metric data.
*/
public class EcsServiceRecommendedOptionProjectedMetric private constructor(builder: Builder) {
/**
* An array of objects that describe the projected metric.
*/
public val projectedMetrics: List? = builder.projectedMetrics
/**
* The recommended CPU size for the Amazon ECS service.
*/
public val recommendedCpuUnits: kotlin.Int = builder.recommendedCpuUnits
/**
* The recommended memory size for the Amazon ECS service.
*/
public val recommendedMemorySize: kotlin.Int = builder.recommendedMemorySize
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.computeoptimizer.model.EcsServiceRecommendedOptionProjectedMetric = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EcsServiceRecommendedOptionProjectedMetric(")
append("projectedMetrics=$projectedMetrics,")
append("recommendedCpuUnits=$recommendedCpuUnits,")
append("recommendedMemorySize=$recommendedMemorySize")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = projectedMetrics?.hashCode() ?: 0
result = 31 * result + (recommendedCpuUnits)
result = 31 * result + (recommendedMemorySize)
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 EcsServiceRecommendedOptionProjectedMetric
if (projectedMetrics != other.projectedMetrics) return false
if (recommendedCpuUnits != other.recommendedCpuUnits) return false
if (recommendedMemorySize != other.recommendedMemorySize) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.computeoptimizer.model.EcsServiceRecommendedOptionProjectedMetric = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An array of objects that describe the projected metric.
*/
public var projectedMetrics: List? = null
/**
* The recommended CPU size for the Amazon ECS service.
*/
public var recommendedCpuUnits: kotlin.Int = 0
/**
* The recommended memory size for the Amazon ECS service.
*/
public var recommendedMemorySize: kotlin.Int = 0
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.computeoptimizer.model.EcsServiceRecommendedOptionProjectedMetric) : this() {
this.projectedMetrics = x.projectedMetrics
this.recommendedCpuUnits = x.recommendedCpuUnits
this.recommendedMemorySize = x.recommendedMemorySize
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.computeoptimizer.model.EcsServiceRecommendedOptionProjectedMetric = EcsServiceRecommendedOptionProjectedMetric(this)
internal fun correctErrors(): Builder {
return this
}
}
}