commonMain.aws.sdk.kotlin.services.pinpointsmsvoice.serde.EventDestinationDefinitionDocumentSerializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pinpointsmsvoice-jvm Show documentation
Show all versions of pinpointsmsvoice-jvm Show documentation
The AWS SDK for Kotlin client for Pinpoint SMS Voice
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.pinpointsmsvoice.serde
import aws.sdk.kotlin.services.pinpointsmsvoice.model.EventDestinationDefinition
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.Serializer
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 serializeEventDestinationDefinitionDocument(serializer: Serializer, input: EventDestinationDefinition) {
val CLOUDWATCHLOGSDESTINATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("CloudWatchLogsDestination"))
val ENABLED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("Enabled"))
val KINESISFIREHOSEDESTINATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("KinesisFirehoseDestination"))
val MATCHINGEVENTTYPES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("MatchingEventTypes"))
val SNSDESTINATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("SnsDestination"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CLOUDWATCHLOGSDESTINATION_DESCRIPTOR)
field(ENABLED_DESCRIPTOR)
field(KINESISFIREHOSEDESTINATION_DESCRIPTOR)
field(MATCHINGEVENTTYPES_DESCRIPTOR)
field(SNSDESTINATION_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.cloudWatchLogsDestination?.let { field(CLOUDWATCHLOGSDESTINATION_DESCRIPTOR, it, ::serializeCloudWatchLogsDestinationDocument) }
input.enabled?.let { field(ENABLED_DESCRIPTOR, it) }
input.kinesisFirehoseDestination?.let { field(KINESISFIREHOSEDESTINATION_DESCRIPTOR, it, ::serializeKinesisFirehoseDestinationDocument) }
if (input.matchingEventTypes != null) {
listField(MATCHINGEVENTTYPES_DESCRIPTOR) {
for (el0 in input.matchingEventTypes) {
serializeString(el0.value)
}
}
}
input.snsDestination?.let { field(SNSDESTINATION_DESCRIPTOR, it, ::serializeSnsDestinationDocument) }
}
}