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

commonMain.aws.sdk.kotlin.services.neptunegraph.serde.ImportTaskDetailsDocumentDeserializer.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.neptunegraph.serde

import aws.sdk.kotlin.services.neptunegraph.model.ImportTaskDetails
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
import aws.smithy.kotlin.runtime.time.Instant
import aws.smithy.kotlin.runtime.time.TimestampFormat

internal fun deserializeImportTaskDetailsDocument(deserializer: Deserializer): ImportTaskDetails {
    val builder = ImportTaskDetails.Builder()
    val DICTIONARYENTRYCOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("dictionaryEntryCount"))
    val ERRORCOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("errorCount"))
    val ERRORDETAILS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("errorDetails"))
    val PROGRESSPERCENTAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("progressPercentage"))
    val STARTTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("startTime"))
    val STATEMENTCOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("statementCount"))
    val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("status"))
    val TIMEELAPSEDSECONDS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("timeElapsedSeconds"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(DICTIONARYENTRYCOUNT_DESCRIPTOR)
        field(ERRORCOUNT_DESCRIPTOR)
        field(ERRORDETAILS_DESCRIPTOR)
        field(PROGRESSPERCENTAGE_DESCRIPTOR)
        field(STARTTIME_DESCRIPTOR)
        field(STATEMENTCOUNT_DESCRIPTOR)
        field(STATUS_DESCRIPTOR)
        field(TIMEELAPSEDSECONDS_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                DICTIONARYENTRYCOUNT_DESCRIPTOR.index -> builder.dictionaryEntryCount = deserializeLong()
                ERRORCOUNT_DESCRIPTOR.index -> builder.errorCount = deserializeInt()
                ERRORDETAILS_DESCRIPTOR.index -> builder.errorDetails = deserializeString()
                PROGRESSPERCENTAGE_DESCRIPTOR.index -> builder.progressPercentage = deserializeInt()
                STARTTIME_DESCRIPTOR.index -> builder.startTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
                STATEMENTCOUNT_DESCRIPTOR.index -> builder.statementCount = deserializeLong()
                STATUS_DESCRIPTOR.index -> builder.status = deserializeString()
                TIMEELAPSEDSECONDS_DESCRIPTOR.index -> builder.timeElapsedSeconds = deserializeLong()
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy