commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.AccountLimit.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pinpointsmsvoicev2-jvm Show documentation
Show all versions of pinpointsmsvoicev2-jvm Show documentation
The AWS SDK for Kotlin client for Pinpoint SMS Voice V2
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.pinpointsmsvoicev2.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The current resource quotas associated with an Amazon Web Services account.
*/
public class AccountLimit private constructor(builder: Builder) {
/**
* The Amazon Web Services set limit for that resource type, in US dollars.
*/
public val max: kotlin.Long = builder.max
/**
* The name of the attribute to apply the account limit to.
*/
public val name: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.AccountLimitName = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* The current amount that has been spent, in US dollars.
*/
public val used: kotlin.Long = builder.used
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.AccountLimit = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AccountLimit(")
append("max=$max,")
append("name=$name,")
append("used=$used")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = max.hashCode()
result = 31 * result + (name.hashCode())
result = 31 * result + (used.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 AccountLimit
if (max != other.max) return false
if (name != other.name) return false
if (used != other.used) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.AccountLimit = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Web Services set limit for that resource type, in US dollars.
*/
public var max: kotlin.Long = 0L
/**
* The name of the attribute to apply the account limit to.
*/
public var name: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.AccountLimitName? = null
/**
* The current amount that has been spent, in US dollars.
*/
public var used: kotlin.Long = 0L
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.AccountLimit) : this() {
this.max = x.max
this.name = x.name
this.used = x.used
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.AccountLimit = AccountLimit(this)
internal fun correctErrors(): Builder {
if (name == null) name = AccountLimitName.SdkUnknown("no value provided")
return this
}
}
}