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

commonMain.aws.sdk.kotlin.services.codeartifact.model.DescribePackageVersionResponse.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 DescribePackageVersionResponse private constructor(builder: Builder) {
    /**
     * A [PackageVersionDescription](https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageVersionDescription.html) object that contains information about the requested package version.
     */
    public val packageVersion: aws.sdk.kotlin.services.codeartifact.model.PackageVersionDescription? = builder.packageVersion

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

    override fun toString(): kotlin.String = buildString {
        append("DescribePackageVersionResponse(")
        append("packageVersion=$packageVersion")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = packageVersion?.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 DescribePackageVersionResponse

        if (packageVersion != other.packageVersion) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A [PackageVersionDescription](https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageVersionDescription.html) object that contains information about the requested package version.
         */
        public var packageVersion: aws.sdk.kotlin.services.codeartifact.model.PackageVersionDescription? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codeartifact.model.DescribePackageVersionResponse) : this() {
            this.packageVersion = x.packageVersion
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.codeartifact.model.PackageVersionDescription] inside the given [block]
         */
        public fun packageVersion(block: aws.sdk.kotlin.services.codeartifact.model.PackageVersionDescription.Builder.() -> kotlin.Unit) {
            this.packageVersion = aws.sdk.kotlin.services.codeartifact.model.PackageVersionDescription.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy