commonMain.aws.sdk.kotlin.services.glacier.model.PolicyEnforcedException.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glacier-jvm Show documentation
Show all versions of glacier-jvm Show documentation
The AWS Kotlin client for Glacier
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glacier.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.ServiceErrorMetadata
/**
* Returned if a retrieval job would exceed the current data policy's retrieval rate limit. For more information about data retrieval policies,
*/
public class PolicyEnforcedException private constructor(builder: Builder) : GlacierException(builder.message) {
/**
* PolicyEnforcedException
*/
public val code: kotlin.String? = builder.code
/**
* Client
*/
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.glacier.model.PolicyEnforcedException = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PolicyEnforcedException(")
append("code=$code,")
append("message=$message,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = code?.hashCode() ?: 0
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 PolicyEnforcedException
if (code != other.code) 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.glacier.model.PolicyEnforcedException = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* PolicyEnforcedException
*/
public var code: kotlin.String? = null
/**
* InitiateJob request denied by current data retrieval policy.
*/
public var message: kotlin.String? = null
/**
* Client
*/
public var type: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glacier.model.PolicyEnforcedException) : this() {
this.code = x.code
this.message = x.message
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glacier.model.PolicyEnforcedException = PolicyEnforcedException(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy