commonMain.aws.sdk.kotlin.services.dataexchange.model.ServiceLimitExceededException.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dataexchange-jvm Show documentation
Show all versions of dataexchange-jvm Show documentation
The AWS Kotlin client for DataExchange
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.dataexchange.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.ServiceErrorMetadata
/**
* The request has exceeded the quotas imposed by the service.
*/
public class ServiceLimitExceededException private constructor(builder: Builder) : DataExchangeException(builder.message) {
/**
* The name of the limit that was reached.
*/
public val limitName: aws.sdk.kotlin.services.dataexchange.model.LimitName? = builder.limitName
/**
* The value of the exceeded limit.
*/
public val limitValue: kotlin.Double = builder.limitValue
init {
sdkErrorMetadata.attributes[ServiceErrorMetadata.ErrorType] = ErrorType.Client
}
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.dataexchange.model.ServiceLimitExceededException = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ServiceLimitExceededException(")
append("limitName=$limitName,")
append("limitValue=$limitValue,")
append("message=$message")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = limitName?.hashCode() ?: 0
result = 31 * result + (limitValue.hashCode())
result = 31 * result + (message.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 ServiceLimitExceededException
if (limitName != other.limitName) return false
if (!(limitValue?.equals(other.limitValue) ?: (other.limitValue == null))) return false
if (message != other.message) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.dataexchange.model.ServiceLimitExceededException = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the limit that was reached.
*/
public var limitName: aws.sdk.kotlin.services.dataexchange.model.LimitName? = null
/**
* The value of the exceeded limit.
*/
public var limitValue: kotlin.Double = 0.0
/**
* The request has exceeded the quotas imposed by the service.
*/
public var message: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.dataexchange.model.ServiceLimitExceededException) : this() {
this.limitName = x.limitName
this.limitValue = x.limitValue
this.message = x.message
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.dataexchange.model.ServiceLimitExceededException = ServiceLimitExceededException(this)
internal fun correctErrors(): Builder {
if (message == null) message = ""
return this
}
}
}