commonMain.aws.sdk.kotlin.services.autoscaling.serde.EbsDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of autoscaling-jvm Show documentation
Show all versions of autoscaling-jvm Show documentation
The AWS SDK for Kotlin client for Auto Scaling
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.autoscaling.serde
import aws.sdk.kotlin.services.autoscaling.model.Ebs
import aws.smithy.kotlin.runtime.serde.getOrDeserializeErr
import aws.smithy.kotlin.runtime.serde.parseBoolean
import aws.smithy.kotlin.runtime.serde.parseInt
import aws.smithy.kotlin.runtime.serde.xml.XmlTagReader
import aws.smithy.kotlin.runtime.serde.xml.tryData
internal fun deserializeEbsDocument(reader: XmlTagReader): Ebs {
val builder = Ebs.Builder()
loop@while (true) {
val curr = reader.nextTag() ?: break@loop
when (curr.tagName) {
// SnapshotId com.amazonaws.autoscaling#Ebs$SnapshotId
"SnapshotId" -> builder.snapshotId = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.autoscaling#XmlStringMaxLen255`)" }
// VolumeSize com.amazonaws.autoscaling#Ebs$VolumeSize
"VolumeSize" -> builder.volumeSize = curr.tryData()
.parseInt()
.getOrDeserializeErr { "expected (integer: `com.amazonaws.autoscaling#BlockDeviceEbsVolumeSize`)" }
// VolumeType com.amazonaws.autoscaling#Ebs$VolumeType
"VolumeType" -> builder.volumeType = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.autoscaling#BlockDeviceEbsVolumeType`)" }
// DeleteOnTermination com.amazonaws.autoscaling#Ebs$DeleteOnTermination
"DeleteOnTermination" -> builder.deleteOnTermination = curr.tryData()
.parseBoolean()
.getOrDeserializeErr { "expected (boolean: `com.amazonaws.autoscaling#BlockDeviceEbsDeleteOnTermination`)" }
// Iops com.amazonaws.autoscaling#Ebs$Iops
"Iops" -> builder.iops = curr.tryData()
.parseInt()
.getOrDeserializeErr { "expected (integer: `com.amazonaws.autoscaling#BlockDeviceEbsIops`)" }
// Encrypted com.amazonaws.autoscaling#Ebs$Encrypted
"Encrypted" -> builder.encrypted = curr.tryData()
.parseBoolean()
.getOrDeserializeErr { "expected (boolean: `com.amazonaws.autoscaling#BlockDeviceEbsEncrypted`)" }
// Throughput com.amazonaws.autoscaling#Ebs$Throughput
"Throughput" -> builder.throughput = curr.tryData()
.parseInt()
.getOrDeserializeErr { "expected (integer: `com.amazonaws.autoscaling#BlockDeviceEbsThroughput`)" }
else -> {}
}
curr.drop()
}
builder.correctErrors()
return builder.build()
}