commonMain.aws.sdk.kotlin.services.redshift.model.CreateSnapshotCopyGrantResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redshift-jvm Show documentation
Show all versions of redshift-jvm Show documentation
The AWS SDK for Kotlin client for Redshift
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.redshift.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateSnapshotCopyGrantResponse private constructor(builder: Builder) {
/**
* The snapshot copy grant that grants Amazon Redshift permission to encrypt copied snapshots with the specified encrypted symmetric key from Amazon Web Services KMS in the destination region.
*
* For more information about managing snapshot copy grants, go to [Amazon Redshift Database Encryption](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-db-encryption.html) in the *Amazon Redshift Cluster Management Guide*.
*/
public val snapshotCopyGrant: aws.sdk.kotlin.services.redshift.model.SnapshotCopyGrant? = builder.snapshotCopyGrant
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.redshift.model.CreateSnapshotCopyGrantResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateSnapshotCopyGrantResponse(")
append("snapshotCopyGrant=$snapshotCopyGrant")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = snapshotCopyGrant?.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 CreateSnapshotCopyGrantResponse
if (snapshotCopyGrant != other.snapshotCopyGrant) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.redshift.model.CreateSnapshotCopyGrantResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The snapshot copy grant that grants Amazon Redshift permission to encrypt copied snapshots with the specified encrypted symmetric key from Amazon Web Services KMS in the destination region.
*
* For more information about managing snapshot copy grants, go to [Amazon Redshift Database Encryption](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-db-encryption.html) in the *Amazon Redshift Cluster Management Guide*.
*/
public var snapshotCopyGrant: aws.sdk.kotlin.services.redshift.model.SnapshotCopyGrant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.redshift.model.CreateSnapshotCopyGrantResponse) : this() {
this.snapshotCopyGrant = x.snapshotCopyGrant
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.redshift.model.CreateSnapshotCopyGrantResponse = CreateSnapshotCopyGrantResponse(this)
/**
* construct an [aws.sdk.kotlin.services.redshift.model.SnapshotCopyGrant] inside the given [block]
*/
public fun snapshotCopyGrant(block: aws.sdk.kotlin.services.redshift.model.SnapshotCopyGrant.Builder.() -> kotlin.Unit) {
this.snapshotCopyGrant = aws.sdk.kotlin.services.redshift.model.SnapshotCopyGrant.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}