commonMain.aws.sdk.kotlin.services.codedeploy.serde.DeploymentGroupInfoDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codedeploy-jvm Show documentation
Show all versions of codedeploy-jvm Show documentation
The AWS SDK for Kotlin client for CodeDeploy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codedeploy.serde
import aws.sdk.kotlin.services.codedeploy.model.AutoScalingGroup
import aws.sdk.kotlin.services.codedeploy.model.ComputePlatform
import aws.sdk.kotlin.services.codedeploy.model.DeploymentGroupInfo
import aws.sdk.kotlin.services.codedeploy.model.Ec2TagFilter
import aws.sdk.kotlin.services.codedeploy.model.EcsService
import aws.sdk.kotlin.services.codedeploy.model.OutdatedInstancesStrategy
import aws.sdk.kotlin.services.codedeploy.model.TagFilter
import aws.sdk.kotlin.services.codedeploy.model.TriggerConfig
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
import kotlin.collections.mutableListOf
internal fun deserializeDeploymentGroupInfoDocument(deserializer: Deserializer): DeploymentGroupInfo {
val builder = DeploymentGroupInfo.Builder()
val ALARMCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("alarmConfiguration"))
val APPLICATIONNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("applicationName"))
val AUTOROLLBACKCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("autoRollbackConfiguration"))
val AUTOSCALINGGROUPS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("autoScalingGroups"))
val BLUEGREENDEPLOYMENTCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("blueGreenDeploymentConfiguration"))
val COMPUTEPLATFORM_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("computePlatform"))
val DEPLOYMENTCONFIGNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("deploymentConfigName"))
val DEPLOYMENTGROUPID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("deploymentGroupId"))
val DEPLOYMENTGROUPNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("deploymentGroupName"))
val DEPLOYMENTSTYLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("deploymentStyle"))
val EC2TAGFILTERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("ec2TagFilters"))
val EC2TAGSET_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ec2TagSet"))
val ECSSERVICES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("ecsServices"))
val LASTATTEMPTEDDEPLOYMENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("lastAttemptedDeployment"))
val LASTSUCCESSFULDEPLOYMENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("lastSuccessfulDeployment"))
val LOADBALANCERINFO_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("loadBalancerInfo"))
val ONPREMISESINSTANCETAGFILTERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("onPremisesInstanceTagFilters"))
val ONPREMISESTAGSET_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("onPremisesTagSet"))
val OUTDATEDINSTANCESSTRATEGY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("outdatedInstancesStrategy"))
val SERVICEROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("serviceRoleArn"))
val TARGETREVISION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("targetRevision"))
val TERMINATIONHOOKENABLED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("terminationHookEnabled"))
val TRIGGERCONFIGURATIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("triggerConfigurations"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ALARMCONFIGURATION_DESCRIPTOR)
field(APPLICATIONNAME_DESCRIPTOR)
field(AUTOROLLBACKCONFIGURATION_DESCRIPTOR)
field(AUTOSCALINGGROUPS_DESCRIPTOR)
field(BLUEGREENDEPLOYMENTCONFIGURATION_DESCRIPTOR)
field(COMPUTEPLATFORM_DESCRIPTOR)
field(DEPLOYMENTCONFIGNAME_DESCRIPTOR)
field(DEPLOYMENTGROUPID_DESCRIPTOR)
field(DEPLOYMENTGROUPNAME_DESCRIPTOR)
field(DEPLOYMENTSTYLE_DESCRIPTOR)
field(EC2TAGFILTERS_DESCRIPTOR)
field(EC2TAGSET_DESCRIPTOR)
field(ECSSERVICES_DESCRIPTOR)
field(LASTATTEMPTEDDEPLOYMENT_DESCRIPTOR)
field(LASTSUCCESSFULDEPLOYMENT_DESCRIPTOR)
field(LOADBALANCERINFO_DESCRIPTOR)
field(ONPREMISESINSTANCETAGFILTERS_DESCRIPTOR)
field(ONPREMISESTAGSET_DESCRIPTOR)
field(OUTDATEDINSTANCESSTRATEGY_DESCRIPTOR)
field(SERVICEROLEARN_DESCRIPTOR)
field(TARGETREVISION_DESCRIPTOR)
field(TERMINATIONHOOKENABLED_DESCRIPTOR)
field(TRIGGERCONFIGURATIONS_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ALARMCONFIGURATION_DESCRIPTOR.index -> builder.alarmConfiguration = deserializeAlarmConfigurationDocument(deserializer)
APPLICATIONNAME_DESCRIPTOR.index -> builder.applicationName = deserializeString()
AUTOROLLBACKCONFIGURATION_DESCRIPTOR.index -> builder.autoRollbackConfiguration = deserializeAutoRollbackConfigurationDocument(deserializer)
AUTOSCALINGGROUPS_DESCRIPTOR.index -> builder.autoScalingGroups =
deserializer.deserializeList(AUTOSCALINGGROUPS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeAutoScalingGroupDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
BLUEGREENDEPLOYMENTCONFIGURATION_DESCRIPTOR.index -> builder.blueGreenDeploymentConfiguration = deserializeBlueGreenDeploymentConfigurationDocument(deserializer)
COMPUTEPLATFORM_DESCRIPTOR.index -> builder.computePlatform = deserializeString().let { ComputePlatform.fromValue(it) }
DEPLOYMENTCONFIGNAME_DESCRIPTOR.index -> builder.deploymentConfigName = deserializeString()
DEPLOYMENTGROUPID_DESCRIPTOR.index -> builder.deploymentGroupId = deserializeString()
DEPLOYMENTGROUPNAME_DESCRIPTOR.index -> builder.deploymentGroupName = deserializeString()
DEPLOYMENTSTYLE_DESCRIPTOR.index -> builder.deploymentStyle = deserializeDeploymentStyleDocument(deserializer)
EC2TAGFILTERS_DESCRIPTOR.index -> builder.ec2TagFilters =
deserializer.deserializeList(EC2TAGFILTERS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeEc2TagFilterDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
EC2TAGSET_DESCRIPTOR.index -> builder.ec2TagSet = deserializeEc2TagSetDocument(deserializer)
ECSSERVICES_DESCRIPTOR.index -> builder.ecsServices =
deserializer.deserializeList(ECSSERVICES_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeEcsServiceDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
LASTATTEMPTEDDEPLOYMENT_DESCRIPTOR.index -> builder.lastAttemptedDeployment = deserializeLastDeploymentInfoDocument(deserializer)
LASTSUCCESSFULDEPLOYMENT_DESCRIPTOR.index -> builder.lastSuccessfulDeployment = deserializeLastDeploymentInfoDocument(deserializer)
LOADBALANCERINFO_DESCRIPTOR.index -> builder.loadBalancerInfo = deserializeLoadBalancerInfoDocument(deserializer)
ONPREMISESINSTANCETAGFILTERS_DESCRIPTOR.index -> builder.onPremisesInstanceTagFilters =
deserializer.deserializeList(ONPREMISESINSTANCETAGFILTERS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeTagFilterDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
ONPREMISESTAGSET_DESCRIPTOR.index -> builder.onPremisesTagSet = deserializeOnPremisesTagSetDocument(deserializer)
OUTDATEDINSTANCESSTRATEGY_DESCRIPTOR.index -> builder.outdatedInstancesStrategy = deserializeString().let { OutdatedInstancesStrategy.fromValue(it) }
SERVICEROLEARN_DESCRIPTOR.index -> builder.serviceRoleArn = deserializeString()
TARGETREVISION_DESCRIPTOR.index -> builder.targetRevision = deserializeRevisionLocationDocument(deserializer)
TERMINATIONHOOKENABLED_DESCRIPTOR.index -> builder.terminationHookEnabled = deserializeBoolean()
TRIGGERCONFIGURATIONS_DESCRIPTOR.index -> builder.triggerConfigurations =
deserializer.deserializeList(TRIGGERCONFIGURATIONS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeTriggerConfigDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}