commonMain.aws.sdk.kotlin.services.redshift.serde.ParameterDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redshift-jvm Show documentation
Show all versions of redshift-jvm Show documentation
The AWS SDK for Kotlin client for Redshift
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.redshift.serde
import aws.sdk.kotlin.services.redshift.model.Parameter
import aws.sdk.kotlin.services.redshift.model.ParameterApplyType
import aws.smithy.kotlin.runtime.serde.getOrDeserializeErr
import aws.smithy.kotlin.runtime.serde.parse
import aws.smithy.kotlin.runtime.serde.parseBoolean
import aws.smithy.kotlin.runtime.serde.xml.XmlTagReader
import aws.smithy.kotlin.runtime.serde.xml.tryData
internal fun deserializeParameterDocument(reader: XmlTagReader): Parameter {
val builder = Parameter.Builder()
loop@while (true) {
val curr = reader.nextTag() ?: break@loop
when (curr.tagName) {
// ParameterName com.amazonaws.redshift#Parameter$ParameterName
"ParameterName" -> builder.parameterName = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.redshift#String`)" }
// ParameterValue com.amazonaws.redshift#Parameter$ParameterValue
"ParameterValue" -> builder.parameterValue = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.redshift#String`)" }
// Description com.amazonaws.redshift#Parameter$Description
"Description" -> builder.description = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.redshift#String`)" }
// Source com.amazonaws.redshift#Parameter$Source
"Source" -> builder.source = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.redshift#String`)" }
// DataType com.amazonaws.redshift#Parameter$DataType
"DataType" -> builder.dataType = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.redshift#String`)" }
// AllowedValues com.amazonaws.redshift#Parameter$AllowedValues
"AllowedValues" -> builder.allowedValues = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.redshift#String`)" }
// ApplyType com.amazonaws.redshift#Parameter$ApplyType
"ApplyType" -> builder.applyType = curr.tryData()
.parse { ParameterApplyType.fromValue(it) }
.getOrDeserializeErr { "expected (enum: `com.amazonaws.redshift#ParameterApplyType`)" }
// IsModifiable com.amazonaws.redshift#Parameter$IsModifiable
"IsModifiable" -> builder.isModifiable = curr.tryData()
.parseBoolean()
.getOrDeserializeErr { "expected (boolean: `com.amazonaws.redshift#Boolean`)" }
// MinimumEngineVersion com.amazonaws.redshift#Parameter$MinimumEngineVersion
"MinimumEngineVersion" -> builder.minimumEngineVersion = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.redshift#String`)" }
else -> {}
}
curr.drop()
}
builder.correctErrors()
return builder.build()
}