commonMain.aws.sdk.kotlin.services.codeartifact.model.PackageVersionOrigin.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
/**
* Information about how a package version was added to a repository.
*/
public class PackageVersionOrigin private constructor(builder: Builder) {
/**
* A [DomainEntryPoint](https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_DomainEntryPoint.html) object that contains information about from which repository or external connection the package version was added to the domain.
*/
public val domainEntryPoint: aws.sdk.kotlin.services.codeartifact.model.DomainEntryPoint? = builder.domainEntryPoint
/**
* Describes how the package version was originally added to the domain. An `INTERNAL` origin type means the package version was published directly to a repository in the domain. An `EXTERNAL` origin type means the package version was ingested from an external connection.
*/
public val originType: aws.sdk.kotlin.services.codeartifact.model.PackageVersionOriginType? = builder.originType
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codeartifact.model.PackageVersionOrigin = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PackageVersionOrigin(")
append("domainEntryPoint=$domainEntryPoint,")
append("originType=$originType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = domainEntryPoint?.hashCode() ?: 0
result = 31 * result + (originType?.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 PackageVersionOrigin
if (domainEntryPoint != other.domainEntryPoint) return false
if (originType != other.originType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codeartifact.model.PackageVersionOrigin = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A [DomainEntryPoint](https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_DomainEntryPoint.html) object that contains information about from which repository or external connection the package version was added to the domain.
*/
public var domainEntryPoint: aws.sdk.kotlin.services.codeartifact.model.DomainEntryPoint? = null
/**
* Describes how the package version was originally added to the domain. An `INTERNAL` origin type means the package version was published directly to a repository in the domain. An `EXTERNAL` origin type means the package version was ingested from an external connection.
*/
public var originType: aws.sdk.kotlin.services.codeartifact.model.PackageVersionOriginType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codeartifact.model.PackageVersionOrigin) : this() {
this.domainEntryPoint = x.domainEntryPoint
this.originType = x.originType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codeartifact.model.PackageVersionOrigin = PackageVersionOrigin(this)
/**
* construct an [aws.sdk.kotlin.services.codeartifact.model.DomainEntryPoint] inside the given [block]
*/
public fun domainEntryPoint(block: aws.sdk.kotlin.services.codeartifact.model.DomainEntryPoint.Builder.() -> kotlin.Unit) {
this.domainEntryPoint = aws.sdk.kotlin.services.codeartifact.model.DomainEntryPoint.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}