commonMain.aws.sdk.kotlin.services.cleanrooms.serde.ConfiguredTableAnalysisRuleDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cleanrooms-jvm Show documentation
Show all versions of cleanrooms-jvm Show documentation
The AWS SDK for Kotlin client for CleanRooms
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cleanrooms.serde
import aws.sdk.kotlin.services.cleanrooms.model.ConfiguredTableAnalysisRule
import aws.sdk.kotlin.services.cleanrooms.model.ConfiguredTableAnalysisRuleType
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
import aws.smithy.kotlin.runtime.time.Instant
import aws.smithy.kotlin.runtime.time.TimestampFormat
internal fun deserializeConfiguredTableAnalysisRuleDocument(deserializer: Deserializer): ConfiguredTableAnalysisRule {
val builder = ConfiguredTableAnalysisRule.Builder()
val CONFIGUREDTABLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("configuredTableArn"))
val CONFIGUREDTABLEID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("configuredTableId"))
val CREATETIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("createTime"))
val POLICY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("policy"))
val TYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("type"))
val UPDATETIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("updateTime"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CONFIGUREDTABLEARN_DESCRIPTOR)
field(CONFIGUREDTABLEID_DESCRIPTOR)
field(CREATETIME_DESCRIPTOR)
field(POLICY_DESCRIPTOR)
field(TYPE_DESCRIPTOR)
field(UPDATETIME_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CONFIGUREDTABLEARN_DESCRIPTOR.index -> builder.configuredTableArn = deserializeString()
CONFIGUREDTABLEID_DESCRIPTOR.index -> builder.configuredTableId = deserializeString()
CREATETIME_DESCRIPTOR.index -> builder.createTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
POLICY_DESCRIPTOR.index -> builder.policy = deserializeConfiguredTableAnalysisRulePolicyDocument(deserializer)
TYPE_DESCRIPTOR.index -> builder.type = deserializeString().let { ConfiguredTableAnalysisRuleType.fromValue(it) }
UPDATETIME_DESCRIPTOR.index -> builder.updateTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}