commonMain.aws.sdk.kotlin.services.redshiftserverless.serde.NetworkInterfaceDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redshiftserverless-jvm Show documentation
Show all versions of redshiftserverless-jvm Show documentation
The AWS SDK for Kotlin client for Redshift Serverless
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.redshiftserverless.serde
import aws.sdk.kotlin.services.redshiftserverless.model.NetworkInterface
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 deserializeNetworkInterfaceDocument(deserializer: Deserializer): NetworkInterface {
val builder = NetworkInterface.Builder()
val AVAILABILITYZONE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("availabilityZone"))
val IPV6ADDRESS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ipv6Address"))
val NETWORKINTERFACEID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("networkInterfaceId"))
val PRIVATEIPADDRESS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("privateIpAddress"))
val SUBNETID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("subnetId"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(AVAILABILITYZONE_DESCRIPTOR)
field(IPV6ADDRESS_DESCRIPTOR)
field(NETWORKINTERFACEID_DESCRIPTOR)
field(PRIVATEIPADDRESS_DESCRIPTOR)
field(SUBNETID_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
AVAILABILITYZONE_DESCRIPTOR.index -> builder.availabilityZone = deserializeString()
IPV6ADDRESS_DESCRIPTOR.index -> builder.ipv6Address = deserializeString()
NETWORKINTERFACEID_DESCRIPTOR.index -> builder.networkInterfaceId = deserializeString()
PRIVATEIPADDRESS_DESCRIPTOR.index -> builder.privateIpAddress = deserializeString()
SUBNETID_DESCRIPTOR.index -> builder.subnetId = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}