commonMain.aws.sdk.kotlin.services.computeoptimizer.model.EffectivePreferredResource.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 effective preferred resources that Compute Optimizer considers as rightsizing recommendation candidates.
*
* Compute Optimizer only supports Amazon EC2 instance types.
*/
public class EffectivePreferredResource private constructor(builder: Builder) {
/**
* The expanded version of your preferred resource's include list.
*/
public val effectiveIncludeList: List? = builder.effectiveIncludeList
/**
* The list of preferred resources values that you want excluded from rightsizing recommendation candidates.
*/
public val excludeList: List? = builder.excludeList
/**
* The list of preferred resource values that you want considered as rightsizing recommendation candidates.
*/
public val includeList: List? = builder.includeList
/**
* The name of the preferred resource list.
*/
public val name: aws.sdk.kotlin.services.computeoptimizer.model.PreferredResourceName? = builder.name
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.computeoptimizer.model.EffectivePreferredResource = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EffectivePreferredResource(")
append("effectiveIncludeList=$effectiveIncludeList,")
append("excludeList=$excludeList,")
append("includeList=$includeList,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = effectiveIncludeList?.hashCode() ?: 0
result = 31 * result + (excludeList?.hashCode() ?: 0)
result = 31 * result + (includeList?.hashCode() ?: 0)
result = 31 * result + (name?.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 EffectivePreferredResource
if (effectiveIncludeList != other.effectiveIncludeList) return false
if (excludeList != other.excludeList) return false
if (includeList != other.includeList) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.computeoptimizer.model.EffectivePreferredResource = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The expanded version of your preferred resource's include list.
*/
public var effectiveIncludeList: List? = null
/**
* The list of preferred resources values that you want excluded from rightsizing recommendation candidates.
*/
public var excludeList: List? = null
/**
* The list of preferred resource values that you want considered as rightsizing recommendation candidates.
*/
public var includeList: List? = null
/**
* The name of the preferred resource list.
*/
public var name: aws.sdk.kotlin.services.computeoptimizer.model.PreferredResourceName? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.computeoptimizer.model.EffectivePreferredResource) : this() {
this.effectiveIncludeList = x.effectiveIncludeList
this.excludeList = x.excludeList
this.includeList = x.includeList
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.computeoptimizer.model.EffectivePreferredResource = EffectivePreferredResource(this)
internal fun correctErrors(): Builder {
return this
}
}
}