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

commonMain.aws.sdk.kotlin.services.kinesisanalytics.serde.ApplicationUpdateDocumentSerializer.kt Maven / Gradle / Ivy

There is a newer version: 1.3.35
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.kinesisanalytics.serde

import aws.sdk.kotlin.services.kinesisanalytics.model.ApplicationUpdate
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 serializeApplicationUpdateDocument(serializer: Serializer, input: ApplicationUpdate) {
    val APPLICATIONCODEUPDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ApplicationCodeUpdate"))
    val CLOUDWATCHLOGGINGOPTIONUPDATES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("CloudWatchLoggingOptionUpdates"))
    val INPUTUPDATES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("InputUpdates"))
    val OUTPUTUPDATES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("OutputUpdates"))
    val REFERENCEDATASOURCEUPDATES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("ReferenceDataSourceUpdates"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(APPLICATIONCODEUPDATE_DESCRIPTOR)
        field(CLOUDWATCHLOGGINGOPTIONUPDATES_DESCRIPTOR)
        field(INPUTUPDATES_DESCRIPTOR)
        field(OUTPUTUPDATES_DESCRIPTOR)
        field(REFERENCEDATASOURCEUPDATES_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        if (input.inputUpdates != null) {
            listField(INPUTUPDATES_DESCRIPTOR) {
                for (el0 in input.inputUpdates) {
                    serializeSdkSerializable(asSdkSerializable(el0, ::serializeInputUpdateDocument))
                }
            }
        }
        input.applicationCodeUpdate?.let { field(APPLICATIONCODEUPDATE_DESCRIPTOR, it) }
        if (input.outputUpdates != null) {
            listField(OUTPUTUPDATES_DESCRIPTOR) {
                for (el0 in input.outputUpdates) {
                    serializeSdkSerializable(asSdkSerializable(el0, ::serializeOutputUpdateDocument))
                }
            }
        }
        if (input.referenceDataSourceUpdates != null) {
            listField(REFERENCEDATASOURCEUPDATES_DESCRIPTOR) {
                for (el0 in input.referenceDataSourceUpdates) {
                    serializeSdkSerializable(asSdkSerializable(el0, ::serializeReferenceDataSourceUpdateDocument))
                }
            }
        }
        if (input.cloudWatchLoggingOptionUpdates != null) {
            listField(CLOUDWATCHLOGGINGOPTIONUPDATES_DESCRIPTOR) {
                for (el0 in input.cloudWatchLoggingOptionUpdates) {
                    serializeSdkSerializable(asSdkSerializable(el0, ::serializeCloudWatchLoggingOptionUpdateDocument))
                }
            }
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy