commonMain.aws.sdk.kotlin.services.wafv2.serde.ManagedRuleGroupStatementDocumentSerializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wafv2-jvm Show documentation
Show all versions of wafv2-jvm Show documentation
The AWS Kotlin client for WAFV2
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.wafv2.serde
import aws.sdk.kotlin.services.wafv2.model.ManagedRuleGroupStatement
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 serializeManagedRuleGroupStatementDocument(serializer: Serializer, input: ManagedRuleGroupStatement) {
val EXCLUDEDRULES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("ExcludedRules"))
val MANAGEDRULEGROUPCONFIGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("ManagedRuleGroupConfigs"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Name"))
val RULEACTIONOVERRIDES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("RuleActionOverrides"))
val SCOPEDOWNSTATEMENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ScopeDownStatement"))
val VENDORNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("VendorName"))
val VERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Version"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(EXCLUDEDRULES_DESCRIPTOR)
field(MANAGEDRULEGROUPCONFIGS_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(RULEACTIONOVERRIDES_DESCRIPTOR)
field(SCOPEDOWNSTATEMENT_DESCRIPTOR)
field(VENDORNAME_DESCRIPTOR)
field(VERSION_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
field(VENDORNAME_DESCRIPTOR, input.vendorName)
field(NAME_DESCRIPTOR, input.name)
input.version?.let { field(VERSION_DESCRIPTOR, it) }
if (input.excludedRules != null) {
listField(EXCLUDEDRULES_DESCRIPTOR) {
for (el0 in input.excludedRules) {
serializeSdkSerializable(asSdkSerializable(el0, ::serializeExcludedRuleDocument))
}
}
}
input.scopeDownStatement?.let { field(SCOPEDOWNSTATEMENT_DESCRIPTOR, it, ::serializeStatementDocument) }
if (input.managedRuleGroupConfigs != null) {
listField(MANAGEDRULEGROUPCONFIGS_DESCRIPTOR) {
for (el0 in input.managedRuleGroupConfigs) {
serializeSdkSerializable(asSdkSerializable(el0, ::serializeManagedRuleGroupConfigDocument))
}
}
}
if (input.ruleActionOverrides != null) {
listField(RULEACTIONOVERRIDES_DESCRIPTOR) {
for (el0 in input.ruleActionOverrides) {
serializeSdkSerializable(asSdkSerializable(el0, ::serializeRuleActionOverrideDocument))
}
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy