commonMain.aws.sdk.kotlin.services.neptune.serde.EventSubscriptionDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of neptune-jvm Show documentation
Show all versions of neptune-jvm Show documentation
The AWS SDK for Kotlin client for Neptune
// 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()
}