All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.ecrpublic.model.LayerFailure.kt Maven / Gradle / Ivy

There is a newer version: 1.3.35
Show newest version
// 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
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy