
commonMain.aws.sdk.kotlin.services.codeartifact.model.PackageOriginConfiguration.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
/**
* Details about the package origin configuration of a package.
*/
public class PackageOriginConfiguration private constructor(builder: Builder) {
/**
* A `PackageOriginRestrictions` object that contains information about the upstream and publish package origin configuration for the package.
*/
public val restrictions: aws.sdk.kotlin.services.codeartifact.model.PackageOriginRestrictions? = builder.restrictions
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codeartifact.model.PackageOriginConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PackageOriginConfiguration(")
append("restrictions=$restrictions")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = restrictions?.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 PackageOriginConfiguration
if (restrictions != other.restrictions) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codeartifact.model.PackageOriginConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A `PackageOriginRestrictions` object that contains information about the upstream and publish package origin configuration for the package.
*/
public var restrictions: aws.sdk.kotlin.services.codeartifact.model.PackageOriginRestrictions? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codeartifact.model.PackageOriginConfiguration) : this() {
this.restrictions = x.restrictions
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codeartifact.model.PackageOriginConfiguration = PackageOriginConfiguration(this)
/**
* construct an [aws.sdk.kotlin.services.codeartifact.model.PackageOriginRestrictions] inside the given [block]
*/
public fun restrictions(block: aws.sdk.kotlin.services.codeartifact.model.PackageOriginRestrictions.Builder.() -> kotlin.Unit) {
this.restrictions = aws.sdk.kotlin.services.codeartifact.model.PackageOriginRestrictions.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy