All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.budgets.model.UpdateNotificationRequest.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.budgets.model



/**
 * Request of UpdateNotification
 */
public class UpdateNotificationRequest private constructor(builder: Builder) {
    /**
     * The `accountId` that is associated with the budget whose notification you want to update.
     */
    public val accountId: kotlin.String? = builder.accountId
    /**
     * The name of the budget whose notification you want to update.
     */
    public val budgetName: kotlin.String? = builder.budgetName
    /**
     * The updated notification to be associated with a budget.
     */
    public val newNotification: aws.sdk.kotlin.services.budgets.model.Notification? = builder.newNotification
    /**
     * The previous notification that is associated with a budget.
     */
    public val oldNotification: aws.sdk.kotlin.services.budgets.model.Notification? = builder.oldNotification

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.budgets.model.UpdateNotificationRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("UpdateNotificationRequest(")
        append("accountId=$accountId,")
        append("budgetName=$budgetName,")
        append("newNotification=$newNotification,")
        append("oldNotification=$oldNotification)")
    }

    override fun hashCode(): kotlin.Int {
        var result = accountId?.hashCode() ?: 0
        result = 31 * result + (budgetName?.hashCode() ?: 0)
        result = 31 * result + (newNotification?.hashCode() ?: 0)
        result = 31 * result + (oldNotification?.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 UpdateNotificationRequest

        if (accountId != other.accountId) return false
        if (budgetName != other.budgetName) return false
        if (newNotification != other.newNotification) return false
        if (oldNotification != other.oldNotification) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.budgets.model.UpdateNotificationRequest = Builder(this).apply(block).build()

    public class Builder {
        /**
         * The `accountId` that is associated with the budget whose notification you want to update.
         */
        public var accountId: kotlin.String? = null
        /**
         * The name of the budget whose notification you want to update.
         */
        public var budgetName: kotlin.String? = null
        /**
         * The updated notification to be associated with a budget.
         */
        public var newNotification: aws.sdk.kotlin.services.budgets.model.Notification? = null
        /**
         * The previous notification that is associated with a budget.
         */
        public var oldNotification: aws.sdk.kotlin.services.budgets.model.Notification? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.budgets.model.UpdateNotificationRequest) : this() {
            this.accountId = x.accountId
            this.budgetName = x.budgetName
            this.newNotification = x.newNotification
            this.oldNotification = x.oldNotification
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.budgets.model.UpdateNotificationRequest = UpdateNotificationRequest(this)

        /**
         * construct an [aws.sdk.kotlin.services.budgets.model.Notification] inside the given [block]
         */
        public fun newNotification(block: aws.sdk.kotlin.services.budgets.model.Notification.Builder.() -> kotlin.Unit) {
            this.newNotification = aws.sdk.kotlin.services.budgets.model.Notification.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.budgets.model.Notification] inside the given [block]
         */
        public fun oldNotification(block: aws.sdk.kotlin.services.budgets.model.Notification.Builder.() -> kotlin.Unit) {
            this.oldNotification = aws.sdk.kotlin.services.budgets.model.Notification.invoke(block)
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy