commonMain.aws.sdk.kotlin.services.codepipeline.transform.ActionExecutionOutputDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codepipeline Show documentation
Show all versions of codepipeline Show documentation
The AWS Kotlin client for CodePipeline
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codepipeline.transform
import aws.sdk.kotlin.services.codepipeline.model.ActionExecutionOutput
import aws.sdk.kotlin.services.codepipeline.model.ArtifactDetail
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
import kotlin.collections.mutableMapOf
internal fun deserializeActionExecutionOutputDocument(deserializer: Deserializer): ActionExecutionOutput {
val builder = ActionExecutionOutput.Builder()
val EXECUTIONRESULT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("executionResult"))
val OUTPUTARTIFACTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("outputArtifacts"))
val OUTPUTVARIABLES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("outputVariables"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(EXECUTIONRESULT_DESCRIPTOR)
field(OUTPUTARTIFACTS_DESCRIPTOR)
field(OUTPUTVARIABLES_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
EXECUTIONRESULT_DESCRIPTOR.index -> builder.executionResult = deserializeActionExecutionResultDocument(deserializer)
OUTPUTARTIFACTS_DESCRIPTOR.index -> builder.outputArtifacts =
deserializer.deserializeList(OUTPUTARTIFACTS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeArtifactDetailDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
OUTPUTVARIABLES_DESCRIPTOR.index -> builder.outputVariables =
deserializer.deserializeMap(OUTPUTVARIABLES_DESCRIPTOR) {
val map0 = mutableMapOf()
while (hasNextEntry()) {
val k0 = key()
val v0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
map0[k0] = v0
}
map0
}
null -> break@loop
else -> skipValue()
}
}
}
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy