
commonMain.aws.sdk.kotlin.services.groundstation.serde.EndpointDetailsDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.groundstation.serde
import aws.sdk.kotlin.services.groundstation.model.CapabilityHealth
import aws.sdk.kotlin.services.groundstation.model.CapabilityHealthReason
import aws.sdk.kotlin.services.groundstation.model.EndpointDetails
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
import kotlin.collections.mutableListOf
internal fun deserializeEndpointDetailsDocument(deserializer: Deserializer): EndpointDetails {
val builder = EndpointDetails.Builder()
val AWSGROUNDSTATIONAGENTENDPOINT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("awsGroundStationAgentEndpoint"))
val ENDPOINT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("endpoint"))
val HEALTHREASONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("healthReasons"))
val HEALTHSTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("healthStatus"))
val SECURITYDETAILS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("securityDetails"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(AWSGROUNDSTATIONAGENTENDPOINT_DESCRIPTOR)
field(ENDPOINT_DESCRIPTOR)
field(HEALTHREASONS_DESCRIPTOR)
field(HEALTHSTATUS_DESCRIPTOR)
field(SECURITYDETAILS_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
AWSGROUNDSTATIONAGENTENDPOINT_DESCRIPTOR.index -> builder.awsGroundStationAgentEndpoint = deserializeAwsGroundStationAgentEndpointDocument(deserializer)
ENDPOINT_DESCRIPTOR.index -> builder.endpoint = deserializeDataflowEndpointDocument(deserializer)
HEALTHREASONS_DESCRIPTOR.index -> builder.healthReasons =
deserializer.deserializeList(HEALTHREASONS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString().let { CapabilityHealthReason.fromValue(it) } } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
HEALTHSTATUS_DESCRIPTOR.index -> builder.healthStatus = deserializeString().let { CapabilityHealth.fromValue(it) }
SECURITYDETAILS_DESCRIPTOR.index -> builder.securityDetails = deserializeSecurityDetailsDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy