commonMain.aws.sdk.kotlin.services.autoscaling.serde.ScheduledUpdateGroupActionDocumentDeserializer.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 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.ScheduledUpdateGroupAction
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 deserializeScheduledUpdateGroupActionDocument(deserializer: Deserializer): ScheduledUpdateGroupAction {
val builder = ScheduledUpdateGroupAction.Builder()
val AUTOSCALINGGROUPNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, XmlSerialName("AutoScalingGroupName"))
val DESIREDCAPACITY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, XmlSerialName("DesiredCapacity"))
val ENDTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, XmlSerialName("EndTime"))
val MAXSIZE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, XmlSerialName("MaxSize"))
val MINSIZE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, XmlSerialName("MinSize"))
val RECURRENCE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, XmlSerialName("Recurrence"))
val SCHEDULEDACTIONARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, XmlSerialName("ScheduledActionARN"))
val SCHEDULEDACTIONNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, XmlSerialName("ScheduledActionName"))
val STARTTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, XmlSerialName("StartTime"))
val TIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, XmlSerialName("Time"))
val TIMEZONE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, XmlSerialName("TimeZone"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
trait(XmlSerialName("ScheduledUpdateGroupAction"))
trait(XmlNamespace("http://autoscaling.amazonaws.com/doc/2011-01-01/"))
field(AUTOSCALINGGROUPNAME_DESCRIPTOR)
field(DESIREDCAPACITY_DESCRIPTOR)
field(ENDTIME_DESCRIPTOR)
field(MAXSIZE_DESCRIPTOR)
field(MINSIZE_DESCRIPTOR)
field(RECURRENCE_DESCRIPTOR)
field(SCHEDULEDACTIONARN_DESCRIPTOR)
field(SCHEDULEDACTIONNAME_DESCRIPTOR)
field(STARTTIME_DESCRIPTOR)
field(TIME_DESCRIPTOR)
field(TIMEZONE_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
AUTOSCALINGGROUPNAME_DESCRIPTOR.index -> builder.autoScalingGroupName = deserializeString()
DESIREDCAPACITY_DESCRIPTOR.index -> builder.desiredCapacity = deserializeInt()
ENDTIME_DESCRIPTOR.index -> builder.endTime = deserializeString().let { Instant.fromIso8601(it) }
MAXSIZE_DESCRIPTOR.index -> builder.maxSize = deserializeInt()
MINSIZE_DESCRIPTOR.index -> builder.minSize = deserializeInt()
RECURRENCE_DESCRIPTOR.index -> builder.recurrence = deserializeString()
SCHEDULEDACTIONARN_DESCRIPTOR.index -> builder.scheduledActionArn = deserializeString()
SCHEDULEDACTIONNAME_DESCRIPTOR.index -> builder.scheduledActionName = deserializeString()
STARTTIME_DESCRIPTOR.index -> builder.startTime = deserializeString().let { Instant.fromIso8601(it) }
TIME_DESCRIPTOR.index -> builder.time = deserializeString().let { Instant.fromIso8601(it) }
TIMEZONE_DESCRIPTOR.index -> builder.timeZone = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy