commonMain.aws.sdk.kotlin.services.glue.serde.ActionDocumentSerializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.serde
import aws.sdk.kotlin.services.glue.model.Action
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 serializeActionDocument(serializer: Serializer, input: Action) {
val ARGUMENTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("Arguments"))
val CRAWLERNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CrawlerName"))
val JOBNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("JobName"))
val NOTIFICATIONPROPERTY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("NotificationProperty"))
val SECURITYCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SecurityConfiguration"))
val TIMEOUT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("Timeout"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ARGUMENTS_DESCRIPTOR)
field(CRAWLERNAME_DESCRIPTOR)
field(JOBNAME_DESCRIPTOR)
field(NOTIFICATIONPROPERTY_DESCRIPTOR)
field(SECURITYCONFIGURATION_DESCRIPTOR)
field(TIMEOUT_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.jobName?.let { field(JOBNAME_DESCRIPTOR, it) }
if (input.arguments != null) {
mapField(ARGUMENTS_DESCRIPTOR) {
input.arguments.forEach { (key, value) ->
entry(key, value)
}
}
}
input.timeout?.let { field(TIMEOUT_DESCRIPTOR, it) }
input.securityConfiguration?.let { field(SECURITYCONFIGURATION_DESCRIPTOR, it) }
input.notificationProperty?.let { field(NOTIFICATIONPROPERTY_DESCRIPTOR, it, ::serializeNotificationPropertyDocument) }
input.crawlerName?.let { field(CRAWLERNAME_DESCRIPTOR, it) }
}
}