commonMain.aws.sdk.kotlin.services.codeartifact.model.AssociateExternalConnectionRequest.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 AssociateExternalConnectionRequest private constructor(builder: Builder) {
/**
* The name of the domain that contains the repository.
*/
public val domain: kotlin.String? = builder.domain
/**
* The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
*/
public val domainOwner: kotlin.String? = builder.domainOwner
/**
* The name of the external connection to add to the repository. The following values are supported:
* + `public:npmjs` - for the npm public repository.
* + `public:nuget-org` - for the NuGet Gallery.
* + `public:pypi` - for the Python Package Index.
* + `public:maven-central` - for Maven Central.
* + `public:maven-googleandroid` - for the Google Android repository.
* + `public:maven-gradleplugins` - for the Gradle plugins repository.
* + `public:maven-commonsware` - for the CommonsWare Android repository.
* + `public:maven-clojars` - for the Clojars repository.
* + `public:ruby-gems-org` - for RubyGems.org.
* + `public:crates-io` - for Crates.io.
*/
public val externalConnection: kotlin.String? = builder.externalConnection
/**
* The name of the repository to which the external connection is added.
*/
public val repository: kotlin.String? = builder.repository
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codeartifact.model.AssociateExternalConnectionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AssociateExternalConnectionRequest(")
append("domain=$domain,")
append("domainOwner=$domainOwner,")
append("externalConnection=$externalConnection,")
append("repository=$repository")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = domain?.hashCode() ?: 0
result = 31 * result + (domainOwner?.hashCode() ?: 0)
result = 31 * result + (externalConnection?.hashCode() ?: 0)
result = 31 * result + (repository?.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 AssociateExternalConnectionRequest
if (domain != other.domain) return false
if (domainOwner != other.domainOwner) return false
if (externalConnection != other.externalConnection) return false
if (repository != other.repository) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codeartifact.model.AssociateExternalConnectionRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the domain that contains the repository.
*/
public var domain: kotlin.String? = null
/**
* The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
*/
public var domainOwner: kotlin.String? = null
/**
* The name of the external connection to add to the repository. The following values are supported:
* + `public:npmjs` - for the npm public repository.
* + `public:nuget-org` - for the NuGet Gallery.
* + `public:pypi` - for the Python Package Index.
* + `public:maven-central` - for Maven Central.
* + `public:maven-googleandroid` - for the Google Android repository.
* + `public:maven-gradleplugins` - for the Gradle plugins repository.
* + `public:maven-commonsware` - for the CommonsWare Android repository.
* + `public:maven-clojars` - for the Clojars repository.
* + `public:ruby-gems-org` - for RubyGems.org.
* + `public:crates-io` - for Crates.io.
*/
public var externalConnection: kotlin.String? = null
/**
* The name of the repository to which the external connection is added.
*/
public var repository: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codeartifact.model.AssociateExternalConnectionRequest) : this() {
this.domain = x.domain
this.domainOwner = x.domainOwner
this.externalConnection = x.externalConnection
this.repository = x.repository
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codeartifact.model.AssociateExternalConnectionRequest = AssociateExternalConnectionRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}