commonMain.aws.sdk.kotlin.services.route53recoverycluster.model.ServiceLimitExceededException.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of route53recoverycluster-jvm Show documentation
Show all versions of route53recoverycluster-jvm Show documentation
The AWS Kotlin client for Route53 Recovery Cluster
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.route53recoverycluster.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.ServiceErrorMetadata
/**
* The request can't update that many routing control states at the same time. Try again with fewer routing control states.
*/
public class ServiceLimitExceededException private constructor(builder: Builder) : Route53RecoveryClusterException(builder.message) {
/**
* The code of the limit that was exceeded.
*/
public val limitCode: kotlin.String = requireNotNull(builder.limitCode) { "A non-null value must be provided for limitCode" }
/**
* The resource identifier of the limit that was exceeded.
*/
public val resourceId: kotlin.String? = builder.resourceId
/**
* The resource type of the limit that was exceeded.
*/
public val resourceType: kotlin.String? = builder.resourceType
/**
* The service code of the limit that was exceeded.
*/
public val serviceCode: kotlin.String = requireNotNull(builder.serviceCode) { "A non-null value must be provided for serviceCode" }
init {
sdkErrorMetadata.attributes[ServiceErrorMetadata.ErrorType] = ErrorType.Client
}
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.route53recoverycluster.model.ServiceLimitExceededException = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ServiceLimitExceededException(")
append("limitCode=$limitCode,")
append("message=$message,")
append("resourceId=$resourceId,")
append("resourceType=$resourceType,")
append("serviceCode=$serviceCode")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = limitCode.hashCode()
result = 31 * result + (message.hashCode())
result = 31 * result + (resourceId?.hashCode() ?: 0)
result = 31 * result + (resourceType?.hashCode() ?: 0)
result = 31 * result + (serviceCode.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 (limitCode != other.limitCode) return false
if (message != other.message) return false
if (resourceId != other.resourceId) return false
if (resourceType != other.resourceType) return false
if (serviceCode != other.serviceCode) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.route53recoverycluster.model.ServiceLimitExceededException = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The code of the limit that was exceeded.
*/
public var limitCode: kotlin.String? = null
public var message: kotlin.String? = null
/**
* The resource identifier of the limit that was exceeded.
*/
public var resourceId: kotlin.String? = null
/**
* The resource type of the limit that was exceeded.
*/
public var resourceType: kotlin.String? = null
/**
* The service code of the limit that was exceeded.
*/
public var serviceCode: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.route53recoverycluster.model.ServiceLimitExceededException) : this() {
this.limitCode = x.limitCode
this.message = x.message
this.resourceId = x.resourceId
this.resourceType = x.resourceType
this.serviceCode = x.serviceCode
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.route53recoverycluster.model.ServiceLimitExceededException = ServiceLimitExceededException(this)
internal fun correctErrors(): Builder {
if (limitCode == null) limitCode = ""
if (message == null) message = ""
if (serviceCode == null) serviceCode = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy