commonMain.aws.sdk.kotlin.services.deadline.model.BudgetActionToRemove.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deadline-jvm Show documentation
Show all versions of deadline-jvm Show documentation
The AWS SDK for Kotlin client for deadline
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.deadline.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The budget action to remove.
*/
public class BudgetActionToRemove private constructor(builder: Builder) {
/**
* The percentage threshold for the budget action to remove.
*/
public val thresholdPercentage: kotlin.Float = requireNotNull(builder.thresholdPercentage) { "A non-null value must be provided for thresholdPercentage" }
/**
* The type of budget action to remove.
*/
public val type: aws.sdk.kotlin.services.deadline.model.BudgetActionType = requireNotNull(builder.type) { "A non-null value must be provided for type" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.deadline.model.BudgetActionToRemove = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("BudgetActionToRemove(")
append("thresholdPercentage=$thresholdPercentage,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = thresholdPercentage.hashCode()
result = 31 * result + (type.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 BudgetActionToRemove
if (!(thresholdPercentage?.equals(other.thresholdPercentage) ?: (other.thresholdPercentage == null))) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.deadline.model.BudgetActionToRemove = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The percentage threshold for the budget action to remove.
*/
public var thresholdPercentage: kotlin.Float? = null
/**
* The type of budget action to remove.
*/
public var type: aws.sdk.kotlin.services.deadline.model.BudgetActionType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.deadline.model.BudgetActionToRemove) : this() {
this.thresholdPercentage = x.thresholdPercentage
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.deadline.model.BudgetActionToRemove = BudgetActionToRemove(this)
internal fun correctErrors(): Builder {
if (thresholdPercentage == null) thresholdPercentage = 0f
if (type == null) type = BudgetActionType.SdkUnknown("no value provided")
return this
}
}
}