
commonMain.aws.sdk.kotlin.services.cloudfront.serde.FieldLevelEncryptionDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudfront.serde
import aws.sdk.kotlin.services.cloudfront.model.FieldLevelEncryption
import aws.smithy.kotlin.runtime.serde.getOrDeserializeErr
import aws.smithy.kotlin.runtime.serde.parseTimestamp
import aws.smithy.kotlin.runtime.serde.xml.XmlTagReader
import aws.smithy.kotlin.runtime.serde.xml.tryData
import aws.smithy.kotlin.runtime.time.TimestampFormat
internal fun deserializeFieldLevelEncryptionDocument(reader: XmlTagReader): FieldLevelEncryption {
val builder = FieldLevelEncryption.Builder()
loop@while (true) {
val curr = reader.nextTag() ?: break@loop
when (curr.tagName) {
// Id com.amazonaws.cloudfront#FieldLevelEncryption$Id
"Id" -> builder.id = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.cloudfront#string`)" }
// LastModifiedTime com.amazonaws.cloudfront#FieldLevelEncryption$LastModifiedTime
"LastModifiedTime" -> builder.lastModifiedTime = curr.tryData()
.parseTimestamp(TimestampFormat.ISO_8601)
.getOrDeserializeErr { "expected (timestamp: `com.amazonaws.cloudfront#timestamp`)" }
// FieldLevelEncryptionConfig com.amazonaws.cloudfront#FieldLevelEncryption$FieldLevelEncryptionConfig
"FieldLevelEncryptionConfig" -> builder.fieldLevelEncryptionConfig = deserializeFieldLevelEncryptionConfigDocument(curr)
else -> {}
}
curr.drop()
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy