commonMain.aws.sdk.kotlin.services.glue.serde.PiiDetectionDocumentSerializer.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.PiiDetection
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 serializePiiDetectionDocument(serializer: Serializer, input: PiiDetection) {
val ENTITYTYPESTODETECT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("EntityTypesToDetect"))
val INPUTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("Inputs"))
val MASKVALUE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("MaskValue"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Name"))
val OUTPUTCOLUMNNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("OutputColumnName"))
val PIITYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("PiiType"))
val SAMPLEFRACTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Double, JsonSerialName("SampleFraction"))
val THRESHOLDFRACTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Double, JsonSerialName("ThresholdFraction"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ENTITYTYPESTODETECT_DESCRIPTOR)
field(INPUTS_DESCRIPTOR)
field(MASKVALUE_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(OUTPUTCOLUMNNAME_DESCRIPTOR)
field(PIITYPE_DESCRIPTOR)
field(SAMPLEFRACTION_DESCRIPTOR)
field(THRESHOLDFRACTION_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
field(NAME_DESCRIPTOR, input.name)
listField(INPUTS_DESCRIPTOR) {
for (el0 in input.inputs) {
serializeString(el0)
}
}
field(PIITYPE_DESCRIPTOR, input.piiType.value)
listField(ENTITYTYPESTODETECT_DESCRIPTOR) {
for (el0 in input.entityTypesToDetect) {
serializeString(el0)
}
}
input.outputColumnName?.let { field(OUTPUTCOLUMNNAME_DESCRIPTOR, it) }
input.sampleFraction?.let { field(SAMPLEFRACTION_DESCRIPTOR, it) }
input.thresholdFraction?.let { field(THRESHOLDFRACTION_DESCRIPTOR, it) }
input.maskValue?.let { field(MASKVALUE_DESCRIPTOR, it) }
}
}