commonMain.aws.sdk.kotlin.services.proton.model.CreateRepositoryRequest.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
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.proton.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateRepositoryRequest private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of your AWS CodeStar connection that connects Proton to your repository provider account. For more information, see [Setting up for Proton](https://docs.aws.amazon.com/proton/latest/userguide/setting-up-for-service.html) in the *Proton User Guide*.
*/
public val connectionArn: kotlin.String = requireNotNull(builder.connectionArn) { "A non-null value must be provided for connectionArn" }
/**
* The ARN of your customer Amazon Web Services Key Management Service (Amazon Web Services KMS) key.
*/
public val encryptionKey: kotlin.String? = builder.encryptionKey
/**
* The repository name (for example, `myrepos/myrepo`).
*/
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" }
/**
* An optional list of metadata items that you can associate with the Proton repository. A tag is a key-value pair.
*
* For more information, see [Proton resources and tagging](https://docs.aws.amazon.com/proton/latest/userguide/resources.html) in the *Proton User Guide*.
*/
public val tags: List? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.proton.model.CreateRepositoryRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateRepositoryRequest(")
append("connectionArn=$connectionArn,")
append("encryptionKey=$encryptionKey,")
append("name=$name,")
append("provider=$provider,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = connectionArn.hashCode()
result = 31 * result + (encryptionKey?.hashCode() ?: 0)
result = 31 * result + (name.hashCode())
result = 31 * result + (provider.hashCode())
result = 31 * result + (tags?.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 CreateRepositoryRequest
if (connectionArn != other.connectionArn) return false
if (encryptionKey != other.encryptionKey) return false
if (name != other.name) return false
if (provider != other.provider) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.proton.model.CreateRepositoryRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of your AWS CodeStar connection that connects Proton to your repository provider account. For more information, see [Setting up for Proton](https://docs.aws.amazon.com/proton/latest/userguide/setting-up-for-service.html) in the *Proton User Guide*.
*/
public var connectionArn: kotlin.String? = null
/**
* The ARN of your customer Amazon Web Services Key Management Service (Amazon Web Services KMS) key.
*/
public var encryptionKey: kotlin.String? = null
/**
* The repository name (for example, `myrepos/myrepo`).
*/
public var name: kotlin.String? = null
/**
* The repository provider.
*/
public var provider: aws.sdk.kotlin.services.proton.model.RepositoryProvider? = null
/**
* An optional list of metadata items that you can associate with the Proton repository. A tag is a key-value pair.
*
* For more information, see [Proton resources and tagging](https://docs.aws.amazon.com/proton/latest/userguide/resources.html) in the *Proton User Guide*.
*/
public var tags: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.proton.model.CreateRepositoryRequest) : this() {
this.connectionArn = x.connectionArn
this.encryptionKey = x.encryptionKey
this.name = x.name
this.provider = x.provider
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.proton.model.CreateRepositoryRequest = CreateRepositoryRequest(this)
internal fun correctErrors(): Builder {
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