![JAR search and dependency download from the Maven repository](/logo.png)
commonMain.aws.sdk.kotlin.services.rdsdata.serde.ColumnMetadataDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rdsdata-jvm Show documentation
Show all versions of rdsdata-jvm Show documentation
The AWS SDK for Kotlin client for RDS Data
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.rdsdata.serde
import aws.sdk.kotlin.services.rdsdata.model.ColumnMetadata
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 deserializeColumnMetadataDocument(deserializer: Deserializer): ColumnMetadata {
val builder = ColumnMetadata.Builder()
val ARRAYBASECOLUMNTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("arrayBaseColumnType"))
val ISAUTOINCREMENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("isAutoIncrement"))
val ISCASESENSITIVE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("isCaseSensitive"))
val ISCURRENCY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("isCurrency"))
val ISSIGNED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("isSigned"))
val LABEL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("label"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("name"))
val NULLABLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("nullable"))
val PRECISION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("precision"))
val SCALE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("scale"))
val SCHEMANAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("schemaName"))
val TABLENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("tableName"))
val TYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("type"))
val TYPENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("typeName"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ARRAYBASECOLUMNTYPE_DESCRIPTOR)
field(ISAUTOINCREMENT_DESCRIPTOR)
field(ISCASESENSITIVE_DESCRIPTOR)
field(ISCURRENCY_DESCRIPTOR)
field(ISSIGNED_DESCRIPTOR)
field(LABEL_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(NULLABLE_DESCRIPTOR)
field(PRECISION_DESCRIPTOR)
field(SCALE_DESCRIPTOR)
field(SCHEMANAME_DESCRIPTOR)
field(TABLENAME_DESCRIPTOR)
field(TYPE_DESCRIPTOR)
field(TYPENAME_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ARRAYBASECOLUMNTYPE_DESCRIPTOR.index -> builder.arrayBaseColumnType = deserializeInt()
ISAUTOINCREMENT_DESCRIPTOR.index -> builder.isAutoIncrement = deserializeBoolean()
ISCASESENSITIVE_DESCRIPTOR.index -> builder.isCaseSensitive = deserializeBoolean()
ISCURRENCY_DESCRIPTOR.index -> builder.isCurrency = deserializeBoolean()
ISSIGNED_DESCRIPTOR.index -> builder.isSigned = deserializeBoolean()
LABEL_DESCRIPTOR.index -> builder.label = deserializeString()
NAME_DESCRIPTOR.index -> builder.name = deserializeString()
NULLABLE_DESCRIPTOR.index -> builder.nullable = deserializeInt()
PRECISION_DESCRIPTOR.index -> builder.precision = deserializeInt()
SCALE_DESCRIPTOR.index -> builder.scale = deserializeInt()
SCHEMANAME_DESCRIPTOR.index -> builder.schemaName = deserializeString()
TABLENAME_DESCRIPTOR.index -> builder.tableName = deserializeString()
TYPE_DESCRIPTOR.index -> builder.type = deserializeInt()
TYPENAME_DESCRIPTOR.index -> builder.typeName = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy