
commonMain.aws.sdk.kotlin.services.xray.model.PutEncryptionConfigRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.xray.model
import aws.smithy.kotlin.runtime.SdkDsl
public class PutEncryptionConfigRequest private constructor(builder: Builder) {
/**
* An Amazon Web Services KMS key in one of the following formats:
* + **Alias** - The name of the key. For example, `alias/MyKey`.
* + **Key ID** - The KMS key ID of the key. For example, `ae4aa6d49-a4d8-9df9-a475-4ff6d7898456`. Amazon Web Services X-Ray does not support asymmetric KMS keys.
* + **ARN** - The full Amazon Resource Name of the key ID or alias. For example, `arn:aws:kms:us-east-2:123456789012:key/ae4aa6d49-a4d8-9df9-a475-4ff6d7898456`. Use this format to specify a key in a different account.
*
* Omit this key if you set `Type` to `NONE`.
*/
public val keyId: kotlin.String? = builder.keyId
/**
* The type of encryption. Set to `KMS` to use your own key for encryption. Set to `NONE` for default encryption.
*/
public val type: aws.sdk.kotlin.services.xray.model.EncryptionType? = builder.type
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.xray.model.PutEncryptionConfigRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutEncryptionConfigRequest(")
append("keyId=$keyId,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = keyId?.hashCode() ?: 0
result = 31 * result + (type?.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 PutEncryptionConfigRequest
if (keyId != other.keyId) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.xray.model.PutEncryptionConfigRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An Amazon Web Services KMS key in one of the following formats:
* + **Alias** - The name of the key. For example, `alias/MyKey`.
* + **Key ID** - The KMS key ID of the key. For example, `ae4aa6d49-a4d8-9df9-a475-4ff6d7898456`. Amazon Web Services X-Ray does not support asymmetric KMS keys.
* + **ARN** - The full Amazon Resource Name of the key ID or alias. For example, `arn:aws:kms:us-east-2:123456789012:key/ae4aa6d49-a4d8-9df9-a475-4ff6d7898456`. Use this format to specify a key in a different account.
*
* Omit this key if you set `Type` to `NONE`.
*/
public var keyId: kotlin.String? = null
/**
* The type of encryption. Set to `KMS` to use your own key for encryption. Set to `NONE` for default encryption.
*/
public var type: aws.sdk.kotlin.services.xray.model.EncryptionType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.xray.model.PutEncryptionConfigRequest) : this() {
this.keyId = x.keyId
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.xray.model.PutEncryptionConfigRequest = PutEncryptionConfigRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy