commonMain.aws.sdk.kotlin.services.autoscalingplans.serde.ScalingInstructionDocumentSerializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of autoscalingplans-jvm Show documentation
Show all versions of autoscalingplans-jvm Show documentation
The AWS SDK for Kotlin client for Auto Scaling Plans
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.autoscalingplans.serde
import aws.sdk.kotlin.services.autoscalingplans.model.ScalingInstruction
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.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 serializeScalingInstructionDocument(serializer: Serializer, input: ScalingInstruction) {
val CUSTOMIZEDLOADMETRICSPECIFICATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("CustomizedLoadMetricSpecification"))
val DISABLEDYNAMICSCALING_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("DisableDynamicScaling"))
val MAXCAPACITY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("MaxCapacity"))
val MINCAPACITY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("MinCapacity"))
val PREDEFINEDLOADMETRICSPECIFICATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("PredefinedLoadMetricSpecification"))
val PREDICTIVESCALINGMAXCAPACITYBEHAVIOR_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("PredictiveScalingMaxCapacityBehavior"))
val PREDICTIVESCALINGMAXCAPACITYBUFFER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("PredictiveScalingMaxCapacityBuffer"))
val PREDICTIVESCALINGMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("PredictiveScalingMode"))
val RESOURCEID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ResourceId"))
val SCALABLEDIMENSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ScalableDimension"))
val SCALINGPOLICYUPDATEBEHAVIOR_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ScalingPolicyUpdateBehavior"))
val SCHEDULEDACTIONBUFFERTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("ScheduledActionBufferTime"))
val SERVICENAMESPACE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ServiceNamespace"))
val TARGETTRACKINGCONFIGURATIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("TargetTrackingConfigurations"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CUSTOMIZEDLOADMETRICSPECIFICATION_DESCRIPTOR)
field(DISABLEDYNAMICSCALING_DESCRIPTOR)
field(MAXCAPACITY_DESCRIPTOR)
field(MINCAPACITY_DESCRIPTOR)
field(PREDEFINEDLOADMETRICSPECIFICATION_DESCRIPTOR)
field(PREDICTIVESCALINGMAXCAPACITYBEHAVIOR_DESCRIPTOR)
field(PREDICTIVESCALINGMAXCAPACITYBUFFER_DESCRIPTOR)
field(PREDICTIVESCALINGMODE_DESCRIPTOR)
field(RESOURCEID_DESCRIPTOR)
field(SCALABLEDIMENSION_DESCRIPTOR)
field(SCALINGPOLICYUPDATEBEHAVIOR_DESCRIPTOR)
field(SCHEDULEDACTIONBUFFERTIME_DESCRIPTOR)
field(SERVICENAMESPACE_DESCRIPTOR)
field(TARGETTRACKINGCONFIGURATIONS_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
field(SERVICENAMESPACE_DESCRIPTOR, input.serviceNamespace.value)
field(RESOURCEID_DESCRIPTOR, input.resourceId)
field(SCALABLEDIMENSION_DESCRIPTOR, input.scalableDimension.value)
field(MINCAPACITY_DESCRIPTOR, input.minCapacity)
field(MAXCAPACITY_DESCRIPTOR, input.maxCapacity)
listField(TARGETTRACKINGCONFIGURATIONS_DESCRIPTOR) {
for (el0 in input.targetTrackingConfigurations) {
serializeSdkSerializable(asSdkSerializable(el0, ::serializeTargetTrackingConfigurationDocument))
}
}
input.predefinedLoadMetricSpecification?.let { field(PREDEFINEDLOADMETRICSPECIFICATION_DESCRIPTOR, it, ::serializePredefinedLoadMetricSpecificationDocument) }
input.customizedLoadMetricSpecification?.let { field(CUSTOMIZEDLOADMETRICSPECIFICATION_DESCRIPTOR, it, ::serializeCustomizedLoadMetricSpecificationDocument) }
input.scheduledActionBufferTime?.let { field(SCHEDULEDACTIONBUFFERTIME_DESCRIPTOR, it) }
input.predictiveScalingMaxCapacityBehavior?.let { field(PREDICTIVESCALINGMAXCAPACITYBEHAVIOR_DESCRIPTOR, it.value) }
input.predictiveScalingMaxCapacityBuffer?.let { field(PREDICTIVESCALINGMAXCAPACITYBUFFER_DESCRIPTOR, it) }
input.predictiveScalingMode?.let { field(PREDICTIVESCALINGMODE_DESCRIPTOR, it.value) }
input.scalingPolicyUpdateBehavior?.let { field(SCALINGPOLICYUPDATEBEHAVIOR_DESCRIPTOR, it.value) }
input.disableDynamicScaling?.let { field(DISABLEDYNAMICSCALING_DESCRIPTOR, it) }
}
}