
commonMain.aws.sdk.kotlin.services.mgn.model.InternalServerException.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.mgn.model
import aws.smithy.kotlin.runtime.ServiceErrorMetadata
/**
* The server encountered an unexpected condition that prevented it from fulfilling the request.
*/
class InternalServerException private constructor(builder: Builder) : MgnException() {
override val message: kotlin.String? = builder.message
/**
* The server encountered an unexpected condition that prevented it from fulfilling the request. The request will be retried again after x seconds.
*/
val retryAfterSeconds: kotlin.Long = builder.retryAfterSeconds
init {
sdkErrorMetadata.attributes[ServiceErrorMetadata.ErrorType] = ErrorType.Server
}
companion object {
operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.mgn.model.InternalServerException = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("InternalServerException(")
append("message=$message,")
append("retryAfterSeconds=$retryAfterSeconds)")
}
override fun hashCode(): kotlin.Int {
var result = message?.hashCode() ?: 0
result = 31 * result + (retryAfterSeconds.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 InternalServerException
if (message != other.message) return false
if (retryAfterSeconds != other.retryAfterSeconds) return false
return true
}
inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.mgn.model.InternalServerException = Builder(this).apply(block).build()
class Builder {
var message: kotlin.String? = null
/**
* The server encountered an unexpected condition that prevented it from fulfilling the request. The request will be retried again after x seconds.
*/
var retryAfterSeconds: kotlin.Long = 0L
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.mgn.model.InternalServerException) : this() {
this.message = x.message
this.retryAfterSeconds = x.retryAfterSeconds
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.mgn.model.InternalServerException = InternalServerException(this)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy