commonMain.aws.sdk.kotlin.services.glue.serde.JdbcConnectorOptionsDocumentSerializer.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.JdbcConnectorOptions
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 serializeJdbcConnectorOptionsDocument(serializer: Serializer, input: JdbcConnectorOptions) {
val DATATYPEMAPPING_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("DataTypeMapping"))
val FILTERPREDICATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("FilterPredicate"))
val JOBBOOKMARKKEYS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("JobBookmarkKeys"))
val JOBBOOKMARKKEYSSORTORDER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("JobBookmarkKeysSortOrder"))
val LOWERBOUND_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("LowerBound"))
val NUMPARTITIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("NumPartitions"))
val PARTITIONCOLUMN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("PartitionColumn"))
val UPPERBOUND_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("UpperBound"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(DATATYPEMAPPING_DESCRIPTOR)
field(FILTERPREDICATE_DESCRIPTOR)
field(JOBBOOKMARKKEYS_DESCRIPTOR)
field(JOBBOOKMARKKEYSSORTORDER_DESCRIPTOR)
field(LOWERBOUND_DESCRIPTOR)
field(NUMPARTITIONS_DESCRIPTOR)
field(PARTITIONCOLUMN_DESCRIPTOR)
field(UPPERBOUND_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.filterPredicate?.let { field(FILTERPREDICATE_DESCRIPTOR, it) }
input.partitionColumn?.let { field(PARTITIONCOLUMN_DESCRIPTOR, it) }
input.lowerBound?.let { field(LOWERBOUND_DESCRIPTOR, it) }
input.upperBound?.let { field(UPPERBOUND_DESCRIPTOR, it) }
input.numPartitions?.let { field(NUMPARTITIONS_DESCRIPTOR, it) }
if (input.jobBookmarkKeys != null) {
listField(JOBBOOKMARKKEYS_DESCRIPTOR) {
for (el0 in input.jobBookmarkKeys) {
serializeString(el0)
}
}
}
input.jobBookmarkKeysSortOrder?.let { field(JOBBOOKMARKKEYSSORTORDER_DESCRIPTOR, it) }
if (input.dataTypeMapping != null) {
mapField(DATATYPEMAPPING_DESCRIPTOR) {
input.dataTypeMapping.forEach { (key, value) ->
entry(key.value, value.value)
}
}
}
}
}