All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.iot.serde.TopicRulePayloadDocumentSerializer.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.iot.serde

import aws.sdk.kotlin.services.iot.model.TopicRulePayload
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 serializeTopicRulePayloadDocument(serializer: Serializer, input: TopicRulePayload) {
    val ACTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("actions"))
    val AWSIOTSQLVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("awsIotSqlVersion"))
    val DESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("description"))
    val ERRORACTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("errorAction"))
    val RULEDISABLED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("ruleDisabled"))
    val SQL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("sql"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(ACTIONS_DESCRIPTOR)
        field(AWSIOTSQLVERSION_DESCRIPTOR)
        field(DESCRIPTION_DESCRIPTOR)
        field(ERRORACTION_DESCRIPTOR)
        field(RULEDISABLED_DESCRIPTOR)
        field(SQL_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        field(SQL_DESCRIPTOR, input.sql)
        input.description?.let { field(DESCRIPTION_DESCRIPTOR, it) }
        listField(ACTIONS_DESCRIPTOR) {
            for (el0 in input.actions) {
                serializeSdkSerializable(asSdkSerializable(el0, ::serializeActionDocument))
            }
        }
        input.ruleDisabled?.let { field(RULEDISABLED_DESCRIPTOR, it) }
        input.awsIotSqlVersion?.let { field(AWSIOTSQLVERSION_DESCRIPTOR, it) }
        input.errorAction?.let { field(ERRORACTION_DESCRIPTOR, it, ::serializeActionDocument) }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy