All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.redshift.serde.PendingModifiedValuesDocumentDeserializer.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.redshift.serde

import aws.sdk.kotlin.services.redshift.model.PendingModifiedValues
import aws.smithy.kotlin.runtime.serde.getOrDeserializeErr
import aws.smithy.kotlin.runtime.serde.parseBoolean
import aws.smithy.kotlin.runtime.serde.parseInt
import aws.smithy.kotlin.runtime.serde.xml.XmlTagReader
import aws.smithy.kotlin.runtime.serde.xml.tryData

internal fun deserializePendingModifiedValuesDocument(reader: XmlTagReader): PendingModifiedValues {
    val builder = PendingModifiedValues.Builder()

    loop@while (true) {
        val curr = reader.nextTag() ?: break@loop
        when (curr.tagName) {
            // MasterUserPassword com.amazonaws.redshift#PendingModifiedValues$MasterUserPassword
            "MasterUserPassword" -> builder.masterUserPassword = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.redshift#SensitiveString`)" }
            // NodeType com.amazonaws.redshift#PendingModifiedValues$NodeType
            "NodeType" -> builder.nodeType = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.redshift#String`)" }
            // NumberOfNodes com.amazonaws.redshift#PendingModifiedValues$NumberOfNodes
            "NumberOfNodes" -> builder.numberOfNodes = curr.tryData()
                .parseInt()
                .getOrDeserializeErr { "expected (integer: `com.amazonaws.redshift#IntegerOptional`)" }
            // ClusterType com.amazonaws.redshift#PendingModifiedValues$ClusterType
            "ClusterType" -> builder.clusterType = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.redshift#String`)" }
            // ClusterVersion com.amazonaws.redshift#PendingModifiedValues$ClusterVersion
            "ClusterVersion" -> builder.clusterVersion = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.redshift#String`)" }
            // AutomatedSnapshotRetentionPeriod com.amazonaws.redshift#PendingModifiedValues$AutomatedSnapshotRetentionPeriod
            "AutomatedSnapshotRetentionPeriod" -> builder.automatedSnapshotRetentionPeriod = curr.tryData()
                .parseInt()
                .getOrDeserializeErr { "expected (integer: `com.amazonaws.redshift#IntegerOptional`)" }
            // ClusterIdentifier com.amazonaws.redshift#PendingModifiedValues$ClusterIdentifier
            "ClusterIdentifier" -> builder.clusterIdentifier = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.redshift#String`)" }
            // PubliclyAccessible com.amazonaws.redshift#PendingModifiedValues$PubliclyAccessible
            "PubliclyAccessible" -> builder.publiclyAccessible = curr.tryData()
                .parseBoolean()
                .getOrDeserializeErr { "expected (boolean: `com.amazonaws.redshift#BooleanOptional`)" }
            // EnhancedVpcRouting com.amazonaws.redshift#PendingModifiedValues$EnhancedVpcRouting
            "EnhancedVpcRouting" -> builder.enhancedVpcRouting = curr.tryData()
                .parseBoolean()
                .getOrDeserializeErr { "expected (boolean: `com.amazonaws.redshift#BooleanOptional`)" }
            // MaintenanceTrackName com.amazonaws.redshift#PendingModifiedValues$MaintenanceTrackName
            "MaintenanceTrackName" -> builder.maintenanceTrackName = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.redshift#String`)" }
            // EncryptionType com.amazonaws.redshift#PendingModifiedValues$EncryptionType
            "EncryptionType" -> builder.encryptionType = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.redshift#String`)" }
            else -> {}
        }
        curr.drop()
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy