commonMain.aws.sdk.kotlin.services.redshift.serde.ClusterSubnetGroupDocumentDeserializer.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.ClusterSubnetGroup
import aws.smithy.kotlin.runtime.serde.getOrDeserializeErr
import aws.smithy.kotlin.runtime.serde.xml.XmlTagReader
import aws.smithy.kotlin.runtime.serde.xml.tryData
internal fun deserializeClusterSubnetGroupDocument(reader: XmlTagReader): ClusterSubnetGroup {
val builder = ClusterSubnetGroup.Builder()
loop@while (true) {
val curr = reader.nextTag() ?: break@loop
when (curr.tagName) {
// ClusterSubnetGroupName com.amazonaws.redshift#ClusterSubnetGroup$ClusterSubnetGroupName
"ClusterSubnetGroupName" -> builder.clusterSubnetGroupName = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.redshift#String`)" }
// Description com.amazonaws.redshift#ClusterSubnetGroup$Description
"Description" -> builder.description = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.redshift#String`)" }
// VpcId com.amazonaws.redshift#ClusterSubnetGroup$VpcId
"VpcId" -> builder.vpcId = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.redshift#String`)" }
// SubnetGroupStatus com.amazonaws.redshift#ClusterSubnetGroup$SubnetGroupStatus
"SubnetGroupStatus" -> builder.subnetGroupStatus = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.redshift#String`)" }
// Subnets com.amazonaws.redshift#ClusterSubnetGroup$Subnets
"Subnets" -> builder.subnets = deserializeSubnetListShape(curr)
// Tags com.amazonaws.redshift#ClusterSubnetGroup$Tags
"Tags" -> builder.tags = deserializeTagListShape(curr)
// SupportedClusterIpAddressTypes com.amazonaws.redshift#ClusterSubnetGroup$SupportedClusterIpAddressTypes
"SupportedClusterIpAddressTypes" -> builder.supportedClusterIpAddressTypes = deserializeValueStringListShape(curr)
else -> {}
}
curr.drop()
}
builder.correctErrors()
return builder.build()
}