
commonMain.aws.sdk.kotlin.services.codecommit.model.UpdateRepositoryEncryptionKeyRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codecommit.model
import aws.smithy.kotlin.runtime.SdkDsl
public class UpdateRepositoryEncryptionKeyRequest private constructor(builder: Builder) {
/**
* The ID of the encryption key. You can view the ID of an encryption key in the KMS console, or use the KMS APIs to programmatically retrieve a key ID. For more information about acceptable values for keyID, see [KeyId](https://docs.aws.amazon.com/APIReference/API_Decrypt.html#KMS-Decrypt-request-KeyId) in the Decrypt API description in the *Key Management Service API Reference*.
*/
public val kmsKeyId: kotlin.String? = builder.kmsKeyId
/**
* The name of the repository for which you want to update the KMS encryption key used to encrypt and decrypt the repository.
*/
public val repositoryName: kotlin.String? = builder.repositoryName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codecommit.model.UpdateRepositoryEncryptionKeyRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateRepositoryEncryptionKeyRequest(")
append("kmsKeyId=$kmsKeyId,")
append("repositoryName=$repositoryName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = kmsKeyId?.hashCode() ?: 0
result = 31 * result + (repositoryName?.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 UpdateRepositoryEncryptionKeyRequest
if (kmsKeyId != other.kmsKeyId) return false
if (repositoryName != other.repositoryName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codecommit.model.UpdateRepositoryEncryptionKeyRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ID of the encryption key. You can view the ID of an encryption key in the KMS console, or use the KMS APIs to programmatically retrieve a key ID. For more information about acceptable values for keyID, see [KeyId](https://docs.aws.amazon.com/APIReference/API_Decrypt.html#KMS-Decrypt-request-KeyId) in the Decrypt API description in the *Key Management Service API Reference*.
*/
public var kmsKeyId: kotlin.String? = null
/**
* The name of the repository for which you want to update the KMS encryption key used to encrypt and decrypt the repository.
*/
public var repositoryName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codecommit.model.UpdateRepositoryEncryptionKeyRequest) : this() {
this.kmsKeyId = x.kmsKeyId
this.repositoryName = x.repositoryName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codecommit.model.UpdateRepositoryEncryptionKeyRequest = UpdateRepositoryEncryptionKeyRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy