commonMain.aws.sdk.kotlin.services.codeartifact.model.RepositoryExternalConnectionInfo.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 information about the external connection of a repository.
*/
public class RepositoryExternalConnectionInfo private constructor(builder: Builder) {
/**
* The name of the external connection associated with a repository.
*/
public val externalConnectionName: kotlin.String? = builder.externalConnectionName
/**
* The package format associated with a repository's external connection. The valid package formats are:
* + `npm`: A Node Package Manager (npm) package.
* + `pypi`: A Python Package Index (PyPI) package.
* + `maven`: A Maven package that contains compiled code in a distributable format, such as a JAR file.
* + `nuget`: A NuGet package.
* + `generic`: A generic package.
* + `ruby`: A Ruby package.
* + `swift`: A Swift package.
* + `cargo`: A Cargo package.
*/
public val packageFormat: aws.sdk.kotlin.services.codeartifact.model.PackageFormat? = builder.packageFormat
/**
* The status of the external connection of a repository. There is one valid value, `Available`.
*/
public val status: aws.sdk.kotlin.services.codeartifact.model.ExternalConnectionStatus? = builder.status
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codeartifact.model.RepositoryExternalConnectionInfo = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RepositoryExternalConnectionInfo(")
append("externalConnectionName=$externalConnectionName,")
append("packageFormat=$packageFormat,")
append("status=$status")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = externalConnectionName?.hashCode() ?: 0
result = 31 * result + (packageFormat?.hashCode() ?: 0)
result = 31 * result + (status?.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 RepositoryExternalConnectionInfo
if (externalConnectionName != other.externalConnectionName) return false
if (packageFormat != other.packageFormat) return false
if (status != other.status) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codeartifact.model.RepositoryExternalConnectionInfo = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the external connection associated with a repository.
*/
public var externalConnectionName: kotlin.String? = null
/**
* The package format associated with a repository's external connection. The valid package formats are:
* + `npm`: A Node Package Manager (npm) package.
* + `pypi`: A Python Package Index (PyPI) package.
* + `maven`: A Maven package that contains compiled code in a distributable format, such as a JAR file.
* + `nuget`: A NuGet package.
* + `generic`: A generic package.
* + `ruby`: A Ruby package.
* + `swift`: A Swift package.
* + `cargo`: A Cargo package.
*/
public var packageFormat: aws.sdk.kotlin.services.codeartifact.model.PackageFormat? = null
/**
* The status of the external connection of a repository. There is one valid value, `Available`.
*/
public var status: aws.sdk.kotlin.services.codeartifact.model.ExternalConnectionStatus? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codeartifact.model.RepositoryExternalConnectionInfo) : this() {
this.externalConnectionName = x.externalConnectionName
this.packageFormat = x.packageFormat
this.status = x.status
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codeartifact.model.RepositoryExternalConnectionInfo = RepositoryExternalConnectionInfo(this)
internal fun correctErrors(): Builder {
return this
}
}
}