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

commonMain.aws.sdk.kotlin.services.s3control.serde.S3JobManifestGeneratorDocumentDeserializer.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.s3control.serde

import aws.sdk.kotlin.services.s3control.model.S3JobManifestGenerator
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.serializeList
import aws.smithy.kotlin.runtime.serde.serializeMap
import aws.smithy.kotlin.runtime.serde.serializeStruct
import aws.smithy.kotlin.runtime.serde.xml.XmlDeserializer
import aws.smithy.kotlin.runtime.serde.xml.XmlNamespace
import aws.smithy.kotlin.runtime.serde.xml.XmlSerialName

internal fun deserializeS3JobManifestGeneratorDocument(deserializer: Deserializer): S3JobManifestGenerator {
    val builder = S3JobManifestGenerator.Builder()
    val ENABLEMANIFESTOUTPUT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, XmlSerialName("EnableManifestOutput"))
    val EXPECTEDBUCKETOWNER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, XmlSerialName("ExpectedBucketOwner"))
    val FILTER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, XmlSerialName("Filter"))
    val MANIFESTOUTPUTLOCATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, XmlSerialName("ManifestOutputLocation"))
    val SOURCEBUCKET_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, XmlSerialName("SourceBucket"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        trait(XmlSerialName("S3JobManifestGenerator"))
        trait(XmlNamespace("http://awss3control.amazonaws.com/doc/2018-08-20/"))
        field(ENABLEMANIFESTOUTPUT_DESCRIPTOR)
        field(EXPECTEDBUCKETOWNER_DESCRIPTOR)
        field(FILTER_DESCRIPTOR)
        field(MANIFESTOUTPUTLOCATION_DESCRIPTOR)
        field(SOURCEBUCKET_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                ENABLEMANIFESTOUTPUT_DESCRIPTOR.index -> builder.enableManifestOutput = deserializeBoolean()
                EXPECTEDBUCKETOWNER_DESCRIPTOR.index -> builder.expectedBucketOwner = deserializeString()
                FILTER_DESCRIPTOR.index -> builder.filter = deserializeJobManifestGeneratorFilterDocument(deserializer)
                MANIFESTOUTPUTLOCATION_DESCRIPTOR.index -> builder.manifestOutputLocation = deserializeS3ManifestOutputLocationDocument(deserializer)
                SOURCEBUCKET_DESCRIPTOR.index -> builder.sourceBucket = deserializeString()
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy