commonMain.aws.sdk.kotlin.services.codeartifact.model.PublishPackageVersionResponse.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
The 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 PublishPackageVersionResponse private constructor(builder: Builder) {
/**
* An [AssetSummary](https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_AssetSummary.html) for the published asset.
*/
public val asset: aws.sdk.kotlin.services.codeartifact.model.AssetSummary? = builder.asset
/**
* The format of the package version.
*/
public val format: aws.sdk.kotlin.services.codeartifact.model.PackageFormat? = builder.format
/**
* The namespace of the package version.
*/
public val namespace: kotlin.String? = builder.namespace
/**
* The name of the package.
*/
public val `package`: kotlin.String? = builder.`package`
/**
* A string that contains the status of the package version. For more information, see [Package version status](https://docs.aws.amazon.com/codeartifact/latest/ug/packages-overview.html#package-version-status.html#package-version-status) in the *CodeArtifact User Guide*.
*/
public val status: aws.sdk.kotlin.services.codeartifact.model.PackageVersionStatus? = builder.status
/**
* The version of the package.
*/
public val version: kotlin.String? = builder.version
/**
* The revision of the package version.
*/
public val versionRevision: kotlin.String? = builder.versionRevision
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codeartifact.model.PublishPackageVersionResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PublishPackageVersionResponse(")
append("asset=$asset,")
append("format=$format,")
append("namespace=$namespace,")
append("package=$`package`,")
append("status=$status,")
append("version=$version,")
append("versionRevision=$versionRevision")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = asset?.hashCode() ?: 0
result = 31 * result + (format?.hashCode() ?: 0)
result = 31 * result + (namespace?.hashCode() ?: 0)
result = 31 * result + (`package`?.hashCode() ?: 0)
result = 31 * result + (status?.hashCode() ?: 0)
result = 31 * result + (version?.hashCode() ?: 0)
result = 31 * result + (versionRevision?.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 PublishPackageVersionResponse
if (asset != other.asset) return false
if (format != other.format) return false
if (namespace != other.namespace) return false
if (`package` != other.`package`) return false
if (status != other.status) return false
if (version != other.version) return false
if (versionRevision != other.versionRevision) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codeartifact.model.PublishPackageVersionResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An [AssetSummary](https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_AssetSummary.html) for the published asset.
*/
public var asset: aws.sdk.kotlin.services.codeartifact.model.AssetSummary? = null
/**
* The format of the package version.
*/
public var format: aws.sdk.kotlin.services.codeartifact.model.PackageFormat? = null
/**
* The namespace of the package version.
*/
public var namespace: kotlin.String? = null
/**
* The name of the package.
*/
public var `package`: kotlin.String? = null
/**
* A string that contains the status of the package version. For more information, see [Package version status](https://docs.aws.amazon.com/codeartifact/latest/ug/packages-overview.html#package-version-status.html#package-version-status) in the *CodeArtifact User Guide*.
*/
public var status: aws.sdk.kotlin.services.codeartifact.model.PackageVersionStatus? = null
/**
* The version of the package.
*/
public var version: kotlin.String? = null
/**
* The revision of the package version.
*/
public var versionRevision: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codeartifact.model.PublishPackageVersionResponse) : this() {
this.asset = x.asset
this.format = x.format
this.namespace = x.namespace
this.`package` = x.`package`
this.status = x.status
this.version = x.version
this.versionRevision = x.versionRevision
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codeartifact.model.PublishPackageVersionResponse = PublishPackageVersionResponse(this)
/**
* construct an [aws.sdk.kotlin.services.codeartifact.model.AssetSummary] inside the given [block]
*/
public fun asset(block: aws.sdk.kotlin.services.codeartifact.model.AssetSummary.Builder.() -> kotlin.Unit) {
this.asset = aws.sdk.kotlin.services.codeartifact.model.AssetSummary.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}