commonMain.aws.sdk.kotlin.services.glue.serde.ColumnStatisticsTaskSettingsDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glue-jvm Show documentation
Show all versions of glue-jvm Show documentation
The AWS SDK for Kotlin client for Glue
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.serde
import aws.sdk.kotlin.services.glue.model.ColumnStatisticsTaskSettings
import aws.sdk.kotlin.services.glue.model.ScheduleType
import aws.sdk.kotlin.services.glue.model.SettingSource
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 kotlin.collections.mutableListOf
internal fun deserializeColumnStatisticsTaskSettingsDocument(deserializer: Deserializer): ColumnStatisticsTaskSettings {
val builder = ColumnStatisticsTaskSettings.Builder()
val CATALOGID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CatalogID"))
val COLUMNNAMELIST_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("ColumnNameList"))
val DATABASENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DatabaseName"))
val LASTEXECUTIONATTEMPT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("LastExecutionAttempt"))
val ROLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Role"))
val SAMPLESIZE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Double, JsonSerialName("SampleSize"))
val SCHEDULE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Schedule"))
val SCHEDULETYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ScheduleType"))
val SECURITYCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SecurityConfiguration"))
val SETTINGSOURCE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("SettingSource"))
val TABLENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TableName"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CATALOGID_DESCRIPTOR)
field(COLUMNNAMELIST_DESCRIPTOR)
field(DATABASENAME_DESCRIPTOR)
field(LASTEXECUTIONATTEMPT_DESCRIPTOR)
field(ROLE_DESCRIPTOR)
field(SAMPLESIZE_DESCRIPTOR)
field(SCHEDULE_DESCRIPTOR)
field(SCHEDULETYPE_DESCRIPTOR)
field(SECURITYCONFIGURATION_DESCRIPTOR)
field(SETTINGSOURCE_DESCRIPTOR)
field(TABLENAME_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CATALOGID_DESCRIPTOR.index -> builder.catalogId = deserializeString()
COLUMNNAMELIST_DESCRIPTOR.index -> builder.columnNameList =
deserializer.deserializeList(COLUMNNAMELIST_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
DATABASENAME_DESCRIPTOR.index -> builder.databaseName = deserializeString()
LASTEXECUTIONATTEMPT_DESCRIPTOR.index -> builder.lastExecutionAttempt = deserializeExecutionAttemptDocument(deserializer)
ROLE_DESCRIPTOR.index -> builder.role = deserializeString()
SAMPLESIZE_DESCRIPTOR.index -> builder.sampleSize = deserializeDouble()
SCHEDULE_DESCRIPTOR.index -> builder.schedule = deserializeScheduleDocument(deserializer)
SCHEDULETYPE_DESCRIPTOR.index -> builder.scheduleType = deserializeString().let { ScheduleType.fromValue(it) }
SECURITYCONFIGURATION_DESCRIPTOR.index -> builder.securityConfiguration = deserializeString()
SETTINGSOURCE_DESCRIPTOR.index -> builder.settingSource = deserializeString().let { SettingSource.fromValue(it) }
TABLENAME_DESCRIPTOR.index -> builder.tableName = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy