commonMain.aws.sdk.kotlin.services.computeoptimizer.model.EbsSavingsOpportunityAfterDiscounts.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 savings opportunity for Amazon EBS volume recommendations after applying specific discounts.
*/
public class EbsSavingsOpportunityAfterDiscounts private constructor(builder: Builder) {
/**
* The estimated monthly savings possible as a percentage of monthly cost by adopting Compute Optimizer’s Amazon EBS volume recommendations. This saving includes any applicable discounts.
*/
public val estimatedMonthlySavings: aws.sdk.kotlin.services.computeoptimizer.model.EbsEstimatedMonthlySavings? = builder.estimatedMonthlySavings
/**
* The estimated monthly savings possible as a percentage of monthly cost after applying the specific discounts. This saving can be achieved by adopting Compute Optimizer’s Amazon EBS volume recommendations.
*/
public val savingsOpportunityPercentage: kotlin.Double = builder.savingsOpportunityPercentage
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.computeoptimizer.model.EbsSavingsOpportunityAfterDiscounts = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EbsSavingsOpportunityAfterDiscounts(")
append("estimatedMonthlySavings=$estimatedMonthlySavings,")
append("savingsOpportunityPercentage=$savingsOpportunityPercentage")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = estimatedMonthlySavings?.hashCode() ?: 0
result = 31 * result + (savingsOpportunityPercentage.hashCode())
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 EbsSavingsOpportunityAfterDiscounts
if (estimatedMonthlySavings != other.estimatedMonthlySavings) return false
if (!(savingsOpportunityPercentage?.equals(other.savingsOpportunityPercentage) ?: (other.savingsOpportunityPercentage == null))) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.computeoptimizer.model.EbsSavingsOpportunityAfterDiscounts = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The estimated monthly savings possible as a percentage of monthly cost by adopting Compute Optimizer’s Amazon EBS volume recommendations. This saving includes any applicable discounts.
*/
public var estimatedMonthlySavings: aws.sdk.kotlin.services.computeoptimizer.model.EbsEstimatedMonthlySavings? = null
/**
* The estimated monthly savings possible as a percentage of monthly cost after applying the specific discounts. This saving can be achieved by adopting Compute Optimizer’s Amazon EBS volume recommendations.
*/
public var savingsOpportunityPercentage: kotlin.Double = 0.0
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.computeoptimizer.model.EbsSavingsOpportunityAfterDiscounts) : this() {
this.estimatedMonthlySavings = x.estimatedMonthlySavings
this.savingsOpportunityPercentage = x.savingsOpportunityPercentage
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.computeoptimizer.model.EbsSavingsOpportunityAfterDiscounts = EbsSavingsOpportunityAfterDiscounts(this)
/**
* construct an [aws.sdk.kotlin.services.computeoptimizer.model.EbsEstimatedMonthlySavings] inside the given [block]
*/
public fun estimatedMonthlySavings(block: aws.sdk.kotlin.services.computeoptimizer.model.EbsEstimatedMonthlySavings.Builder.() -> kotlin.Unit) {
this.estimatedMonthlySavings = aws.sdk.kotlin.services.computeoptimizer.model.EbsEstimatedMonthlySavings.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}