commonMain.aws.sdk.kotlin.services.glue.serde.MappingDocumentSerializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glue-jvm Show documentation
Show all versions of glue-jvm Show documentation
The AWS SDK for Kotlin client for Glue
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.serde
import aws.sdk.kotlin.services.glue.model.Mapping
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 serializeMappingDocument(serializer: Serializer, input: Mapping) {
val CHILDREN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("Children"))
val DROPPED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("Dropped"))
val FROMPATH_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("FromPath"))
val FROMTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("FromType"))
val TOKEY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ToKey"))
val TOTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ToType"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CHILDREN_DESCRIPTOR)
field(DROPPED_DESCRIPTOR)
field(FROMPATH_DESCRIPTOR)
field(FROMTYPE_DESCRIPTOR)
field(TOKEY_DESCRIPTOR)
field(TOTYPE_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.toKey?.let { field(TOKEY_DESCRIPTOR, it) }
if (input.fromPath != null) {
listField(FROMPATH_DESCRIPTOR) {
for (el0 in input.fromPath) {
serializeString(el0)
}
}
}
input.fromType?.let { field(FROMTYPE_DESCRIPTOR, it) }
input.toType?.let { field(TOTYPE_DESCRIPTOR, it) }
input.dropped?.let { field(DROPPED_DESCRIPTOR, it) }
if (input.children != null) {
listField(CHILDREN_DESCRIPTOR) {
for (el0 in input.children) {
serializeSdkSerializable(asSdkSerializable(el0, ::serializeMappingDocument))
}
}
}
}
}