commonMain.aws.sdk.kotlin.services.gamelift.serde.DeploymentConfigurationDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gamelift-jvm Show documentation
Show all versions of gamelift-jvm Show documentation
The AWS SDK for Kotlin client for GameLift
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.gamelift.serde
import aws.sdk.kotlin.services.gamelift.model.DeploymentConfiguration
import aws.sdk.kotlin.services.gamelift.model.DeploymentImpairmentStrategy
import aws.sdk.kotlin.services.gamelift.model.DeploymentProtectionStrategy
import aws.smithy.kotlin.runtime.serde.Deserializer
import aws.smithy.kotlin.runtime.serde.SdkFieldDescriptor
import aws.smithy.kotlin.runtime.serde.SdkObjectDescriptor
import aws.smithy.kotlin.runtime.serde.SerialKind
import aws.smithy.kotlin.runtime.serde.asSdkSerializable
import aws.smithy.kotlin.runtime.serde.deserializeList
import aws.smithy.kotlin.runtime.serde.deserializeMap
import aws.smithy.kotlin.runtime.serde.deserializeStruct
import aws.smithy.kotlin.runtime.serde.field
import aws.smithy.kotlin.runtime.serde.json.JsonDeserializer
import aws.smithy.kotlin.runtime.serde.json.JsonSerialName
import aws.smithy.kotlin.runtime.serde.serializeList
import aws.smithy.kotlin.runtime.serde.serializeMap
import aws.smithy.kotlin.runtime.serde.serializeStruct
internal fun deserializeDeploymentConfigurationDocument(deserializer: Deserializer): DeploymentConfiguration {
val builder = DeploymentConfiguration.Builder()
val IMPAIRMENTSTRATEGY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ImpairmentStrategy"))
val MINIMUMHEALTHYPERCENTAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("MinimumHealthyPercentage"))
val PROTECTIONSTRATEGY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ProtectionStrategy"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(IMPAIRMENTSTRATEGY_DESCRIPTOR)
field(MINIMUMHEALTHYPERCENTAGE_DESCRIPTOR)
field(PROTECTIONSTRATEGY_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
IMPAIRMENTSTRATEGY_DESCRIPTOR.index -> builder.impairmentStrategy = deserializeString().let { DeploymentImpairmentStrategy.fromValue(it) }
MINIMUMHEALTHYPERCENTAGE_DESCRIPTOR.index -> builder.minimumHealthyPercentage = deserializeInt()
PROTECTIONSTRATEGY_DESCRIPTOR.index -> builder.protectionStrategy = deserializeString().let { DeploymentProtectionStrategy.fromValue(it) }
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy