commonMain.aws.sdk.kotlin.services.route53recoverycontrolconfig.serde.NewAssertionRuleDocumentSerializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of route53recoverycontrolconfig-jvm Show documentation
Show all versions of route53recoverycontrolconfig-jvm Show documentation
The AWS Kotlin client for Route53 Recovery Control Config
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.route53recoverycontrolconfig.serde
import aws.sdk.kotlin.services.route53recoverycontrolconfig.model.NewAssertionRule
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 serializeNewAssertionRuleDocument(serializer: Serializer, input: NewAssertionRule) {
val ASSERTEDCONTROLS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("AssertedControls"))
val CONTROLPANELARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ControlPanelArn"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Name"))
val RULECONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("RuleConfig"))
val WAITPERIODMS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("WaitPeriodMs"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ASSERTEDCONTROLS_DESCRIPTOR)
field(CONTROLPANELARN_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(RULECONFIG_DESCRIPTOR)
field(WAITPERIODMS_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
if (input.assertedControls != null) {
listField(ASSERTEDCONTROLS_DESCRIPTOR) {
for (el0 in input.assertedControls) {
serializeString(el0)
}
}
}
input.controlPanelArn?.let { field(CONTROLPANELARN_DESCRIPTOR, it) }
input.name?.let { field(NAME_DESCRIPTOR, it) }
input.ruleConfig?.let { field(RULECONFIG_DESCRIPTOR, it, ::serializeRuleConfigDocument) }
input.waitPeriodMs?.let { field(WAITPERIODMS_DESCRIPTOR, it) }
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy