All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.wafv2.serde.StatementDocumentSerializer.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show 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.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 serializeStatementDocument(serializer: Serializer, input: Statement) {
    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)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        input.byteMatchStatement?.let { field(BYTEMATCHSTATEMENT_DESCRIPTOR, it, ::serializeByteMatchStatementDocument) }
        input.sqliMatchStatement?.let { field(SQLIMATCHSTATEMENT_DESCRIPTOR, it, ::serializeSqliMatchStatementDocument) }
        input.xssMatchStatement?.let { field(XSSMATCHSTATEMENT_DESCRIPTOR, it, ::serializeXssMatchStatementDocument) }
        input.sizeConstraintStatement?.let { field(SIZECONSTRAINTSTATEMENT_DESCRIPTOR, it, ::serializeSizeConstraintStatementDocument) }
        input.geoMatchStatement?.let { field(GEOMATCHSTATEMENT_DESCRIPTOR, it, ::serializeGeoMatchStatementDocument) }
        input.ruleGroupReferenceStatement?.let { field(RULEGROUPREFERENCESTATEMENT_DESCRIPTOR, it, ::serializeRuleGroupReferenceStatementDocument) }
        input.ipSetReferenceStatement?.let { field(IPSETREFERENCESTATEMENT_DESCRIPTOR, it, ::serializeIpSetReferenceStatementDocument) }
        input.regexPatternSetReferenceStatement?.let { field(REGEXPATTERNSETREFERENCESTATEMENT_DESCRIPTOR, it, ::serializeRegexPatternSetReferenceStatementDocument) }
        input.rateBasedStatement?.let { field(RATEBASEDSTATEMENT_DESCRIPTOR, it, ::serializeRateBasedStatementDocument) }
        input.andStatement?.let { field(ANDSTATEMENT_DESCRIPTOR, it, ::serializeAndStatementDocument) }
        input.orStatement?.let { field(ORSTATEMENT_DESCRIPTOR, it, ::serializeOrStatementDocument) }
        input.notStatement?.let { field(NOTSTATEMENT_DESCRIPTOR, it, ::serializeNotStatementDocument) }
        input.managedRuleGroupStatement?.let { field(MANAGEDRULEGROUPSTATEMENT_DESCRIPTOR, it, ::serializeManagedRuleGroupStatementDocument) }
        input.labelMatchStatement?.let { field(LABELMATCHSTATEMENT_DESCRIPTOR, it, ::serializeLabelMatchStatementDocument) }
        input.regexMatchStatement?.let { field(REGEXMATCHSTATEMENT_DESCRIPTOR, it, ::serializeRegexMatchStatementDocument) }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy