
commonMain.aws.sdk.kotlin.services.s3.serde.InventoryS3BucketDestinationDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.s3.serde
import aws.sdk.kotlin.services.s3.model.InventoryFormat
import aws.sdk.kotlin.services.s3.model.InventoryS3BucketDestination
import aws.smithy.kotlin.runtime.serde.getOrDeserializeErr
import aws.smithy.kotlin.runtime.serde.parse
import aws.smithy.kotlin.runtime.serde.xml.XmlTagReader
import aws.smithy.kotlin.runtime.serde.xml.tryData
internal fun deserializeInventoryS3BucketDestinationDocument(reader: XmlTagReader): InventoryS3BucketDestination {
val builder = InventoryS3BucketDestination.Builder()
loop@while (true) {
val curr = reader.nextTag() ?: break@loop
when (curr.tagName) {
// AccountId com.amazonaws.s3#InventoryS3BucketDestination$AccountId
"AccountId" -> builder.accountId = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.s3#AccountId`)" }
// Bucket com.amazonaws.s3#InventoryS3BucketDestination$Bucket
"Bucket" -> builder.bucket = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.s3#BucketName`)" }
// Format com.amazonaws.s3#InventoryS3BucketDestination$Format
"Format" -> builder.format = curr.tryData()
.parse { InventoryFormat.fromValue(it) }
.getOrDeserializeErr { "expected (enum: `com.amazonaws.s3#InventoryFormat`)" }
// Prefix com.amazonaws.s3#InventoryS3BucketDestination$Prefix
"Prefix" -> builder.prefix = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.s3#Prefix`)" }
// Encryption com.amazonaws.s3#InventoryS3BucketDestination$Encryption
"Encryption" -> builder.encryption = deserializeInventoryEncryptionDocument(curr)
else -> {}
}
curr.drop()
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy