
commonMain.aws.sdk.kotlin.services.ecrpublic.model.Layer.kt Maven / Gradle / Ivy
// 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.
*/
public class Layer private constructor(builder: Builder) {
/**
* The availability status of the image layer.
*/
public val layerAvailability: aws.sdk.kotlin.services.ecrpublic.model.LayerAvailability? = builder.layerAvailability
/**
* The `sha256` digest of the image layer.
*/
public val layerDigest: kotlin.String? = builder.layerDigest
/**
* The size, in bytes, of the image layer.
*/
public val layerSize: kotlin.Long? = builder.layerSize
/**
* The media type of the layer, such as `application/vnd.docker.image.rootfs.diff.tar.gzip` or `application/vnd.oci.image.layer.v1.tar+gzip`.
*/
public val mediaType: kotlin.String? = builder.mediaType
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ecrpublic.model.Layer = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Layer(")
append("layerAvailability=$layerAvailability,")
append("layerDigest=$layerDigest,")
append("layerSize=$layerSize,")
append("mediaType=$mediaType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = layerAvailability?.hashCode() ?: 0
result = 31 * result + (layerDigest?.hashCode() ?: 0)
result = 31 * result + (layerSize?.hashCode() ?: 0)
result = 31 * result + (mediaType?.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 Layer
if (layerAvailability != other.layerAvailability) return false
if (layerDigest != other.layerDigest) return false
if (layerSize != other.layerSize) return false
if (mediaType != other.mediaType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ecrpublic.model.Layer = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The availability status of the image layer.
*/
public var layerAvailability: aws.sdk.kotlin.services.ecrpublic.model.LayerAvailability? = null
/**
* The `sha256` digest of the image layer.
*/
public var layerDigest: kotlin.String? = null
/**
* The size, in bytes, of the image layer.
*/
public var layerSize: kotlin.Long? = null
/**
* The media type of the layer, such as `application/vnd.docker.image.rootfs.diff.tar.gzip` or `application/vnd.oci.image.layer.v1.tar+gzip`.
*/
public var mediaType: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ecrpublic.model.Layer) : this() {
this.layerAvailability = x.layerAvailability
this.layerDigest = x.layerDigest
this.layerSize = x.layerSize
this.mediaType = x.mediaType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ecrpublic.model.Layer = Layer(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy