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

commonMain.aws.sdk.kotlin.services.s3control.serde.JobOperationDocumentDeserializer.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.JobOperation
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 deserializeJobOperationDocument(deserializer: Deserializer): JobOperation {
    val builder = JobOperation.Builder()
    val LAMBDAINVOKE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, XmlSerialName("LambdaInvoke"))
    val S3DELETEOBJECTTAGGING_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, XmlSerialName("S3DeleteObjectTagging"))
    val S3INITIATERESTOREOBJECT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, XmlSerialName("S3InitiateRestoreObject"))
    val S3PUTOBJECTACL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, XmlSerialName("S3PutObjectAcl"))
    val S3PUTOBJECTCOPY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, XmlSerialName("S3PutObjectCopy"))
    val S3PUTOBJECTLEGALHOLD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, XmlSerialName("S3PutObjectLegalHold"))
    val S3PUTOBJECTRETENTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, XmlSerialName("S3PutObjectRetention"))
    val S3PUTOBJECTTAGGING_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, XmlSerialName("S3PutObjectTagging"))
    val S3REPLICATEOBJECT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, XmlSerialName("S3ReplicateObject"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        trait(XmlSerialName("JobOperation"))
        trait(XmlNamespace("http://awss3control.amazonaws.com/doc/2018-08-20/"))
        field(LAMBDAINVOKE_DESCRIPTOR)
        field(S3DELETEOBJECTTAGGING_DESCRIPTOR)
        field(S3INITIATERESTOREOBJECT_DESCRIPTOR)
        field(S3PUTOBJECTACL_DESCRIPTOR)
        field(S3PUTOBJECTCOPY_DESCRIPTOR)
        field(S3PUTOBJECTLEGALHOLD_DESCRIPTOR)
        field(S3PUTOBJECTRETENTION_DESCRIPTOR)
        field(S3PUTOBJECTTAGGING_DESCRIPTOR)
        field(S3REPLICATEOBJECT_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                LAMBDAINVOKE_DESCRIPTOR.index -> builder.lambdaInvoke = deserializeLambdaInvokeOperationDocument(deserializer)
                S3DELETEOBJECTTAGGING_DESCRIPTOR.index -> builder.s3DeleteObjectTagging = deserializeS3DeleteObjectTaggingOperationDocument(deserializer)
                S3INITIATERESTOREOBJECT_DESCRIPTOR.index -> builder.s3InitiateRestoreObject = deserializeS3InitiateRestoreObjectOperationDocument(deserializer)
                S3PUTOBJECTACL_DESCRIPTOR.index -> builder.s3PutObjectAcl = deserializeS3SetObjectAclOperationDocument(deserializer)
                S3PUTOBJECTCOPY_DESCRIPTOR.index -> builder.s3PutObjectCopy = deserializeS3CopyObjectOperationDocument(deserializer)
                S3PUTOBJECTLEGALHOLD_DESCRIPTOR.index -> builder.s3PutObjectLegalHold = deserializeS3SetObjectLegalHoldOperationDocument(deserializer)
                S3PUTOBJECTRETENTION_DESCRIPTOR.index -> builder.s3PutObjectRetention = deserializeS3SetObjectRetentionOperationDocument(deserializer)
                S3PUTOBJECTTAGGING_DESCRIPTOR.index -> builder.s3PutObjectTagging = deserializeS3SetObjectTaggingOperationDocument(deserializer)
                S3REPLICATEOBJECT_DESCRIPTOR.index -> builder.s3ReplicateObject = deserializeS3ReplicateObjectOperationDocument(deserializer)
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy