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

commonMain.aws.sdk.kotlin.services.codeartifact.model.CopyPackageVersionsResponse.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.codeartifact.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CopyPackageVersionsResponse private constructor(builder: Builder) {
    /**
     * A map of package versions that failed to copy and their error codes. The possible error codes are in the `PackageVersionError` data type. They are:
     * + `ALREADY_EXISTS`
     * + `MISMATCHED_REVISION`
     * + `MISMATCHED_STATUS`
     * + `NOT_ALLOWED`
     * + `NOT_FOUND`
     * + `SKIPPED`
     */
    public val failedVersions: Map? = builder.failedVersions
    /**
     * A list of the package versions that were successfully copied to your repository.
     */
    public val successfulVersions: Map? = builder.successfulVersions

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

    override fun toString(): kotlin.String = buildString {
        append("CopyPackageVersionsResponse(")
        append("failedVersions=$failedVersions,")
        append("successfulVersions=$successfulVersions")
        append(")")
    }

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

        if (failedVersions != other.failedVersions) return false
        if (successfulVersions != other.successfulVersions) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A map of package versions that failed to copy and their error codes. The possible error codes are in the `PackageVersionError` data type. They are:
         * + `ALREADY_EXISTS`
         * + `MISMATCHED_REVISION`
         * + `MISMATCHED_STATUS`
         * + `NOT_ALLOWED`
         * + `NOT_FOUND`
         * + `SKIPPED`
         */
        public var failedVersions: Map? = null
        /**
         * A list of the package versions that were successfully copied to your repository.
         */
        public var successfulVersions: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codeartifact.model.CopyPackageVersionsResponse) : this() {
            this.failedVersions = x.failedVersions
            this.successfulVersions = x.successfulVersions
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy