commonMain.aws.sdk.kotlin.services.datasync.serde.TaskReportConfigDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.datasync.serde
import aws.sdk.kotlin.services.datasync.model.ObjectVersionIds
import aws.sdk.kotlin.services.datasync.model.ReportLevel
import aws.sdk.kotlin.services.datasync.model.ReportOutputType
import aws.sdk.kotlin.services.datasync.model.TaskReportConfig
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
internal fun deserializeTaskReportConfigDocument(deserializer: Deserializer): TaskReportConfig {
val builder = TaskReportConfig.Builder()
val DESTINATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Destination"))
val OBJECTVERSIONIDS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ObjectVersionIds"))
val OUTPUTTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("OutputType"))
val OVERRIDES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Overrides"))
val REPORTLEVEL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ReportLevel"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(DESTINATION_DESCRIPTOR)
field(OBJECTVERSIONIDS_DESCRIPTOR)
field(OUTPUTTYPE_DESCRIPTOR)
field(OVERRIDES_DESCRIPTOR)
field(REPORTLEVEL_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
DESTINATION_DESCRIPTOR.index -> builder.destination = deserializeReportDestinationDocument(deserializer)
OBJECTVERSIONIDS_DESCRIPTOR.index -> builder.objectVersionIds = deserializeString().let { ObjectVersionIds.fromValue(it) }
OUTPUTTYPE_DESCRIPTOR.index -> builder.outputType = deserializeString().let { ReportOutputType.fromValue(it) }
OVERRIDES_DESCRIPTOR.index -> builder.overrides = deserializeReportOverridesDocument(deserializer)
REPORTLEVEL_DESCRIPTOR.index -> builder.reportLevel = deserializeString().let { ReportLevel.fromValue(it) }
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy