commonMain.aws.sdk.kotlin.services.timestreamwrite.model.UpdateDatabaseRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of timestreamwrite-jvm Show documentation
Show all versions of timestreamwrite-jvm Show documentation
The AWS SDK for Kotlin client for Timestream Write
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.timestreamwrite.model
import aws.smithy.kotlin.runtime.SdkDsl
public class UpdateDatabaseRequest private constructor(builder: Builder) {
/**
* The name of the database.
*/
public val databaseName: kotlin.String? = builder.databaseName
/**
* The identifier of the new KMS key (`KmsKeyId`) to be used to encrypt the data stored in the database. If the `KmsKeyId` currently registered with the database is the same as the `KmsKeyId` in the request, there will not be any update.
*
* You can specify the `KmsKeyId` using any of the following:
* + Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
* + Key ARN: `arn:aws:kms:us-east-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
* + Alias name: `alias/ExampleAlias`
* + Alias ARN: `arn:aws:kms:us-east-1:111122223333:alias/ExampleAlias`
*/
public val kmsKeyId: kotlin.String? = builder.kmsKeyId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.timestreamwrite.model.UpdateDatabaseRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateDatabaseRequest(")
append("databaseName=$databaseName,")
append("kmsKeyId=$kmsKeyId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = databaseName?.hashCode() ?: 0
result = 31 * result + (kmsKeyId?.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 UpdateDatabaseRequest
if (databaseName != other.databaseName) return false
if (kmsKeyId != other.kmsKeyId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.timestreamwrite.model.UpdateDatabaseRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the database.
*/
public var databaseName: kotlin.String? = null
/**
* The identifier of the new KMS key (`KmsKeyId`) to be used to encrypt the data stored in the database. If the `KmsKeyId` currently registered with the database is the same as the `KmsKeyId` in the request, there will not be any update.
*
* You can specify the `KmsKeyId` using any of the following:
* + Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
* + Key ARN: `arn:aws:kms:us-east-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
* + Alias name: `alias/ExampleAlias`
* + Alias ARN: `arn:aws:kms:us-east-1:111122223333:alias/ExampleAlias`
*/
public var kmsKeyId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.timestreamwrite.model.UpdateDatabaseRequest) : this() {
this.databaseName = x.databaseName
this.kmsKeyId = x.kmsKeyId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.timestreamwrite.model.UpdateDatabaseRequest = UpdateDatabaseRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}