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

commonMain.aws.sdk.kotlin.services.neptune.serde.EventSubscriptionDocumentDeserializer.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.neptune.serde

import aws.sdk.kotlin.services.neptune.model.EventSubscription
import aws.smithy.kotlin.runtime.serde.getOrDeserializeErr
import aws.smithy.kotlin.runtime.serde.parseBoolean
import aws.smithy.kotlin.runtime.serde.xml.XmlTagReader
import aws.smithy.kotlin.runtime.serde.xml.tryData

internal fun deserializeEventSubscriptionDocument(reader: XmlTagReader): EventSubscription {
    val builder = EventSubscription.Builder()

    loop@while (true) {
        val curr = reader.nextTag() ?: break@loop
        when (curr.tagName) {
            // CustomerAwsId com.amazonaws.neptune#EventSubscription$CustomerAwsId
            "CustomerAwsId" -> builder.customerAwsId = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.neptune#String`)" }
            // CustSubscriptionId com.amazonaws.neptune#EventSubscription$CustSubscriptionId
            "CustSubscriptionId" -> builder.custSubscriptionId = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.neptune#String`)" }
            // SnsTopicArn com.amazonaws.neptune#EventSubscription$SnsTopicArn
            "SnsTopicArn" -> builder.snsTopicArn = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.neptune#String`)" }
            // Status com.amazonaws.neptune#EventSubscription$Status
            "Status" -> builder.status = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.neptune#String`)" }
            // SubscriptionCreationTime com.amazonaws.neptune#EventSubscription$SubscriptionCreationTime
            "SubscriptionCreationTime" -> builder.subscriptionCreationTime = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.neptune#String`)" }
            // SourceType com.amazonaws.neptune#EventSubscription$SourceType
            "SourceType" -> builder.sourceType = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.neptune#String`)" }
            // SourceIdsList com.amazonaws.neptune#EventSubscription$SourceIdsList
            "SourceIdsList" -> builder.sourceIdsList = deserializeSourceIdsListShape(curr)
            // EventCategoriesList com.amazonaws.neptune#EventSubscription$EventCategoriesList
            "EventCategoriesList" -> builder.eventCategoriesList = deserializeEventCategoriesListShape(curr)
            // Enabled com.amazonaws.neptune#EventSubscription$Enabled
            "Enabled" -> builder.enabled = curr.tryData()
                .parseBoolean()
                .getOrDeserializeErr { "expected (boolean: `com.amazonaws.neptune#Boolean`)" }
            // EventSubscriptionArn com.amazonaws.neptune#EventSubscription$EventSubscriptionArn
            "EventSubscriptionArn" -> builder.eventSubscriptionArn = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.neptune#String`)" }
            else -> {}
        }
        curr.drop()
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy