commonMain.aws.sdk.kotlin.services.route53.serde.ChangeInfoDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of route53-jvm Show documentation
Show all versions of route53-jvm Show documentation
The AWS SDK for Kotlin client for Route 53
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.route53.serde
import aws.sdk.kotlin.services.route53.model.ChangeInfo
import aws.sdk.kotlin.services.route53.model.ChangeStatus
import aws.smithy.kotlin.runtime.serde.getOrDeserializeErr
import aws.smithy.kotlin.runtime.serde.parse
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 deserializeChangeInfoDocument(reader: XmlTagReader): ChangeInfo {
val builder = ChangeInfo.Builder()
loop@while (true) {
val curr = reader.nextTag() ?: break@loop
when (curr.tagName) {
// Id com.amazonaws.route53#ChangeInfo$Id
"Id" -> builder.id = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.route53#ResourceId`)" }
// Status com.amazonaws.route53#ChangeInfo$Status
"Status" -> builder.status = curr.tryData()
.parse { ChangeStatus.fromValue(it) }
.getOrDeserializeErr { "expected (enum: `com.amazonaws.route53#ChangeStatus`)" }
// SubmittedAt com.amazonaws.route53#ChangeInfo$SubmittedAt
"SubmittedAt" -> builder.submittedAt = curr.tryData()
.parseTimestamp(TimestampFormat.ISO_8601)
.getOrDeserializeErr { "expected (timestamp: `com.amazonaws.route53#TimeStamp`)" }
// Comment com.amazonaws.route53#ChangeInfo$Comment
"Comment" -> builder.comment = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.route53#ResourceDescription`)" }
else -> {}
}
curr.drop()
}
builder.correctErrors()
return builder.build()
}