commonMain.aws.sdk.kotlin.services.snowdevicemanagement.serde.PhysicalNetworkInterfaceDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of snowdevicemanagement-jvm Show documentation
Show all versions of snowdevicemanagement-jvm Show documentation
The AWS SDK for Kotlin client for Snow Device Management
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.snowdevicemanagement.serde
import aws.sdk.kotlin.services.snowdevicemanagement.model.IpAddressAssignment
import aws.sdk.kotlin.services.snowdevicemanagement.model.PhysicalConnectorType
import aws.sdk.kotlin.services.snowdevicemanagement.model.PhysicalNetworkInterface
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 deserializePhysicalNetworkInterfaceDocument(deserializer: Deserializer): PhysicalNetworkInterface {
val builder = PhysicalNetworkInterface.Builder()
val DEFAULTGATEWAY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("defaultGateway"))
val IPADDRESS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ipAddress"))
val IPADDRESSASSIGNMENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ipAddressAssignment"))
val MACADDRESS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("macAddress"))
val NETMASK_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("netmask"))
val PHYSICALCONNECTORTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("physicalConnectorType"))
val PHYSICALNETWORKINTERFACEID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("physicalNetworkInterfaceId"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(DEFAULTGATEWAY_DESCRIPTOR)
field(IPADDRESS_DESCRIPTOR)
field(IPADDRESSASSIGNMENT_DESCRIPTOR)
field(MACADDRESS_DESCRIPTOR)
field(NETMASK_DESCRIPTOR)
field(PHYSICALCONNECTORTYPE_DESCRIPTOR)
field(PHYSICALNETWORKINTERFACEID_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
DEFAULTGATEWAY_DESCRIPTOR.index -> builder.defaultGateway = deserializeString()
IPADDRESS_DESCRIPTOR.index -> builder.ipAddress = deserializeString()
IPADDRESSASSIGNMENT_DESCRIPTOR.index -> builder.ipAddressAssignment = deserializeString().let { IpAddressAssignment.fromValue(it) }
MACADDRESS_DESCRIPTOR.index -> builder.macAddress = deserializeString()
NETMASK_DESCRIPTOR.index -> builder.netmask = deserializeString()
PHYSICALCONNECTORTYPE_DESCRIPTOR.index -> builder.physicalConnectorType = deserializeString().let { PhysicalConnectorType.fromValue(it) }
PHYSICALNETWORKINTERFACEID_DESCRIPTOR.index -> builder.physicalNetworkInterfaceId = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy