commonMain.aws.sdk.kotlin.services.shield.model.LimitsExceededException.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.shield.model
import aws.smithy.kotlin.runtime.ServiceErrorMetadata
/**
* Exception that indicates that the operation would exceed a limit.
*/
public class LimitsExceededException private constructor(builder: Builder) : ShieldException() {
/**
* The threshold that would be exceeded.
*/
public val limit: kotlin.Long = builder.limit
override val message: kotlin.String? = builder.message
/**
* The type of limit that would be exceeded.
*/
public val type: kotlin.String? = builder.type
init {
sdkErrorMetadata.attributes[ServiceErrorMetadata.ErrorType] = ErrorType.Client
}
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.shield.model.LimitsExceededException = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("LimitsExceededException(")
append("limit=$limit,")
append("message=$message,")
append("type=$type)")
}
override fun hashCode(): kotlin.Int {
var result = limit.hashCode()
result = 31 * result + (message?.hashCode() ?: 0)
result = 31 * result + (type?.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 LimitsExceededException
if (limit != other.limit) return false
if (message != other.message) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.shield.model.LimitsExceededException = Builder(this).apply(block).build()
public class Builder {
/**
* The threshold that would be exceeded.
*/
public var limit: kotlin.Long = 0L
public var message: kotlin.String? = null
/**
* The type of limit that would be exceeded.
*/
public var type: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.shield.model.LimitsExceededException) : this() {
this.limit = x.limit
this.message = x.message
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.shield.model.LimitsExceededException = LimitsExceededException(this)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy