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

commonMain.aws.sdk.kotlin.services.sqs.serde.SendMessageBatchResultEntryDocumentDeserializer.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.sqs.serde

import aws.sdk.kotlin.services.sqs.model.SendMessageBatchResultEntry
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 deserializeSendMessageBatchResultEntryDocument(deserializer: Deserializer): SendMessageBatchResultEntry {
    val builder = SendMessageBatchResultEntry.Builder()
    val ID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Id"))
    val MD5OFMESSAGEATTRIBUTES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("MD5OfMessageAttributes"))
    val MD5OFMESSAGEBODY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("MD5OfMessageBody"))
    val MD5OFMESSAGESYSTEMATTRIBUTES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("MD5OfMessageSystemAttributes"))
    val MESSAGEID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("MessageId"))
    val SEQUENCENUMBER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SequenceNumber"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(ID_DESCRIPTOR)
        field(MD5OFMESSAGEATTRIBUTES_DESCRIPTOR)
        field(MD5OFMESSAGEBODY_DESCRIPTOR)
        field(MD5OFMESSAGESYSTEMATTRIBUTES_DESCRIPTOR)
        field(MESSAGEID_DESCRIPTOR)
        field(SEQUENCENUMBER_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                ID_DESCRIPTOR.index -> builder.id = deserializeString()
                MD5OFMESSAGEATTRIBUTES_DESCRIPTOR.index -> builder.md5OfMessageAttributes = deserializeString()
                MD5OFMESSAGEBODY_DESCRIPTOR.index -> builder.md5OfMessageBody = deserializeString()
                MD5OFMESSAGESYSTEMATTRIBUTES_DESCRIPTOR.index -> builder.md5OfMessageSystemAttributes = deserializeString()
                MESSAGEID_DESCRIPTOR.index -> builder.messageId = deserializeString()
                SEQUENCENUMBER_DESCRIPTOR.index -> builder.sequenceNumber = deserializeString()
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy