All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.codepipeline.serde.JobDataDocumentDeserializer.kt Maven / Gradle / Ivy

There is a newer version: 1.3.99
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.codepipeline.serde

import aws.sdk.kotlin.services.codepipeline.model.Artifact
import aws.sdk.kotlin.services.codepipeline.model.JobData
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 deserializeJobDataDocument(deserializer: Deserializer): JobData {
    val builder = JobData.Builder()
    val ACTIONCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("actionConfiguration"))
    val ACTIONTYPEID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("actionTypeId"))
    val ARTIFACTCREDENTIALS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("artifactCredentials"))
    val CONTINUATIONTOKEN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("continuationToken"))
    val ENCRYPTIONKEY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("encryptionKey"))
    val INPUTARTIFACTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("inputArtifacts"))
    val OUTPUTARTIFACTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("outputArtifacts"))
    val PIPELINECONTEXT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("pipelineContext"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(ACTIONCONFIGURATION_DESCRIPTOR)
        field(ACTIONTYPEID_DESCRIPTOR)
        field(ARTIFACTCREDENTIALS_DESCRIPTOR)
        field(CONTINUATIONTOKEN_DESCRIPTOR)
        field(ENCRYPTIONKEY_DESCRIPTOR)
        field(INPUTARTIFACTS_DESCRIPTOR)
        field(OUTPUTARTIFACTS_DESCRIPTOR)
        field(PIPELINECONTEXT_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                ACTIONCONFIGURATION_DESCRIPTOR.index -> builder.actionConfiguration = deserializeActionConfigurationDocument(deserializer)
                ACTIONTYPEID_DESCRIPTOR.index -> builder.actionTypeId = deserializeActionTypeIdDocument(deserializer)
                ARTIFACTCREDENTIALS_DESCRIPTOR.index -> builder.artifactCredentials = deserializeAwsSessionCredentialsDocument(deserializer)
                CONTINUATIONTOKEN_DESCRIPTOR.index -> builder.continuationToken = deserializeString()
                ENCRYPTIONKEY_DESCRIPTOR.index -> builder.encryptionKey = deserializeEncryptionKeyDocument(deserializer)
                INPUTARTIFACTS_DESCRIPTOR.index -> builder.inputArtifacts =
                    deserializer.deserializeList(INPUTARTIFACTS_DESCRIPTOR) {
                        val col0 = mutableListOf()
                        while (hasNextElement()) {
                            val el0 = if (nextHasValue()) { deserializeArtifactDocument(deserializer) } else { deserializeNull(); continue }
                            col0.add(el0)
                        }
                        col0
                    }
                OUTPUTARTIFACTS_DESCRIPTOR.index -> builder.outputArtifacts =
                    deserializer.deserializeList(OUTPUTARTIFACTS_DESCRIPTOR) {
                        val col0 = mutableListOf()
                        while (hasNextElement()) {
                            val el0 = if (nextHasValue()) { deserializeArtifactDocument(deserializer) } else { deserializeNull(); continue }
                            col0.add(el0)
                        }
                        col0
                    }
                PIPELINECONTEXT_DESCRIPTOR.index -> builder.pipelineContext = deserializePipelineContextDocument(deserializer)
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy