
commonMain.aws.sdk.kotlin.services.sms.serde.ServerLaunchConfigurationDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.sms.serde
import aws.sdk.kotlin.services.sms.model.ScriptType
import aws.sdk.kotlin.services.sms.model.ServerLaunchConfiguration
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.json.JsonDeserializer
import aws.smithy.kotlin.runtime.serde.json.JsonSerialName
import aws.smithy.kotlin.runtime.serde.serializeList
import aws.smithy.kotlin.runtime.serde.serializeMap
import aws.smithy.kotlin.runtime.serde.serializeStruct
internal fun deserializeServerLaunchConfigurationDocument(deserializer: Deserializer): ServerLaunchConfiguration {
val builder = ServerLaunchConfiguration.Builder()
val ASSOCIATEPUBLICIPADDRESS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("associatePublicIpAddress"))
val CONFIGURESCRIPT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("configureScript"))
val CONFIGURESCRIPTTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("configureScriptType"))
val EC2KEYNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ec2KeyName"))
val IAMINSTANCEPROFILENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("iamInstanceProfileName"))
val INSTANCETYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("instanceType"))
val LOGICALID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("logicalId"))
val SECURITYGROUP_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("securityGroup"))
val SERVER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("server"))
val SUBNET_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("subnet"))
val USERDATA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("userData"))
val VPC_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("vpc"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ASSOCIATEPUBLICIPADDRESS_DESCRIPTOR)
field(CONFIGURESCRIPT_DESCRIPTOR)
field(CONFIGURESCRIPTTYPE_DESCRIPTOR)
field(EC2KEYNAME_DESCRIPTOR)
field(IAMINSTANCEPROFILENAME_DESCRIPTOR)
field(INSTANCETYPE_DESCRIPTOR)
field(LOGICALID_DESCRIPTOR)
field(SECURITYGROUP_DESCRIPTOR)
field(SERVER_DESCRIPTOR)
field(SUBNET_DESCRIPTOR)
field(USERDATA_DESCRIPTOR)
field(VPC_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ASSOCIATEPUBLICIPADDRESS_DESCRIPTOR.index -> builder.associatePublicIpAddress = deserializeBoolean()
CONFIGURESCRIPT_DESCRIPTOR.index -> builder.configureScript = deserializeS3LocationDocument(deserializer)
CONFIGURESCRIPTTYPE_DESCRIPTOR.index -> builder.configureScriptType = deserializeString().let { ScriptType.fromValue(it) }
EC2KEYNAME_DESCRIPTOR.index -> builder.ec2KeyName = deserializeString()
IAMINSTANCEPROFILENAME_DESCRIPTOR.index -> builder.iamInstanceProfileName = deserializeString()
INSTANCETYPE_DESCRIPTOR.index -> builder.instanceType = deserializeString()
LOGICALID_DESCRIPTOR.index -> builder.logicalId = deserializeString()
SECURITYGROUP_DESCRIPTOR.index -> builder.securityGroup = deserializeString()
SERVER_DESCRIPTOR.index -> builder.server = deserializeServerDocument(deserializer)
SUBNET_DESCRIPTOR.index -> builder.subnet = deserializeString()
USERDATA_DESCRIPTOR.index -> builder.userData = deserializeUserDataDocument(deserializer)
VPC_DESCRIPTOR.index -> builder.vpc = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy