commonMain.aws.sdk.kotlin.services.route53recoverycontrolconfig.serde.NewGatingRuleDocumentSerializer.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.NewGatingRule
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 serializeNewGatingRuleDocument(serializer: Serializer, input: NewGatingRule) {
val CONTROLPANELARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ControlPanelArn"))
val GATINGCONTROLS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("GatingControls"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Name"))
val RULECONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("RuleConfig"))
val TARGETCONTROLS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("TargetControls"))
val WAITPERIODMS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("WaitPeriodMs"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CONTROLPANELARN_DESCRIPTOR)
field(GATINGCONTROLS_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(RULECONFIG_DESCRIPTOR)
field(TARGETCONTROLS_DESCRIPTOR)
field(WAITPERIODMS_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.controlPanelArn?.let { field(CONTROLPANELARN_DESCRIPTOR, it) }
if (input.gatingControls != null) {
listField(GATINGCONTROLS_DESCRIPTOR) {
for (el0 in input.gatingControls) {
serializeString(el0)
}
}
}
input.name?.let { field(NAME_DESCRIPTOR, it) }
input.ruleConfig?.let { field(RULECONFIG_DESCRIPTOR, it, ::serializeRuleConfigDocument) }
if (input.targetControls != null) {
listField(TARGETCONTROLS_DESCRIPTOR) {
for (el0 in input.targetControls) {
serializeString(el0)
}
}
}
input.waitPeriodMs?.let { field(WAITPERIODMS_DESCRIPTOR, it) }
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy