commonMain.aws.sdk.kotlin.services.autoscaling.serde.RefreshPreferencesDocumentSerializer.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.RefreshPreferences
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.Serializer
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.formurl.FormUrlSerialName
import aws.smithy.kotlin.runtime.serde.serializeList
import aws.smithy.kotlin.runtime.serde.serializeMap
import aws.smithy.kotlin.runtime.serde.serializeStruct
internal fun serializeRefreshPreferencesDocument(serializer: Serializer, input: RefreshPreferences) {
val ALARMSPECIFICATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, FormUrlSerialName("AlarmSpecification"))
val AUTOROLLBACK_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, FormUrlSerialName("AutoRollback"))
val CHECKPOINTDELAY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, FormUrlSerialName("CheckpointDelay"))
val CHECKPOINTPERCENTAGES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, FormUrlSerialName("CheckpointPercentages"))
val INSTANCEWARMUP_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, FormUrlSerialName("InstanceWarmup"))
val MAXHEALTHYPERCENTAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, FormUrlSerialName("MaxHealthyPercentage"))
val MINHEALTHYPERCENTAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, FormUrlSerialName("MinHealthyPercentage"))
val SCALEINPROTECTEDINSTANCES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, FormUrlSerialName("ScaleInProtectedInstances"))
val SKIPMATCHING_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, FormUrlSerialName("SkipMatching"))
val STANDBYINSTANCES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, FormUrlSerialName("StandbyInstances"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
trait(FormUrlSerialName("RefreshPreferences"))
field(ALARMSPECIFICATION_DESCRIPTOR)
field(AUTOROLLBACK_DESCRIPTOR)
field(CHECKPOINTDELAY_DESCRIPTOR)
field(CHECKPOINTPERCENTAGES_DESCRIPTOR)
field(INSTANCEWARMUP_DESCRIPTOR)
field(MAXHEALTHYPERCENTAGE_DESCRIPTOR)
field(MINHEALTHYPERCENTAGE_DESCRIPTOR)
field(SCALEINPROTECTEDINSTANCES_DESCRIPTOR)
field(SKIPMATCHING_DESCRIPTOR)
field(STANDBYINSTANCES_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.minHealthyPercentage?.let { field(MINHEALTHYPERCENTAGE_DESCRIPTOR, it) }
input.instanceWarmup?.let { field(INSTANCEWARMUP_DESCRIPTOR, it) }
if (input.checkpointPercentages != null) {
listField(CHECKPOINTPERCENTAGES_DESCRIPTOR) {
for (el0 in input.checkpointPercentages) {
serializeInt(el0)
}
}
}
input.checkpointDelay?.let { field(CHECKPOINTDELAY_DESCRIPTOR, it) }
input.skipMatching?.let { field(SKIPMATCHING_DESCRIPTOR, it) }
input.autoRollback?.let { field(AUTOROLLBACK_DESCRIPTOR, it) }
input.scaleInProtectedInstances?.let { field(SCALEINPROTECTEDINSTANCES_DESCRIPTOR, it.value) }
input.standbyInstances?.let { field(STANDBYINSTANCES_DESCRIPTOR, it.value) }
input.alarmSpecification?.let { field(ALARMSPECIFICATION_DESCRIPTOR, it, ::serializeAlarmSpecificationDocument) }
input.maxHealthyPercentage?.let { field(MAXHEALTHYPERCENTAGE_DESCRIPTOR, it) }
}
}