commonMain.aws.sdk.kotlin.services.codedeploy.serde.DeploymentInfoDocumentDeserializer.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.ComputePlatform
import aws.sdk.kotlin.services.codedeploy.model.DeploymentCreator
import aws.sdk.kotlin.services.codedeploy.model.DeploymentInfo
import aws.sdk.kotlin.services.codedeploy.model.DeploymentStatus
import aws.sdk.kotlin.services.codedeploy.model.FileExistsBehavior
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 aws.smithy.kotlin.runtime.time.Instant
import aws.smithy.kotlin.runtime.time.TimestampFormat
import kotlin.collections.mutableListOf
internal fun deserializeDeploymentInfoDocument(deserializer: Deserializer): DeploymentInfo {
val builder = DeploymentInfo.Builder()
val ADDITIONALDEPLOYMENTSTATUSINFO_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("additionalDeploymentStatusInfo"))
val APPLICATIONNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("applicationName"))
val AUTOROLLBACKCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("autoRollbackConfiguration"))
val BLUEGREENDEPLOYMENTCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("blueGreenDeploymentConfiguration"))
val COMPLETETIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("completeTime"))
val COMPUTEPLATFORM_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("computePlatform"))
val CREATETIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("createTime"))
val CREATOR_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("creator"))
val DEPLOYMENTCONFIGNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("deploymentConfigName"))
val DEPLOYMENTGROUPNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("deploymentGroupName"))
val DEPLOYMENTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("deploymentId"))
val DEPLOYMENTOVERVIEW_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("deploymentOverview"))
val DEPLOYMENTSTATUSMESSAGES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("deploymentStatusMessages"))
val DEPLOYMENTSTYLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("deploymentStyle"))
val DESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("description"))
val ERRORINFORMATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("errorInformation"))
val EXTERNALID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("externalId"))
val FILEEXISTSBEHAVIOR_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("fileExistsBehavior"))
val IGNOREAPPLICATIONSTOPFAILURES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("ignoreApplicationStopFailures"))
val INSTANCETERMINATIONWAITTIMESTARTED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("instanceTerminationWaitTimeStarted"))
val LOADBALANCERINFO_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("loadBalancerInfo"))
val OVERRIDEALARMCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("overrideAlarmConfiguration"))
val PREVIOUSREVISION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("previousRevision"))
val RELATEDDEPLOYMENTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("relatedDeployments"))
val REVISION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("revision"))
val ROLLBACKINFO_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("rollbackInfo"))
val STARTTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("startTime"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("status"))
val TARGETINSTANCES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("targetInstances"))
val UPDATEOUTDATEDINSTANCESONLY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("updateOutdatedInstancesOnly"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ADDITIONALDEPLOYMENTSTATUSINFO_DESCRIPTOR)
field(APPLICATIONNAME_DESCRIPTOR)
field(AUTOROLLBACKCONFIGURATION_DESCRIPTOR)
field(BLUEGREENDEPLOYMENTCONFIGURATION_DESCRIPTOR)
field(COMPLETETIME_DESCRIPTOR)
field(COMPUTEPLATFORM_DESCRIPTOR)
field(CREATETIME_DESCRIPTOR)
field(CREATOR_DESCRIPTOR)
field(DEPLOYMENTCONFIGNAME_DESCRIPTOR)
field(DEPLOYMENTGROUPNAME_DESCRIPTOR)
field(DEPLOYMENTID_DESCRIPTOR)
field(DEPLOYMENTOVERVIEW_DESCRIPTOR)
field(DEPLOYMENTSTATUSMESSAGES_DESCRIPTOR)
field(DEPLOYMENTSTYLE_DESCRIPTOR)
field(DESCRIPTION_DESCRIPTOR)
field(ERRORINFORMATION_DESCRIPTOR)
field(EXTERNALID_DESCRIPTOR)
field(FILEEXISTSBEHAVIOR_DESCRIPTOR)
field(IGNOREAPPLICATIONSTOPFAILURES_DESCRIPTOR)
field(INSTANCETERMINATIONWAITTIMESTARTED_DESCRIPTOR)
field(LOADBALANCERINFO_DESCRIPTOR)
field(OVERRIDEALARMCONFIGURATION_DESCRIPTOR)
field(PREVIOUSREVISION_DESCRIPTOR)
field(RELATEDDEPLOYMENTS_DESCRIPTOR)
field(REVISION_DESCRIPTOR)
field(ROLLBACKINFO_DESCRIPTOR)
field(STARTTIME_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(TARGETINSTANCES_DESCRIPTOR)
field(UPDATEOUTDATEDINSTANCESONLY_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ADDITIONALDEPLOYMENTSTATUSINFO_DESCRIPTOR.index -> builder.additionalDeploymentStatusInfo = deserializeString()
APPLICATIONNAME_DESCRIPTOR.index -> builder.applicationName = deserializeString()
AUTOROLLBACKCONFIGURATION_DESCRIPTOR.index -> builder.autoRollbackConfiguration = deserializeAutoRollbackConfigurationDocument(deserializer)
BLUEGREENDEPLOYMENTCONFIGURATION_DESCRIPTOR.index -> builder.blueGreenDeploymentConfiguration = deserializeBlueGreenDeploymentConfigurationDocument(deserializer)
COMPLETETIME_DESCRIPTOR.index -> builder.completeTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
COMPUTEPLATFORM_DESCRIPTOR.index -> builder.computePlatform = deserializeString().let { ComputePlatform.fromValue(it) }
CREATETIME_DESCRIPTOR.index -> builder.createTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
CREATOR_DESCRIPTOR.index -> builder.creator = deserializeString().let { DeploymentCreator.fromValue(it) }
DEPLOYMENTCONFIGNAME_DESCRIPTOR.index -> builder.deploymentConfigName = deserializeString()
DEPLOYMENTGROUPNAME_DESCRIPTOR.index -> builder.deploymentGroupName = deserializeString()
DEPLOYMENTID_DESCRIPTOR.index -> builder.deploymentId = deserializeString()
DEPLOYMENTOVERVIEW_DESCRIPTOR.index -> builder.deploymentOverview = deserializeDeploymentOverviewDocument(deserializer)
DEPLOYMENTSTATUSMESSAGES_DESCRIPTOR.index -> builder.deploymentStatusMessages =
deserializer.deserializeList(DEPLOYMENTSTATUSMESSAGES_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
DEPLOYMENTSTYLE_DESCRIPTOR.index -> builder.deploymentStyle = deserializeDeploymentStyleDocument(deserializer)
DESCRIPTION_DESCRIPTOR.index -> builder.description = deserializeString()
ERRORINFORMATION_DESCRIPTOR.index -> builder.errorInformation = deserializeErrorInformationDocument(deserializer)
EXTERNALID_DESCRIPTOR.index -> builder.externalId = deserializeString()
FILEEXISTSBEHAVIOR_DESCRIPTOR.index -> builder.fileExistsBehavior = deserializeString().let { FileExistsBehavior.fromValue(it) }
IGNOREAPPLICATIONSTOPFAILURES_DESCRIPTOR.index -> builder.ignoreApplicationStopFailures = deserializeBoolean()
INSTANCETERMINATIONWAITTIMESTARTED_DESCRIPTOR.index -> builder.instanceTerminationWaitTimeStarted = deserializeBoolean()
LOADBALANCERINFO_DESCRIPTOR.index -> builder.loadBalancerInfo = deserializeLoadBalancerInfoDocument(deserializer)
OVERRIDEALARMCONFIGURATION_DESCRIPTOR.index -> builder.overrideAlarmConfiguration = deserializeAlarmConfigurationDocument(deserializer)
PREVIOUSREVISION_DESCRIPTOR.index -> builder.previousRevision = deserializeRevisionLocationDocument(deserializer)
RELATEDDEPLOYMENTS_DESCRIPTOR.index -> builder.relatedDeployments = deserializeRelatedDeploymentsDocument(deserializer)
REVISION_DESCRIPTOR.index -> builder.revision = deserializeRevisionLocationDocument(deserializer)
ROLLBACKINFO_DESCRIPTOR.index -> builder.rollbackInfo = deserializeRollbackInfoDocument(deserializer)
STARTTIME_DESCRIPTOR.index -> builder.startTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
STATUS_DESCRIPTOR.index -> builder.status = deserializeString().let { DeploymentStatus.fromValue(it) }
TARGETINSTANCES_DESCRIPTOR.index -> builder.targetInstances = deserializeTargetInstancesDocument(deserializer)
UPDATEOUTDATEDINSTANCESONLY_DESCRIPTOR.index -> builder.updateOutdatedInstancesOnly = deserializeBoolean()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}