
commonMain.aws.sdk.kotlin.services.ssm.model.ResourcePolicyLimitExceededException.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ssm.model
import aws.smithy.kotlin.runtime.ServiceErrorMetadata
/**
* The PutResourcePolicy API action enforces two limits. A policy can't be greater than 1024 bytes in size. And only one policy can be attached to `OpsItemGroup`. Verify these limits and try again.
*/
public class ResourcePolicyLimitExceededException private constructor(builder: Builder) : SsmException(builder.message) {
public val limit: kotlin.Int = builder.limit
public val limitType: kotlin.String? = builder.limitType
init {
sdkErrorMetadata.attributes[ServiceErrorMetadata.ErrorType] = ErrorType.Client
}
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssm.model.ResourcePolicyLimitExceededException = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ResourcePolicyLimitExceededException(")
append("limit=$limit,")
append("limitType=$limitType,")
append("message=$message")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = limit
result = 31 * result + (limitType?.hashCode() ?: 0)
result = 31 * result + (message?.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 ResourcePolicyLimitExceededException
if (limit != other.limit) return false
if (limitType != other.limitType) return false
if (message != other.message) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssm.model.ResourcePolicyLimitExceededException = Builder(this).apply(block).build()
public class Builder {
public var limit: kotlin.Int = 0
public var limitType: kotlin.String? = null
public var message: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssm.model.ResourcePolicyLimitExceededException) : this() {
this.limit = x.limit
this.limitType = x.limitType
this.message = x.message
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssm.model.ResourcePolicyLimitExceededException = ResourcePolicyLimitExceededException(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy