commonMain.aws.sdk.kotlin.services.autoscaling.serde.LaunchConfigurationDocumentDeserializer.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.BlockDeviceMapping
import aws.sdk.kotlin.services.autoscaling.model.LaunchConfiguration
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
import kotlin.collections.mutableListOf
internal fun deserializeLaunchConfigurationDocument(deserializer: Deserializer): LaunchConfiguration {
val builder = LaunchConfiguration.Builder()
val ASSOCIATEPUBLICIPADDRESS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, XmlSerialName("AssociatePublicIpAddress"))
val BLOCKDEVICEMAPPINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, XmlSerialName("BlockDeviceMappings"))
val CLASSICLINKVPCID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, XmlSerialName("ClassicLinkVPCId"))
val CLASSICLINKVPCSECURITYGROUPS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, XmlSerialName("ClassicLinkVPCSecurityGroups"))
val CREATEDTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, XmlSerialName("CreatedTime"))
val EBSOPTIMIZED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, XmlSerialName("EbsOptimized"))
val IAMINSTANCEPROFILE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, XmlSerialName("IamInstanceProfile"))
val IMAGEID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, XmlSerialName("ImageId"))
val INSTANCEMONITORING_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, XmlSerialName("InstanceMonitoring"))
val INSTANCETYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, XmlSerialName("InstanceType"))
val KERNELID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, XmlSerialName("KernelId"))
val KEYNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, XmlSerialName("KeyName"))
val LAUNCHCONFIGURATIONARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, XmlSerialName("LaunchConfigurationARN"))
val LAUNCHCONFIGURATIONNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, XmlSerialName("LaunchConfigurationName"))
val METADATAOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, XmlSerialName("MetadataOptions"))
val PLACEMENTTENANCY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, XmlSerialName("PlacementTenancy"))
val RAMDISKID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, XmlSerialName("RamdiskId"))
val SECURITYGROUPS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, XmlSerialName("SecurityGroups"))
val SPOTPRICE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, XmlSerialName("SpotPrice"))
val USERDATA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, XmlSerialName("UserData"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
trait(XmlSerialName("LaunchConfiguration"))
trait(XmlNamespace("http://autoscaling.amazonaws.com/doc/2011-01-01/"))
field(ASSOCIATEPUBLICIPADDRESS_DESCRIPTOR)
field(BLOCKDEVICEMAPPINGS_DESCRIPTOR)
field(CLASSICLINKVPCID_DESCRIPTOR)
field(CLASSICLINKVPCSECURITYGROUPS_DESCRIPTOR)
field(CREATEDTIME_DESCRIPTOR)
field(EBSOPTIMIZED_DESCRIPTOR)
field(IAMINSTANCEPROFILE_DESCRIPTOR)
field(IMAGEID_DESCRIPTOR)
field(INSTANCEMONITORING_DESCRIPTOR)
field(INSTANCETYPE_DESCRIPTOR)
field(KERNELID_DESCRIPTOR)
field(KEYNAME_DESCRIPTOR)
field(LAUNCHCONFIGURATIONARN_DESCRIPTOR)
field(LAUNCHCONFIGURATIONNAME_DESCRIPTOR)
field(METADATAOPTIONS_DESCRIPTOR)
field(PLACEMENTTENANCY_DESCRIPTOR)
field(RAMDISKID_DESCRIPTOR)
field(SECURITYGROUPS_DESCRIPTOR)
field(SPOTPRICE_DESCRIPTOR)
field(USERDATA_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ASSOCIATEPUBLICIPADDRESS_DESCRIPTOR.index -> builder.associatePublicIpAddress = deserializeBoolean()
BLOCKDEVICEMAPPINGS_DESCRIPTOR.index -> builder.blockDeviceMappings =
deserializer.deserializeList(BLOCKDEVICEMAPPINGS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeBlockDeviceMappingDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
CLASSICLINKVPCID_DESCRIPTOR.index -> builder.classicLinkVpcId = deserializeString()
CLASSICLINKVPCSECURITYGROUPS_DESCRIPTOR.index -> builder.classicLinkVpcSecurityGroups =
deserializer.deserializeList(CLASSICLINKVPCSECURITYGROUPS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
CREATEDTIME_DESCRIPTOR.index -> builder.createdTime = deserializeString().let { Instant.fromIso8601(it) }
EBSOPTIMIZED_DESCRIPTOR.index -> builder.ebsOptimized = deserializeBoolean()
IAMINSTANCEPROFILE_DESCRIPTOR.index -> builder.iamInstanceProfile = deserializeString()
IMAGEID_DESCRIPTOR.index -> builder.imageId = deserializeString()
INSTANCEMONITORING_DESCRIPTOR.index -> builder.instanceMonitoring = deserializeInstanceMonitoringDocument(deserializer)
INSTANCETYPE_DESCRIPTOR.index -> builder.instanceType = deserializeString()
KERNELID_DESCRIPTOR.index -> builder.kernelId = deserializeString()
KEYNAME_DESCRIPTOR.index -> builder.keyName = deserializeString()
LAUNCHCONFIGURATIONARN_DESCRIPTOR.index -> builder.launchConfigurationArn = deserializeString()
LAUNCHCONFIGURATIONNAME_DESCRIPTOR.index -> builder.launchConfigurationName = deserializeString()
METADATAOPTIONS_DESCRIPTOR.index -> builder.metadataOptions = deserializeInstanceMetadataOptionsDocument(deserializer)
PLACEMENTTENANCY_DESCRIPTOR.index -> builder.placementTenancy = deserializeString()
RAMDISKID_DESCRIPTOR.index -> builder.ramdiskId = deserializeString()
SECURITYGROUPS_DESCRIPTOR.index -> builder.securityGroups =
deserializer.deserializeList(SECURITYGROUPS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
SPOTPRICE_DESCRIPTOR.index -> builder.spotPrice = deserializeString()
USERDATA_DESCRIPTOR.index -> builder.userData = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy