commonMain.aws.sdk.kotlin.services.redshift.model.SnapshotErrorMessage.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redshift-jvm Show documentation
Show all versions of redshift-jvm Show documentation
The AWS SDK for Kotlin client for Redshift
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.redshift.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Describes the errors returned by a snapshot.
*/
public class SnapshotErrorMessage private constructor(builder: Builder) {
/**
* The failure code for the error.
*/
public val failureCode: kotlin.String? = builder.failureCode
/**
* The text message describing the error.
*/
public val failureReason: kotlin.String? = builder.failureReason
/**
* A unique identifier for the cluster.
*/
public val snapshotClusterIdentifier: kotlin.String? = builder.snapshotClusterIdentifier
/**
* A unique identifier for the snapshot returning the error.
*/
public val snapshotIdentifier: kotlin.String? = builder.snapshotIdentifier
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.redshift.model.SnapshotErrorMessage = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SnapshotErrorMessage(")
append("failureCode=$failureCode,")
append("failureReason=$failureReason,")
append("snapshotClusterIdentifier=$snapshotClusterIdentifier,")
append("snapshotIdentifier=$snapshotIdentifier")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = failureCode?.hashCode() ?: 0
result = 31 * result + (failureReason?.hashCode() ?: 0)
result = 31 * result + (snapshotClusterIdentifier?.hashCode() ?: 0)
result = 31 * result + (snapshotIdentifier?.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 SnapshotErrorMessage
if (failureCode != other.failureCode) return false
if (failureReason != other.failureReason) return false
if (snapshotClusterIdentifier != other.snapshotClusterIdentifier) return false
if (snapshotIdentifier != other.snapshotIdentifier) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.redshift.model.SnapshotErrorMessage = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The failure code for the error.
*/
public var failureCode: kotlin.String? = null
/**
* The text message describing the error.
*/
public var failureReason: kotlin.String? = null
/**
* A unique identifier for the cluster.
*/
public var snapshotClusterIdentifier: kotlin.String? = null
/**
* A unique identifier for the snapshot returning the error.
*/
public var snapshotIdentifier: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.redshift.model.SnapshotErrorMessage) : this() {
this.failureCode = x.failureCode
this.failureReason = x.failureReason
this.snapshotClusterIdentifier = x.snapshotClusterIdentifier
this.snapshotIdentifier = x.snapshotIdentifier
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.redshift.model.SnapshotErrorMessage = SnapshotErrorMessage(this)
internal fun correctErrors(): Builder {
return this
}
}
}