commonMain.aws.sdk.kotlin.services.wafv2.serde.StatementDocumentDeserializer.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
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.wafv2.serde
import aws.sdk.kotlin.services.wafv2.model.Statement
import aws.smithy.kotlin.runtime.serde.Deserializer
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.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 deserializeStatementDocument(deserializer: Deserializer): Statement {
val builder = Statement.Builder()
val ANDSTATEMENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("AndStatement"))
val BYTEMATCHSTATEMENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ByteMatchStatement"))
val GEOMATCHSTATEMENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("GeoMatchStatement"))
val IPSETREFERENCESTATEMENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("IPSetReferenceStatement"))
val LABELMATCHSTATEMENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("LabelMatchStatement"))
val MANAGEDRULEGROUPSTATEMENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ManagedRuleGroupStatement"))
val NOTSTATEMENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("NotStatement"))
val ORSTATEMENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("OrStatement"))
val RATEBASEDSTATEMENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("RateBasedStatement"))
val REGEXMATCHSTATEMENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("RegexMatchStatement"))
val REGEXPATTERNSETREFERENCESTATEMENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("RegexPatternSetReferenceStatement"))
val RULEGROUPREFERENCESTATEMENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("RuleGroupReferenceStatement"))
val SIZECONSTRAINTSTATEMENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("SizeConstraintStatement"))
val SQLIMATCHSTATEMENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("SqliMatchStatement"))
val XSSMATCHSTATEMENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("XssMatchStatement"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ANDSTATEMENT_DESCRIPTOR)
field(BYTEMATCHSTATEMENT_DESCRIPTOR)
field(GEOMATCHSTATEMENT_DESCRIPTOR)
field(IPSETREFERENCESTATEMENT_DESCRIPTOR)
field(LABELMATCHSTATEMENT_DESCRIPTOR)
field(MANAGEDRULEGROUPSTATEMENT_DESCRIPTOR)
field(NOTSTATEMENT_DESCRIPTOR)
field(ORSTATEMENT_DESCRIPTOR)
field(RATEBASEDSTATEMENT_DESCRIPTOR)
field(REGEXMATCHSTATEMENT_DESCRIPTOR)
field(REGEXPATTERNSETREFERENCESTATEMENT_DESCRIPTOR)
field(RULEGROUPREFERENCESTATEMENT_DESCRIPTOR)
field(SIZECONSTRAINTSTATEMENT_DESCRIPTOR)
field(SQLIMATCHSTATEMENT_DESCRIPTOR)
field(XSSMATCHSTATEMENT_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ANDSTATEMENT_DESCRIPTOR.index -> builder.andStatement = deserializeAndStatementDocument(deserializer)
BYTEMATCHSTATEMENT_DESCRIPTOR.index -> builder.byteMatchStatement = deserializeByteMatchStatementDocument(deserializer)
GEOMATCHSTATEMENT_DESCRIPTOR.index -> builder.geoMatchStatement = deserializeGeoMatchStatementDocument(deserializer)
IPSETREFERENCESTATEMENT_DESCRIPTOR.index -> builder.ipSetReferenceStatement = deserializeIpSetReferenceStatementDocument(deserializer)
LABELMATCHSTATEMENT_DESCRIPTOR.index -> builder.labelMatchStatement = deserializeLabelMatchStatementDocument(deserializer)
MANAGEDRULEGROUPSTATEMENT_DESCRIPTOR.index -> builder.managedRuleGroupStatement = deserializeManagedRuleGroupStatementDocument(deserializer)
NOTSTATEMENT_DESCRIPTOR.index -> builder.notStatement = deserializeNotStatementDocument(deserializer)
ORSTATEMENT_DESCRIPTOR.index -> builder.orStatement = deserializeOrStatementDocument(deserializer)
RATEBASEDSTATEMENT_DESCRIPTOR.index -> builder.rateBasedStatement = deserializeRateBasedStatementDocument(deserializer)
REGEXMATCHSTATEMENT_DESCRIPTOR.index -> builder.regexMatchStatement = deserializeRegexMatchStatementDocument(deserializer)
REGEXPATTERNSETREFERENCESTATEMENT_DESCRIPTOR.index -> builder.regexPatternSetReferenceStatement = deserializeRegexPatternSetReferenceStatementDocument(deserializer)
RULEGROUPREFERENCESTATEMENT_DESCRIPTOR.index -> builder.ruleGroupReferenceStatement = deserializeRuleGroupReferenceStatementDocument(deserializer)
SIZECONSTRAINTSTATEMENT_DESCRIPTOR.index -> builder.sizeConstraintStatement = deserializeSizeConstraintStatementDocument(deserializer)
SQLIMATCHSTATEMENT_DESCRIPTOR.index -> builder.sqliMatchStatement = deserializeSqliMatchStatementDocument(deserializer)
XSSMATCHSTATEMENT_DESCRIPTOR.index -> builder.xssMatchStatement = deserializeXssMatchStatementDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy