
commonMain.aws.sdk.kotlin.services.s3.serde.PartitionedPrefixDocumentDeserializer.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.PartitionDateSource
import aws.sdk.kotlin.services.s3.model.PartitionedPrefix
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 deserializePartitionedPrefixDocument(reader: XmlTagReader): PartitionedPrefix {
val builder = PartitionedPrefix.Builder()
loop@while (true) {
val curr = reader.nextTag() ?: break@loop
when (curr.tagName) {
// PartitionDateSource com.amazonaws.s3#PartitionedPrefix$PartitionDateSource
"PartitionDateSource" -> builder.partitionDateSource = curr.tryData()
.parse { PartitionDateSource.fromValue(it) }
.getOrDeserializeErr { "expected (enum: `com.amazonaws.s3#PartitionDateSource`)" }
else -> {}
}
curr.drop()
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy