commonMain.aws.sdk.kotlin.services.ssmincidents.serde.TriggerDetailsDocumentSerializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ssmincidents-jvm Show documentation
Show all versions of ssmincidents-jvm Show documentation
The AWS SDK for Kotlin client for SSM Incidents
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ssmincidents.serde
import aws.sdk.kotlin.services.ssmincidents.model.TriggerDetails
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
import aws.smithy.kotlin.runtime.time.TimestampFormat
internal fun serializeTriggerDetailsDocument(serializer: Serializer, input: TriggerDetails) {
val RAWDATA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("rawData"))
val SOURCE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("source"))
val TIMESTAMP_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("timestamp"))
val TRIGGERARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("triggerArn"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(RAWDATA_DESCRIPTOR)
field(SOURCE_DESCRIPTOR)
field(TIMESTAMP_DESCRIPTOR)
field(TRIGGERARN_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
field(SOURCE_DESCRIPTOR, input.source)
input.triggerArn?.let { field(TRIGGERARN_DESCRIPTOR, it) }
field(TIMESTAMP_DESCRIPTOR, input.timestamp, TimestampFormat.EPOCH_SECONDS)
input.rawData?.let { field(RAWDATA_DESCRIPTOR, it) }
}
}