commonMain.aws.sdk.kotlin.services.budgets.model.UpdateBudgetRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of budgets-jvm Show documentation
Show all versions of budgets-jvm Show documentation
The AWS SDK for Kotlin client for Budgets
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.budgets.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Request of UpdateBudget
*/
public class UpdateBudgetRequest private constructor(builder: Builder) {
/**
* The `accountId` that is associated with the budget that you want to update.
*/
public val accountId: kotlin.String? = builder.accountId
/**
* The budget that you want to update your budget to.
*/
public val newBudget: aws.sdk.kotlin.services.budgets.model.Budget? = builder.newBudget
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.budgets.model.UpdateBudgetRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateBudgetRequest(")
append("accountId=$accountId,")
append("newBudget=$newBudget")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = accountId?.hashCode() ?: 0
result = 31 * result + (newBudget?.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 UpdateBudgetRequest
if (accountId != other.accountId) return false
if (newBudget != other.newBudget) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.budgets.model.UpdateBudgetRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The `accountId` that is associated with the budget that you want to update.
*/
public var accountId: kotlin.String? = null
/**
* The budget that you want to update your budget to.
*/
public var newBudget: aws.sdk.kotlin.services.budgets.model.Budget? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.budgets.model.UpdateBudgetRequest) : this() {
this.accountId = x.accountId
this.newBudget = x.newBudget
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.budgets.model.UpdateBudgetRequest = UpdateBudgetRequest(this)
/**
* construct an [aws.sdk.kotlin.services.budgets.model.Budget] inside the given [block]
*/
public fun newBudget(block: aws.sdk.kotlin.services.budgets.model.Budget.Builder.() -> kotlin.Unit) {
this.newBudget = aws.sdk.kotlin.services.budgets.model.Budget.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}