
commonMain.aws.sdk.kotlin.services.kms.model.GenerateDataKeyPairWithoutPlaintextResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kms.model
public class GenerateDataKeyPairWithoutPlaintextResponse private constructor(builder: Builder) {
/**
* The Amazon Resource Name ([key ARN](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN)) of the KMS key that encrypted the private key.
*/
public val keyId: kotlin.String? = builder.keyId
/**
* The type of data key pair that was generated.
*/
public val keyPairSpec: aws.sdk.kotlin.services.kms.model.DataKeyPairSpec? = builder.keyPairSpec
/**
* The encrypted copy of the private key. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
*/
public val privateKeyCiphertextBlob: kotlin.ByteArray? = builder.privateKeyCiphertextBlob
/**
* The public key (in plaintext). When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
*/
public val publicKey: kotlin.ByteArray? = builder.publicKey
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kms.model.GenerateDataKeyPairWithoutPlaintextResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GenerateDataKeyPairWithoutPlaintextResponse(")
append("keyId=$keyId,")
append("keyPairSpec=$keyPairSpec,")
append("privateKeyCiphertextBlob=$privateKeyCiphertextBlob,")
append("publicKey=$publicKey")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = keyId?.hashCode() ?: 0
result = 31 * result + (keyPairSpec?.hashCode() ?: 0)
result = 31 * result + (privateKeyCiphertextBlob?.contentHashCode() ?: 0)
result = 31 * result + (publicKey?.contentHashCode() ?: 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 GenerateDataKeyPairWithoutPlaintextResponse
if (keyId != other.keyId) return false
if (keyPairSpec != other.keyPairSpec) return false
if (privateKeyCiphertextBlob != null) {
if (other.privateKeyCiphertextBlob == null) return false
if (!privateKeyCiphertextBlob.contentEquals(other.privateKeyCiphertextBlob)) return false
} else if (other.privateKeyCiphertextBlob != null) return false
if (publicKey != null) {
if (other.publicKey == null) return false
if (!publicKey.contentEquals(other.publicKey)) return false
} else if (other.publicKey != null) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kms.model.GenerateDataKeyPairWithoutPlaintextResponse = Builder(this).apply(block).build()
public class Builder {
/**
* The Amazon Resource Name ([key ARN](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN)) of the KMS key that encrypted the private key.
*/
public var keyId: kotlin.String? = null
/**
* The type of data key pair that was generated.
*/
public var keyPairSpec: aws.sdk.kotlin.services.kms.model.DataKeyPairSpec? = null
/**
* The encrypted copy of the private key. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
*/
public var privateKeyCiphertextBlob: kotlin.ByteArray? = null
/**
* The public key (in plaintext). When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
*/
public var publicKey: kotlin.ByteArray? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kms.model.GenerateDataKeyPairWithoutPlaintextResponse) : this() {
this.keyId = x.keyId
this.keyPairSpec = x.keyPairSpec
this.privateKeyCiphertextBlob = x.privateKeyCiphertextBlob
this.publicKey = x.publicKey
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kms.model.GenerateDataKeyPairWithoutPlaintextResponse = GenerateDataKeyPairWithoutPlaintextResponse(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy