commonMain.aws.sdk.kotlin.services.outposts.serde.RackPhysicalPropertiesDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of outposts-jvm Show documentation
Show all versions of outposts-jvm Show documentation
The AWS SDK for Kotlin client for Outposts
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.outposts.serde
import aws.sdk.kotlin.services.outposts.model.FiberOpticCableType
import aws.sdk.kotlin.services.outposts.model.MaximumSupportedWeightLbs
import aws.sdk.kotlin.services.outposts.model.OpticalStandard
import aws.sdk.kotlin.services.outposts.model.PowerConnector
import aws.sdk.kotlin.services.outposts.model.PowerDrawKva
import aws.sdk.kotlin.services.outposts.model.PowerFeedDrop
import aws.sdk.kotlin.services.outposts.model.PowerPhase
import aws.sdk.kotlin.services.outposts.model.RackPhysicalProperties
import aws.sdk.kotlin.services.outposts.model.UplinkCount
import aws.sdk.kotlin.services.outposts.model.UplinkGbps
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 deserializeRackPhysicalPropertiesDocument(deserializer: Deserializer): RackPhysicalProperties {
val builder = RackPhysicalProperties.Builder()
val FIBEROPTICCABLETYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("FiberOpticCableType"))
val MAXIMUMSUPPORTEDWEIGHTLBS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("MaximumSupportedWeightLbs"))
val OPTICALSTANDARD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("OpticalStandard"))
val POWERCONNECTOR_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("PowerConnector"))
val POWERDRAWKVA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("PowerDrawKva"))
val POWERFEEDDROP_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("PowerFeedDrop"))
val POWERPHASE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("PowerPhase"))
val UPLINKCOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("UplinkCount"))
val UPLINKGBPS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("UplinkGbps"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(FIBEROPTICCABLETYPE_DESCRIPTOR)
field(MAXIMUMSUPPORTEDWEIGHTLBS_DESCRIPTOR)
field(OPTICALSTANDARD_DESCRIPTOR)
field(POWERCONNECTOR_DESCRIPTOR)
field(POWERDRAWKVA_DESCRIPTOR)
field(POWERFEEDDROP_DESCRIPTOR)
field(POWERPHASE_DESCRIPTOR)
field(UPLINKCOUNT_DESCRIPTOR)
field(UPLINKGBPS_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
FIBEROPTICCABLETYPE_DESCRIPTOR.index -> builder.fiberOpticCableType = deserializeString().let { FiberOpticCableType.fromValue(it) }
MAXIMUMSUPPORTEDWEIGHTLBS_DESCRIPTOR.index -> builder.maximumSupportedWeightLbs = deserializeString().let { MaximumSupportedWeightLbs.fromValue(it) }
OPTICALSTANDARD_DESCRIPTOR.index -> builder.opticalStandard = deserializeString().let { OpticalStandard.fromValue(it) }
POWERCONNECTOR_DESCRIPTOR.index -> builder.powerConnector = deserializeString().let { PowerConnector.fromValue(it) }
POWERDRAWKVA_DESCRIPTOR.index -> builder.powerDrawKva = deserializeString().let { PowerDrawKva.fromValue(it) }
POWERFEEDDROP_DESCRIPTOR.index -> builder.powerFeedDrop = deserializeString().let { PowerFeedDrop.fromValue(it) }
POWERPHASE_DESCRIPTOR.index -> builder.powerPhase = deserializeString().let { PowerPhase.fromValue(it) }
UPLINKCOUNT_DESCRIPTOR.index -> builder.uplinkCount = deserializeString().let { UplinkCount.fromValue(it) }
UPLINKGBPS_DESCRIPTOR.index -> builder.uplinkGbps = deserializeString().let { UplinkGbps.fromValue(it) }
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy