commonMain.aws.sdk.kotlin.services.wafv2.serde.FieldToMatchDocumentDeserializer.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.FieldToMatch
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 deserializeFieldToMatchDocument(deserializer: Deserializer): FieldToMatch {
val builder = FieldToMatch.Builder()
val ALLQUERYARGUMENTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("AllQueryArguments"))
val BODY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Body"))
val COOKIES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Cookies"))
val HEADERORDER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("HeaderOrder"))
val HEADERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Headers"))
val JA3FINGERPRINT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("JA3Fingerprint"))
val JSONBODY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("JsonBody"))
val METHOD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Method"))
val QUERYSTRING_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("QueryString"))
val SINGLEHEADER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("SingleHeader"))
val SINGLEQUERYARGUMENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("SingleQueryArgument"))
val URIPATH_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("UriPath"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ALLQUERYARGUMENTS_DESCRIPTOR)
field(BODY_DESCRIPTOR)
field(COOKIES_DESCRIPTOR)
field(HEADERORDER_DESCRIPTOR)
field(HEADERS_DESCRIPTOR)
field(JA3FINGERPRINT_DESCRIPTOR)
field(JSONBODY_DESCRIPTOR)
field(METHOD_DESCRIPTOR)
field(QUERYSTRING_DESCRIPTOR)
field(SINGLEHEADER_DESCRIPTOR)
field(SINGLEQUERYARGUMENT_DESCRIPTOR)
field(URIPATH_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ALLQUERYARGUMENTS_DESCRIPTOR.index -> builder.allQueryArguments = deserializeAllQueryArgumentsDocument(deserializer)
BODY_DESCRIPTOR.index -> builder.body = deserializeBodyDocument(deserializer)
COOKIES_DESCRIPTOR.index -> builder.cookies = deserializeCookiesDocument(deserializer)
HEADERORDER_DESCRIPTOR.index -> builder.headerOrder = deserializeHeaderOrderDocument(deserializer)
HEADERS_DESCRIPTOR.index -> builder.headers = deserializeHeadersDocument(deserializer)
JA3FINGERPRINT_DESCRIPTOR.index -> builder.ja3Fingerprint = deserializeJa3FingerprintDocument(deserializer)
JSONBODY_DESCRIPTOR.index -> builder.jsonBody = deserializeJsonBodyDocument(deserializer)
METHOD_DESCRIPTOR.index -> builder.method = deserializeMethodDocument(deserializer)
QUERYSTRING_DESCRIPTOR.index -> builder.queryString = deserializeQueryStringDocument(deserializer)
SINGLEHEADER_DESCRIPTOR.index -> builder.singleHeader = deserializeSingleHeaderDocument(deserializer)
SINGLEQUERYARGUMENT_DESCRIPTOR.index -> builder.singleQueryArgument = deserializeSingleQueryArgumentDocument(deserializer)
URIPATH_DESCRIPTOR.index -> builder.uriPath = deserializeUriPathDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy