
commonMain.aws.sdk.kotlin.services.cloudfront.serde.InvalidationDocumentDeserializer.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.Invalidation
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 deserializeInvalidationDocument(reader: XmlTagReader): Invalidation {
val builder = Invalidation.Builder()
loop@while (true) {
val curr = reader.nextTag() ?: break@loop
when (curr.tagName) {
// Id com.amazonaws.cloudfront#Invalidation$Id
"Id" -> builder.id = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.cloudfront#string`)" }
// Status com.amazonaws.cloudfront#Invalidation$Status
"Status" -> builder.status = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.cloudfront#string`)" }
// CreateTime com.amazonaws.cloudfront#Invalidation$CreateTime
"CreateTime" -> builder.createTime = curr.tryData()
.parseTimestamp(TimestampFormat.ISO_8601)
.getOrDeserializeErr { "expected (timestamp: `com.amazonaws.cloudfront#timestamp`)" }
// InvalidationBatch com.amazonaws.cloudfront#Invalidation$InvalidationBatch
"InvalidationBatch" -> builder.invalidationBatch = deserializeInvalidationBatchDocument(curr)
else -> {}
}
curr.drop()
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy