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

commonMain.aws.sdk.kotlin.services.elasticbeanstalk.serde.PlatformSummaryDocumentDeserializer.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.elasticbeanstalk.serde

import aws.sdk.kotlin.services.elasticbeanstalk.model.PlatformStatus
import aws.sdk.kotlin.services.elasticbeanstalk.model.PlatformSummary
import aws.smithy.kotlin.runtime.serde.getOrDeserializeErr
import aws.smithy.kotlin.runtime.serde.parse
import aws.smithy.kotlin.runtime.serde.xml.XmlTagReader
import aws.smithy.kotlin.runtime.serde.xml.tryData

internal fun deserializePlatformSummaryDocument(reader: XmlTagReader): PlatformSummary {
    val builder = PlatformSummary.Builder()

    loop@while (true) {
        val curr = reader.nextTag() ?: break@loop
        when (curr.tagName) {
            // PlatformArn com.amazonaws.elasticbeanstalk#PlatformSummary$PlatformArn
            "PlatformArn" -> builder.platformArn = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.elasticbeanstalk#PlatformArn`)" }
            // PlatformOwner com.amazonaws.elasticbeanstalk#PlatformSummary$PlatformOwner
            "PlatformOwner" -> builder.platformOwner = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.elasticbeanstalk#PlatformOwner`)" }
            // PlatformStatus com.amazonaws.elasticbeanstalk#PlatformSummary$PlatformStatus
            "PlatformStatus" -> builder.platformStatus = curr.tryData()
                .parse { PlatformStatus.fromValue(it) }
                .getOrDeserializeErr { "expected (enum: `com.amazonaws.elasticbeanstalk#PlatformStatus`)" }
            // PlatformCategory com.amazonaws.elasticbeanstalk#PlatformSummary$PlatformCategory
            "PlatformCategory" -> builder.platformCategory = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.elasticbeanstalk#PlatformCategory`)" }
            // OperatingSystemName com.amazonaws.elasticbeanstalk#PlatformSummary$OperatingSystemName
            "OperatingSystemName" -> builder.operatingSystemName = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.elasticbeanstalk#OperatingSystemName`)" }
            // OperatingSystemVersion com.amazonaws.elasticbeanstalk#PlatformSummary$OperatingSystemVersion
            "OperatingSystemVersion" -> builder.operatingSystemVersion = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.elasticbeanstalk#OperatingSystemVersion`)" }
            // SupportedTierList com.amazonaws.elasticbeanstalk#PlatformSummary$SupportedTierList
            "SupportedTierList" -> builder.supportedTierList = deserializeSupportedTierListShape(curr)
            // SupportedAddonList com.amazonaws.elasticbeanstalk#PlatformSummary$SupportedAddonList
            "SupportedAddonList" -> builder.supportedAddonList = deserializeSupportedAddonListShape(curr)
            // PlatformLifecycleState com.amazonaws.elasticbeanstalk#PlatformSummary$PlatformLifecycleState
            "PlatformLifecycleState" -> builder.platformLifecycleState = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.elasticbeanstalk#PlatformLifecycleState`)" }
            // PlatformVersion com.amazonaws.elasticbeanstalk#PlatformSummary$PlatformVersion
            "PlatformVersion" -> builder.platformVersion = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.elasticbeanstalk#PlatformVersion`)" }
            // PlatformBranchName com.amazonaws.elasticbeanstalk#PlatformSummary$PlatformBranchName
            "PlatformBranchName" -> builder.platformBranchName = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.elasticbeanstalk#BranchName`)" }
            // PlatformBranchLifecycleState com.amazonaws.elasticbeanstalk#PlatformSummary$PlatformBranchLifecycleState
            "PlatformBranchLifecycleState" -> builder.platformBranchLifecycleState = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.elasticbeanstalk#PlatformBranchLifecycleState`)" }
            else -> {}
        }
        curr.drop()
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy