
commonMain.aws.sdk.kotlin.services.elasticloadbalancingv2.serde.RuleDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.elasticloadbalancingv2.serde
import aws.sdk.kotlin.services.elasticloadbalancingv2.model.Rule
import aws.smithy.kotlin.runtime.serde.getOrDeserializeErr
import aws.smithy.kotlin.runtime.serde.parseBoolean
import aws.smithy.kotlin.runtime.serde.xml.XmlTagReader
import aws.smithy.kotlin.runtime.serde.xml.tryData
internal fun deserializeRuleDocument(reader: XmlTagReader): Rule {
val builder = Rule.Builder()
loop@while (true) {
val curr = reader.nextTag() ?: break@loop
when (curr.tagName) {
// RuleArn com.amazonaws.elasticloadbalancingv2#Rule$RuleArn
"RuleArn" -> builder.ruleArn = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.elasticloadbalancingv2#RuleArn`)" }
// Priority com.amazonaws.elasticloadbalancingv2#Rule$Priority
"Priority" -> builder.priority = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.elasticloadbalancingv2#String`)" }
// Conditions com.amazonaws.elasticloadbalancingv2#Rule$Conditions
"Conditions" -> builder.conditions = deserializeRuleConditionListShape(curr)
// Actions com.amazonaws.elasticloadbalancingv2#Rule$Actions
"Actions" -> builder.actions = deserializeActionsShape(curr)
// IsDefault com.amazonaws.elasticloadbalancingv2#Rule$IsDefault
"IsDefault" -> builder.isDefault = curr.tryData()
.parseBoolean()
.getOrDeserializeErr { "expected (boolean: `com.amazonaws.elasticloadbalancingv2#IsDefault`)" }
else -> {}
}
curr.drop()
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy