commonMain.aws.sdk.kotlin.services.qldb.model.ResourcePreconditionNotMetException.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of qldb-jvm Show documentation
Show all versions of qldb-jvm Show documentation
The AWS SDK for Kotlin client for QLDB
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.qldb.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.ServiceErrorMetadata
/**
* The operation failed because a condition wasn't satisfied in advance.
*/
public class ResourcePreconditionNotMetException private constructor(builder: Builder) : QldbException(builder.message) {
/**
* The name of the resource.
*/
public val resourceName: kotlin.String? = builder.resourceName
/**
* The type of resource.
*/
public val resourceType: kotlin.String? = builder.resourceType
init {
sdkErrorMetadata.attributes[ServiceErrorMetadata.ErrorType] = ErrorType.Client
}
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.qldb.model.ResourcePreconditionNotMetException = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ResourcePreconditionNotMetException(")
append("message=$message,")
append("resourceName=$resourceName,")
append("resourceType=$resourceType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = message?.hashCode() ?: 0
result = 31 * result + (resourceName?.hashCode() ?: 0)
result = 31 * result + (resourceType?.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 ResourcePreconditionNotMetException
if (message != other.message) return false
if (resourceName != other.resourceName) return false
if (resourceType != other.resourceType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.qldb.model.ResourcePreconditionNotMetException = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
public var message: kotlin.String? = null
/**
* The name of the resource.
*/
public var resourceName: kotlin.String? = null
/**
* The type of resource.
*/
public var resourceType: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.qldb.model.ResourcePreconditionNotMetException) : this() {
this.message = x.message
this.resourceName = x.resourceName
this.resourceType = x.resourceType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.qldb.model.ResourcePreconditionNotMetException = ResourcePreconditionNotMetException(this)
internal fun correctErrors(): Builder {
return this
}
}
}