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

commonMain.aws.sdk.kotlin.services.datasync.serde.TaskExecutionFilesFailedDetailDocumentDeserializer.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.TaskExecutionFilesFailedDetail
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 deserializeTaskExecutionFilesFailedDetailDocument(deserializer: Deserializer): TaskExecutionFilesFailedDetail {
    val builder = TaskExecutionFilesFailedDetail.Builder()
    val DELETE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("Delete"))
    val PREPARE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("Prepare"))
    val TRANSFER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("Transfer"))
    val VERIFY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("Verify"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(DELETE_DESCRIPTOR)
        field(PREPARE_DESCRIPTOR)
        field(TRANSFER_DESCRIPTOR)
        field(VERIFY_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                DELETE_DESCRIPTOR.index -> builder.delete = deserializeLong()
                PREPARE_DESCRIPTOR.index -> builder.prepare = deserializeLong()
                TRANSFER_DESCRIPTOR.index -> builder.transfer = deserializeLong()
                VERIFY_DESCRIPTOR.index -> builder.verify = deserializeLong()
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy