commonMain.aws.sdk.kotlin.services.ecrpublic.model.LayerFailure.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ecrpublic-jvm Show documentation
Show all versions of ecrpublic-jvm Show documentation
The AWS SDK for Kotlin client for ECR PUBLIC
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ecrpublic.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* An object that represents an Amazon ECR image layer failure.
*/
public class LayerFailure private constructor(builder: Builder) {
/**
* The failure code that's associated with the failure.
*/
public val failureCode: aws.sdk.kotlin.services.ecrpublic.model.LayerFailureCode? = builder.failureCode
/**
* The reason for the failure.
*/
public val failureReason: kotlin.String? = builder.failureReason
/**
* The layer digest that's associated with the failure.
*/
public val layerDigest: kotlin.String? = builder.layerDigest
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ecrpublic.model.LayerFailure = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("LayerFailure(")
append("failureCode=$failureCode,")
append("failureReason=$failureReason,")
append("layerDigest=$layerDigest")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = failureCode?.hashCode() ?: 0
result = 31 * result + (failureReason?.hashCode() ?: 0)
result = 31 * result + (layerDigest?.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 LayerFailure
if (failureCode != other.failureCode) return false
if (failureReason != other.failureReason) return false
if (layerDigest != other.layerDigest) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ecrpublic.model.LayerFailure = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The failure code that's associated with the failure.
*/
public var failureCode: aws.sdk.kotlin.services.ecrpublic.model.LayerFailureCode? = null
/**
* The reason for the failure.
*/
public var failureReason: kotlin.String? = null
/**
* The layer digest that's associated with the failure.
*/
public var layerDigest: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ecrpublic.model.LayerFailure) : this() {
this.failureCode = x.failureCode
this.failureReason = x.failureReason
this.layerDigest = x.layerDigest
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ecrpublic.model.LayerFailure = LayerFailure(this)
internal fun correctErrors(): Builder {
return this
}
}
}