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

commonMain.aws.sdk.kotlin.services.ecr.model.ImageIdentifier.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.ecr.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * An object with identifying information for an image in an Amazon ECR repository.
 */
public class ImageIdentifier private constructor(builder: Builder) {
    /**
     * The `sha256` digest of the image manifest.
     */
    public val imageDigest: kotlin.String? = builder.imageDigest
    /**
     * The tag used for the image.
     */
    public val imageTag: kotlin.String? = builder.imageTag

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ecr.model.ImageIdentifier = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("ImageIdentifier(")
        append("imageDigest=$imageDigest,")
        append("imageTag=$imageTag")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = imageDigest?.hashCode() ?: 0
        result = 31 * result + (imageTag?.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 ImageIdentifier

        if (imageDigest != other.imageDigest) return false
        if (imageTag != other.imageTag) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ecr.model.ImageIdentifier = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The `sha256` digest of the image manifest.
         */
        public var imageDigest: kotlin.String? = null
        /**
         * The tag used for the image.
         */
        public var imageTag: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ecr.model.ImageIdentifier) : this() {
            this.imageDigest = x.imageDigest
            this.imageTag = x.imageTag
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.ecr.model.ImageIdentifier = ImageIdentifier(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy