commonMain.aws.sdk.kotlin.services.configservice.serde.DeliveryChannelDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of configservice-jvm Show documentation
Show all versions of configservice-jvm Show documentation
The AWS SDK for Kotlin client for Config Service
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.configservice.serde
import aws.sdk.kotlin.services.configservice.model.DeliveryChannel
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 deserializeDeliveryChannelDocument(deserializer: Deserializer): DeliveryChannel {
val builder = DeliveryChannel.Builder()
val CONFIGSNAPSHOTDELIVERYPROPERTIES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("configSnapshotDeliveryProperties"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("name"))
val S3BUCKETNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("s3BucketName"))
val S3KEYPREFIX_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("s3KeyPrefix"))
val S3KMSKEYARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("s3KmsKeyArn"))
val SNSTOPICARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("snsTopicARN"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CONFIGSNAPSHOTDELIVERYPROPERTIES_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(S3BUCKETNAME_DESCRIPTOR)
field(S3KEYPREFIX_DESCRIPTOR)
field(S3KMSKEYARN_DESCRIPTOR)
field(SNSTOPICARN_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CONFIGSNAPSHOTDELIVERYPROPERTIES_DESCRIPTOR.index -> builder.configSnapshotDeliveryProperties = deserializeConfigSnapshotDeliveryPropertiesDocument(deserializer)
NAME_DESCRIPTOR.index -> builder.name = deserializeString()
S3BUCKETNAME_DESCRIPTOR.index -> builder.s3BucketName = deserializeString()
S3KEYPREFIX_DESCRIPTOR.index -> builder.s3KeyPrefix = deserializeString()
S3KMSKEYARN_DESCRIPTOR.index -> builder.s3KmsKeyArn = deserializeString()
SNSTOPICARN_DESCRIPTOR.index -> builder.snsTopicArn = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}