commonMain.aws.sdk.kotlin.services.databasemigrationservice.serde.EventSubscriptionDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of databasemigrationservice-jvm Show documentation
Show all versions of databasemigrationservice-jvm Show documentation
The AWS SDK for Kotlin client for Database Migration Service
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.databasemigrationservice.serde
import aws.sdk.kotlin.services.databasemigrationservice.model.EventSubscription
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 kotlin.collections.mutableListOf
internal fun deserializeEventSubscriptionDocument(deserializer: Deserializer): EventSubscription {
val builder = EventSubscription.Builder()
val CUSTSUBSCRIPTIONID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CustSubscriptionId"))
val CUSTOMERAWSID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CustomerAwsId"))
val ENABLED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("Enabled"))
val EVENTCATEGORIESLIST_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("EventCategoriesList"))
val SNSTOPICARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SnsTopicArn"))
val SOURCEIDSLIST_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("SourceIdsList"))
val SOURCETYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SourceType"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Status"))
val SUBSCRIPTIONCREATIONTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SubscriptionCreationTime"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CUSTSUBSCRIPTIONID_DESCRIPTOR)
field(CUSTOMERAWSID_DESCRIPTOR)
field(ENABLED_DESCRIPTOR)
field(EVENTCATEGORIESLIST_DESCRIPTOR)
field(SNSTOPICARN_DESCRIPTOR)
field(SOURCEIDSLIST_DESCRIPTOR)
field(SOURCETYPE_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(SUBSCRIPTIONCREATIONTIME_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CUSTSUBSCRIPTIONID_DESCRIPTOR.index -> builder.custSubscriptionId = deserializeString()
CUSTOMERAWSID_DESCRIPTOR.index -> builder.customerAwsId = deserializeString()
ENABLED_DESCRIPTOR.index -> builder.enabled = deserializeBoolean()
EVENTCATEGORIESLIST_DESCRIPTOR.index -> builder.eventCategoriesList =
deserializer.deserializeList(EVENTCATEGORIESLIST_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
SNSTOPICARN_DESCRIPTOR.index -> builder.snsTopicArn = deserializeString()
SOURCEIDSLIST_DESCRIPTOR.index -> builder.sourceIdsList =
deserializer.deserializeList(SOURCEIDSLIST_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
SOURCETYPE_DESCRIPTOR.index -> builder.sourceType = deserializeString()
STATUS_DESCRIPTOR.index -> builder.status = deserializeString()
SUBSCRIPTIONCREATIONTIME_DESCRIPTOR.index -> builder.subscriptionCreationTime = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy