
commonMain.aws.sdk.kotlin.services.budgets.model.CreateNotificationRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.budgets.model
/**
* Request of CreateNotification
*/
public class CreateNotificationRequest private constructor(builder: Builder) {
/**
* The `accountId` that is associated with the budget that you want to create a notification for.
*/
public val accountId: kotlin.String? = builder.accountId
/**
* The name of the budget that you want Amazon Web Services to notify you about. Budget names must be unique within an account.
*/
public val budgetName: kotlin.String? = builder.budgetName
/**
* The notification that you want to create.
*/
public val notification: aws.sdk.kotlin.services.budgets.model.Notification? = builder.notification
/**
* A list of subscribers that you want to associate with the notification. Each notification can have one SNS subscriber and up to 10 email subscribers.
*/
public val subscribers: List? = builder.subscribers
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.budgets.model.CreateNotificationRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateNotificationRequest(")
append("accountId=$accountId,")
append("budgetName=$budgetName,")
append("notification=$notification,")
append("subscribers=$subscribers)")
}
override fun hashCode(): kotlin.Int {
var result = accountId?.hashCode() ?: 0
result = 31 * result + (budgetName?.hashCode() ?: 0)
result = 31 * result + (notification?.hashCode() ?: 0)
result = 31 * result + (subscribers?.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 CreateNotificationRequest
if (accountId != other.accountId) return false
if (budgetName != other.budgetName) return false
if (notification != other.notification) return false
if (subscribers != other.subscribers) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.budgets.model.CreateNotificationRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The `accountId` that is associated with the budget that you want to create a notification for.
*/
public var accountId: kotlin.String? = null
/**
* The name of the budget that you want Amazon Web Services to notify you about. Budget names must be unique within an account.
*/
public var budgetName: kotlin.String? = null
/**
* The notification that you want to create.
*/
public var notification: aws.sdk.kotlin.services.budgets.model.Notification? = null
/**
* A list of subscribers that you want to associate with the notification. Each notification can have one SNS subscriber and up to 10 email subscribers.
*/
public var subscribers: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.budgets.model.CreateNotificationRequest) : this() {
this.accountId = x.accountId
this.budgetName = x.budgetName
this.notification = x.notification
this.subscribers = x.subscribers
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.budgets.model.CreateNotificationRequest = CreateNotificationRequest(this)
/**
* 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)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy