
commonMain.aws.sdk.kotlin.services.codeartifact.model.AssetSummary.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codeartifact-jvm Show documentation
Show all versions of codeartifact-jvm Show documentation
The AWS SDK for Kotlin client for codeartifact
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codeartifact.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Contains details about a package version asset.
*/
public class AssetSummary private constructor(builder: Builder) {
/**
* The hashes of the asset.
*/
public val hashes: Map? = builder.hashes
/**
* The name of the asset.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* The size of the asset.
*/
public val size: kotlin.Long? = builder.size
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codeartifact.model.AssetSummary = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AssetSummary(")
append("hashes=$hashes,")
append("name=$name,")
append("size=$size")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = hashes?.hashCode() ?: 0
result = 31 * result + (name.hashCode())
result = 31 * result + (size?.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 AssetSummary
if (hashes != other.hashes) return false
if (name != other.name) return false
if (size != other.size) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codeartifact.model.AssetSummary = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The hashes of the asset.
*/
public var hashes: Map? = null
/**
* The name of the asset.
*/
public var name: kotlin.String? = null
/**
* The size of the asset.
*/
public var size: kotlin.Long? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codeartifact.model.AssetSummary) : this() {
this.hashes = x.hashes
this.name = x.name
this.size = x.size
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codeartifact.model.AssetSummary = AssetSummary(this)
internal fun correctErrors(): Builder {
if (name == null) name = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy