
commonMain.aws.sdk.kotlin.services.budgets.model.UpdateSubscriberRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.budgets.model
/**
* Request of UpdateSubscriber
*/
public class UpdateSubscriberRequest private constructor(builder: Builder) {
/**
* The `accountId` that is associated with the budget whose subscriber you want to update.
*/
public val accountId: kotlin.String? = builder.accountId
/**
* The name of the budget whose subscriber you want to update.
*/
public val budgetName: kotlin.String? = builder.budgetName
/**
* The updated subscriber that is associated with a budget notification.
*/
public val newSubscriber: aws.sdk.kotlin.services.budgets.model.Subscriber? = builder.newSubscriber
/**
* The notification whose subscriber you want to update.
*/
public val notification: aws.sdk.kotlin.services.budgets.model.Notification? = builder.notification
/**
* The previous subscriber that is associated with a budget notification.
*/
public val oldSubscriber: aws.sdk.kotlin.services.budgets.model.Subscriber? = builder.oldSubscriber
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.budgets.model.UpdateSubscriberRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateSubscriberRequest(")
append("accountId=$accountId,")
append("budgetName=$budgetName,")
append("newSubscriber=$newSubscriber,")
append("notification=$notification,")
append("oldSubscriber=$oldSubscriber)")
}
override fun hashCode(): kotlin.Int {
var result = accountId?.hashCode() ?: 0
result = 31 * result + (budgetName?.hashCode() ?: 0)
result = 31 * result + (newSubscriber?.hashCode() ?: 0)
result = 31 * result + (notification?.hashCode() ?: 0)
result = 31 * result + (oldSubscriber?.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 UpdateSubscriberRequest
if (accountId != other.accountId) return false
if (budgetName != other.budgetName) return false
if (newSubscriber != other.newSubscriber) return false
if (notification != other.notification) return false
if (oldSubscriber != other.oldSubscriber) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.budgets.model.UpdateSubscriberRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The `accountId` that is associated with the budget whose subscriber you want to update.
*/
public var accountId: kotlin.String? = null
/**
* The name of the budget whose subscriber you want to update.
*/
public var budgetName: kotlin.String? = null
/**
* The updated subscriber that is associated with a budget notification.
*/
public var newSubscriber: aws.sdk.kotlin.services.budgets.model.Subscriber? = null
/**
* The notification whose subscriber you want to update.
*/
public var notification: aws.sdk.kotlin.services.budgets.model.Notification? = null
/**
* The previous subscriber that is associated with a budget notification.
*/
public var oldSubscriber: aws.sdk.kotlin.services.budgets.model.Subscriber? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.budgets.model.UpdateSubscriberRequest) : this() {
this.accountId = x.accountId
this.budgetName = x.budgetName
this.newSubscriber = x.newSubscriber
this.notification = x.notification
this.oldSubscriber = x.oldSubscriber
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.budgets.model.UpdateSubscriberRequest = UpdateSubscriberRequest(this)
/**
* construct an [aws.sdk.kotlin.services.budgets.model.Subscriber] inside the given [block]
*/
public fun newSubscriber(block: aws.sdk.kotlin.services.budgets.model.Subscriber.Builder.() -> kotlin.Unit) {
this.newSubscriber = aws.sdk.kotlin.services.budgets.model.Subscriber.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.budgets.model.Notification] inside the given [block]
*/
public fun notification(block: aws.sdk.kotlin.services.budgets.model.Notification.Builder.() -> kotlin.Unit) {
this.notification = aws.sdk.kotlin.services.budgets.model.Notification.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.budgets.model.Subscriber] inside the given [block]
*/
public fun oldSubscriber(block: aws.sdk.kotlin.services.budgets.model.Subscriber.Builder.() -> kotlin.Unit) {
this.oldSubscriber = aws.sdk.kotlin.services.budgets.model.Subscriber.invoke(block)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy