commonMain.aws.sdk.kotlin.services.bedrockagent.serde.IngestionJobStatisticsDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.bedrockagent.serde
import aws.sdk.kotlin.services.bedrockagent.model.IngestionJobStatistics
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 deserializeIngestionJobStatisticsDocument(deserializer: Deserializer): IngestionJobStatistics {
val builder = IngestionJobStatistics.Builder()
val NUMBEROFDOCUMENTSDELETED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("numberOfDocumentsDeleted"))
val NUMBEROFDOCUMENTSFAILED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("numberOfDocumentsFailed"))
val NUMBEROFDOCUMENTSSCANNED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("numberOfDocumentsScanned"))
val NUMBEROFMETADATADOCUMENTSMODIFIED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("numberOfMetadataDocumentsModified"))
val NUMBEROFMETADATADOCUMENTSSCANNED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("numberOfMetadataDocumentsScanned"))
val NUMBEROFMODIFIEDDOCUMENTSINDEXED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("numberOfModifiedDocumentsIndexed"))
val NUMBEROFNEWDOCUMENTSINDEXED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("numberOfNewDocumentsIndexed"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(NUMBEROFDOCUMENTSDELETED_DESCRIPTOR)
field(NUMBEROFDOCUMENTSFAILED_DESCRIPTOR)
field(NUMBEROFDOCUMENTSSCANNED_DESCRIPTOR)
field(NUMBEROFMETADATADOCUMENTSMODIFIED_DESCRIPTOR)
field(NUMBEROFMETADATADOCUMENTSSCANNED_DESCRIPTOR)
field(NUMBEROFMODIFIEDDOCUMENTSINDEXED_DESCRIPTOR)
field(NUMBEROFNEWDOCUMENTSINDEXED_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
NUMBEROFDOCUMENTSDELETED_DESCRIPTOR.index -> builder.numberOfDocumentsDeleted = deserializeLong()
NUMBEROFDOCUMENTSFAILED_DESCRIPTOR.index -> builder.numberOfDocumentsFailed = deserializeLong()
NUMBEROFDOCUMENTSSCANNED_DESCRIPTOR.index -> builder.numberOfDocumentsScanned = deserializeLong()
NUMBEROFMETADATADOCUMENTSMODIFIED_DESCRIPTOR.index -> builder.numberOfMetadataDocumentsModified = deserializeLong()
NUMBEROFMETADATADOCUMENTSSCANNED_DESCRIPTOR.index -> builder.numberOfMetadataDocumentsScanned = deserializeLong()
NUMBEROFMODIFIEDDOCUMENTSINDEXED_DESCRIPTOR.index -> builder.numberOfModifiedDocumentsIndexed = deserializeLong()
NUMBEROFNEWDOCUMENTSINDEXED_DESCRIPTOR.index -> builder.numberOfNewDocumentsIndexed = deserializeLong()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}