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

commonMain.aws.sdk.kotlin.services.ecrpublic.model.CompleteLayerUploadRequest.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

public class CompleteLayerUploadRequest private constructor(builder: Builder) {
    /**
     * The `sha256` digest of the image layer.
     */
    public val layerDigests: List? = builder.layerDigests
    /**
     * The Amazon Web Services account ID, or registry alias, associated with the registry where layers are uploaded. If you do not specify a registry, the default public registry is assumed.
     */
    public val registryId: kotlin.String? = builder.registryId
    /**
     * The name of the repository in a public registry to associate with the image layer.
     */
    public val repositoryName: kotlin.String? = builder.repositoryName
    /**
     * The upload ID from a previous InitiateLayerUpload operation to associate with the image layer.
     */
    public val uploadId: kotlin.String? = builder.uploadId

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

    override fun toString(): kotlin.String = buildString {
        append("CompleteLayerUploadRequest(")
        append("layerDigests=$layerDigests,")
        append("registryId=$registryId,")
        append("repositoryName=$repositoryName,")
        append("uploadId=$uploadId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = layerDigests?.hashCode() ?: 0
        result = 31 * result + (registryId?.hashCode() ?: 0)
        result = 31 * result + (repositoryName?.hashCode() ?: 0)
        result = 31 * result + (uploadId?.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 CompleteLayerUploadRequest

        if (layerDigests != other.layerDigests) return false
        if (registryId != other.registryId) return false
        if (repositoryName != other.repositoryName) return false
        if (uploadId != other.uploadId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The `sha256` digest of the image layer.
         */
        public var layerDigests: List? = null
        /**
         * The Amazon Web Services account ID, or registry alias, associated with the registry where layers are uploaded. If you do not specify a registry, the default public registry is assumed.
         */
        public var registryId: kotlin.String? = null
        /**
         * The name of the repository in a public registry to associate with the image layer.
         */
        public var repositoryName: kotlin.String? = null
        /**
         * The upload ID from a previous InitiateLayerUpload operation to associate with the image layer.
         */
        public var uploadId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ecrpublic.model.CompleteLayerUploadRequest) : this() {
            this.layerDigests = x.layerDigests
            this.registryId = x.registryId
            this.repositoryName = x.repositoryName
            this.uploadId = x.uploadId
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy