commonMain.aws.sdk.kotlin.services.proton.model.Repository.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proton-jvm Show documentation
Show all versions of proton-jvm Show documentation
The AWS SDK for Kotlin client for Proton
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.proton.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Detailed data of a linked repository—a repository that has been registered with Proton.
*/
public class Repository private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the linked repository.
*/
public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
/**
* The Amazon Resource Name (ARN) of your AWS CodeStar connection that connects Proton to your repository provider account.
*/
public val connectionArn: kotlin.String = requireNotNull(builder.connectionArn) { "A non-null value must be provided for connectionArn" }
/**
* Your customer Amazon Web Services KMS encryption key.
*/
public val encryptionKey: kotlin.String? = builder.encryptionKey
/**
* The repository name.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* The repository provider.
*/
public val provider: aws.sdk.kotlin.services.proton.model.RepositoryProvider = requireNotNull(builder.provider) { "A non-null value must be provided for provider" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.proton.model.Repository = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Repository(")
append("arn=$arn,")
append("connectionArn=$connectionArn,")
append("encryptionKey=$encryptionKey,")
append("name=$name,")
append("provider=$provider")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = arn.hashCode()
result = 31 * result + (connectionArn.hashCode())
result = 31 * result + (encryptionKey?.hashCode() ?: 0)
result = 31 * result + (name.hashCode())
result = 31 * result + (provider.hashCode())
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 Repository
if (arn != other.arn) return false
if (connectionArn != other.connectionArn) return false
if (encryptionKey != other.encryptionKey) return false
if (name != other.name) return false
if (provider != other.provider) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.proton.model.Repository = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of the linked repository.
*/
public var arn: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of your AWS CodeStar connection that connects Proton to your repository provider account.
*/
public var connectionArn: kotlin.String? = null
/**
* Your customer Amazon Web Services KMS encryption key.
*/
public var encryptionKey: kotlin.String? = null
/**
* The repository name.
*/
public var name: kotlin.String? = null
/**
* The repository provider.
*/
public var provider: aws.sdk.kotlin.services.proton.model.RepositoryProvider? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.proton.model.Repository) : this() {
this.arn = x.arn
this.connectionArn = x.connectionArn
this.encryptionKey = x.encryptionKey
this.name = x.name
this.provider = x.provider
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.proton.model.Repository = Repository(this)
internal fun correctErrors(): Builder {
if (arn == null) arn = ""
if (connectionArn == null) connectionArn = ""
if (name == null) name = ""
if (provider == null) provider = RepositoryProvider.SdkUnknown("no value provided")
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy