commonMain.aws.sdk.kotlin.services.databrew.serde.RuleDocumentSerializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of databrew-jvm Show documentation
Show all versions of databrew-jvm Show documentation
The AWS Kotlin client for DataBrew
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.databrew.serde
import aws.sdk.kotlin.services.databrew.model.Rule
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 serializeRuleDocument(serializer: Serializer, input: Rule) {
val CHECKEXPRESSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CheckExpression"))
val COLUMNSELECTORS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("ColumnSelectors"))
val DISABLED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("Disabled"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Name"))
val SUBSTITUTIONMAP_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("SubstitutionMap"))
val THRESHOLD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Threshold"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CHECKEXPRESSION_DESCRIPTOR)
field(COLUMNSELECTORS_DESCRIPTOR)
field(DISABLED_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(SUBSTITUTIONMAP_DESCRIPTOR)
field(THRESHOLD_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
field(NAME_DESCRIPTOR, input.name)
if (input.disabled != false) field(DISABLED_DESCRIPTOR, input.disabled)
field(CHECKEXPRESSION_DESCRIPTOR, input.checkExpression)
if (input.substitutionMap != null) {
mapField(SUBSTITUTIONMAP_DESCRIPTOR) {
input.substitutionMap.forEach { (key, value) ->
entry(key, value)
}
}
}
input.threshold?.let { field(THRESHOLD_DESCRIPTOR, it, ::serializeThresholdDocument) }
if (input.columnSelectors != null) {
listField(COLUMNSELECTORS_DESCRIPTOR) {
for (el0 in input.columnSelectors) {
serializeSdkSerializable(asSdkSerializable(el0, ::serializeColumnSelectorDocument))
}
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy