commonMain.aws.sdk.kotlin.services.elasticbeanstalk.serde.ApplicationResourceLifecycleConfigDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of elasticbeanstalk-jvm Show documentation
Show all versions of elasticbeanstalk-jvm Show documentation
The AWS SDK for Kotlin client for Elastic Beanstalk
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.elasticbeanstalk.serde
import aws.sdk.kotlin.services.elasticbeanstalk.model.ApplicationResourceLifecycleConfig
import aws.smithy.kotlin.runtime.serde.getOrDeserializeErr
import aws.smithy.kotlin.runtime.serde.xml.XmlTagReader
import aws.smithy.kotlin.runtime.serde.xml.tryData
internal fun deserializeApplicationResourceLifecycleConfigDocument(reader: XmlTagReader): ApplicationResourceLifecycleConfig {
val builder = ApplicationResourceLifecycleConfig.Builder()
loop@while (true) {
val curr = reader.nextTag() ?: break@loop
when (curr.tagName) {
// ServiceRole com.amazonaws.elasticbeanstalk#ApplicationResourceLifecycleConfig$ServiceRole
"ServiceRole" -> builder.serviceRole = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.elasticbeanstalk#String`)" }
// VersionLifecycleConfig com.amazonaws.elasticbeanstalk#ApplicationResourceLifecycleConfig$VersionLifecycleConfig
"VersionLifecycleConfig" -> builder.versionLifecycleConfig = deserializeApplicationVersionLifecycleConfigDocument(curr)
else -> {}
}
curr.drop()
}
builder.correctErrors()
return builder.build()
}