commonMain.aws.sdk.kotlin.services.autoscaling.serde.RollbackDetailsDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.autoscaling.serde
import aws.sdk.kotlin.services.autoscaling.model.RollbackDetails
import aws.smithy.kotlin.runtime.serde.Deserializer
import aws.smithy.kotlin.runtime.serde.SdkFieldDescriptor
import aws.smithy.kotlin.runtime.serde.SdkObjectDescriptor
import aws.smithy.kotlin.runtime.serde.SerialKind
import aws.smithy.kotlin.runtime.serde.asSdkSerializable
import aws.smithy.kotlin.runtime.serde.deserializeList
import aws.smithy.kotlin.runtime.serde.deserializeMap
import aws.smithy.kotlin.runtime.serde.deserializeStruct
import aws.smithy.kotlin.runtime.serde.field
import aws.smithy.kotlin.runtime.serde.serializeList
import aws.smithy.kotlin.runtime.serde.serializeMap
import aws.smithy.kotlin.runtime.serde.serializeStruct
import aws.smithy.kotlin.runtime.serde.xml.XmlDeserializer
import aws.smithy.kotlin.runtime.serde.xml.XmlNamespace
import aws.smithy.kotlin.runtime.serde.xml.XmlSerialName
import aws.smithy.kotlin.runtime.time.Instant
internal fun deserializeRollbackDetailsDocument(deserializer: Deserializer): RollbackDetails {
val builder = RollbackDetails.Builder()
val INSTANCESTOUPDATEONROLLBACK_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, XmlSerialName("InstancesToUpdateOnRollback"))
val PERCENTAGECOMPLETEONROLLBACK_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, XmlSerialName("PercentageCompleteOnRollback"))
val PROGRESSDETAILSONROLLBACK_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, XmlSerialName("ProgressDetailsOnRollback"))
val ROLLBACKREASON_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, XmlSerialName("RollbackReason"))
val ROLLBACKSTARTTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, XmlSerialName("RollbackStartTime"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
trait(XmlSerialName("RollbackDetails"))
trait(XmlNamespace("http://autoscaling.amazonaws.com/doc/2011-01-01/"))
field(INSTANCESTOUPDATEONROLLBACK_DESCRIPTOR)
field(PERCENTAGECOMPLETEONROLLBACK_DESCRIPTOR)
field(PROGRESSDETAILSONROLLBACK_DESCRIPTOR)
field(ROLLBACKREASON_DESCRIPTOR)
field(ROLLBACKSTARTTIME_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
INSTANCESTOUPDATEONROLLBACK_DESCRIPTOR.index -> builder.instancesToUpdateOnRollback = deserializeInt()
PERCENTAGECOMPLETEONROLLBACK_DESCRIPTOR.index -> builder.percentageCompleteOnRollback = deserializeInt()
PROGRESSDETAILSONROLLBACK_DESCRIPTOR.index -> builder.progressDetailsOnRollback = deserializeInstanceRefreshProgressDetailsDocument(deserializer)
ROLLBACKREASON_DESCRIPTOR.index -> builder.rollbackReason = deserializeString()
ROLLBACKSTARTTIME_DESCRIPTOR.index -> builder.rollbackStartTime = deserializeString().let { Instant.fromIso8601(it) }
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy