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

commonMain.aws.sdk.kotlin.services.neptune.serde.ParameterDocumentDeserializer.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.neptune.serde

import aws.sdk.kotlin.services.neptune.model.ApplyMethod
import aws.sdk.kotlin.services.neptune.model.Parameter
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.neptune#Parameter$ParameterName
            "ParameterName" -> builder.parameterName = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.neptune#String`)" }
            // ParameterValue com.amazonaws.neptune#Parameter$ParameterValue
            "ParameterValue" -> builder.parameterValue = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.neptune#String`)" }
            // Description com.amazonaws.neptune#Parameter$Description
            "Description" -> builder.description = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.neptune#String`)" }
            // Source com.amazonaws.neptune#Parameter$Source
            "Source" -> builder.source = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.neptune#String`)" }
            // ApplyType com.amazonaws.neptune#Parameter$ApplyType
            "ApplyType" -> builder.applyType = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.neptune#String`)" }
            // DataType com.amazonaws.neptune#Parameter$DataType
            "DataType" -> builder.dataType = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.neptune#String`)" }
            // AllowedValues com.amazonaws.neptune#Parameter$AllowedValues
            "AllowedValues" -> builder.allowedValues = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.neptune#String`)" }
            // IsModifiable com.amazonaws.neptune#Parameter$IsModifiable
            "IsModifiable" -> builder.isModifiable = curr.tryData()
                .parseBoolean()
                .getOrDeserializeErr { "expected (boolean: `com.amazonaws.neptune#Boolean`)" }
            // MinimumEngineVersion com.amazonaws.neptune#Parameter$MinimumEngineVersion
            "MinimumEngineVersion" -> builder.minimumEngineVersion = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.neptune#String`)" }
            // ApplyMethod com.amazonaws.neptune#Parameter$ApplyMethod
            "ApplyMethod" -> builder.applyMethod = curr.tryData()
                .parse { ApplyMethod.fromValue(it) }
                .getOrDeserializeErr { "expected (enum: `com.amazonaws.neptune#ApplyMethod`)" }
            else -> {}
        }
        curr.drop()
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy