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

commonMain.aws.sdk.kotlin.services.iot.serde.ExponentialRolloutRateDocumentSerializer.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.ExponentialRolloutRate
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 serializeExponentialRolloutRateDocument(serializer: Serializer, input: ExponentialRolloutRate) {
    val BASERATEPERMINUTE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("baseRatePerMinute"))
    val INCREMENTFACTOR_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Double, JsonSerialName("incrementFactor"))
    val RATEINCREASECRITERIA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("rateIncreaseCriteria"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(BASERATEPERMINUTE_DESCRIPTOR)
        field(INCREMENTFACTOR_DESCRIPTOR)
        field(RATEINCREASECRITERIA_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        field(BASERATEPERMINUTE_DESCRIPTOR, input.baseRatePerMinute)
        field(INCREMENTFACTOR_DESCRIPTOR, input.incrementFactor)
        input.rateIncreaseCriteria?.let { field(RATEINCREASECRITERIA_DESCRIPTOR, it, ::serializeRateIncreaseCriteriaDocument) }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy