commonMain.aws.sdk.kotlin.services.codeartifact.model.GetAssociatedPackageGroupResponse.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
public class GetAssociatedPackageGroupResponse private constructor(builder: Builder) {
/**
* Describes the strength of the association between the package and package group. A strong match is also known as an exact match, and a weak match is known as a relative match.
*/
public val associationType: aws.sdk.kotlin.services.codeartifact.model.PackageGroupAssociationType? = builder.associationType
/**
* The package group that is associated with the requested package.
*/
public val packageGroup: aws.sdk.kotlin.services.codeartifact.model.PackageGroupDescription? = builder.packageGroup
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codeartifact.model.GetAssociatedPackageGroupResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetAssociatedPackageGroupResponse(")
append("associationType=$associationType,")
append("packageGroup=$packageGroup")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = associationType?.hashCode() ?: 0
result = 31 * result + (packageGroup?.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 GetAssociatedPackageGroupResponse
if (associationType != other.associationType) return false
if (packageGroup != other.packageGroup) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codeartifact.model.GetAssociatedPackageGroupResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Describes the strength of the association between the package and package group. A strong match is also known as an exact match, and a weak match is known as a relative match.
*/
public var associationType: aws.sdk.kotlin.services.codeartifact.model.PackageGroupAssociationType? = null
/**
* The package group that is associated with the requested package.
*/
public var packageGroup: aws.sdk.kotlin.services.codeartifact.model.PackageGroupDescription? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codeartifact.model.GetAssociatedPackageGroupResponse) : this() {
this.associationType = x.associationType
this.packageGroup = x.packageGroup
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codeartifact.model.GetAssociatedPackageGroupResponse = GetAssociatedPackageGroupResponse(this)
/**
* construct an [aws.sdk.kotlin.services.codeartifact.model.PackageGroupDescription] inside the given [block]
*/
public fun packageGroup(block: aws.sdk.kotlin.services.codeartifact.model.PackageGroupDescription.Builder.() -> kotlin.Unit) {
this.packageGroup = aws.sdk.kotlin.services.codeartifact.model.PackageGroupDescription.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}