commonMain.aws.sdk.kotlin.services.finspace.serde.KxEnvironmentDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of finspace-jvm Show documentation
Show all versions of finspace-jvm Show documentation
The AWS SDK for Kotlin client for finspace
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.finspace.serde
import aws.sdk.kotlin.services.finspace.model.CustomDnsServer
import aws.sdk.kotlin.services.finspace.model.DnsStatus
import aws.sdk.kotlin.services.finspace.model.EnvironmentStatus
import aws.sdk.kotlin.services.finspace.model.KxEnvironment
import aws.sdk.kotlin.services.finspace.model.TgwStatus
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 aws.smithy.kotlin.runtime.time.Instant
import kotlin.collections.mutableListOf
internal fun deserializeKxEnvironmentDocument(deserializer: Deserializer): KxEnvironment {
val builder = KxEnvironment.Builder()
val AVAILABILITYZONEIDS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("availabilityZoneIds"))
val AWSACCOUNTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("awsAccountId"))
val CERTIFICATEAUTHORITYARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("certificateAuthorityArn"))
val CREATIONTIMESTAMP_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("creationTimestamp"))
val CUSTOMDNSCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("customDNSConfiguration"))
val DEDICATEDSERVICEACCOUNTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("dedicatedServiceAccountId"))
val DESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("description"))
val DNSSTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("dnsStatus"))
val ENVIRONMENTARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("environmentArn"))
val ENVIRONMENTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("environmentId"))
val ERRORMESSAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("errorMessage"))
val KMSKEYID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("kmsKeyId"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("name"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("status"))
val TGWSTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("tgwStatus"))
val TRANSITGATEWAYCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("transitGatewayConfiguration"))
val UPDATETIMESTAMP_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("updateTimestamp"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(AVAILABILITYZONEIDS_DESCRIPTOR)
field(AWSACCOUNTID_DESCRIPTOR)
field(CERTIFICATEAUTHORITYARN_DESCRIPTOR)
field(CREATIONTIMESTAMP_DESCRIPTOR)
field(CUSTOMDNSCONFIGURATION_DESCRIPTOR)
field(DEDICATEDSERVICEACCOUNTID_DESCRIPTOR)
field(DESCRIPTION_DESCRIPTOR)
field(DNSSTATUS_DESCRIPTOR)
field(ENVIRONMENTARN_DESCRIPTOR)
field(ENVIRONMENTID_DESCRIPTOR)
field(ERRORMESSAGE_DESCRIPTOR)
field(KMSKEYID_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(TGWSTATUS_DESCRIPTOR)
field(TRANSITGATEWAYCONFIGURATION_DESCRIPTOR)
field(UPDATETIMESTAMP_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
AVAILABILITYZONEIDS_DESCRIPTOR.index -> builder.availabilityZoneIds =
deserializer.deserializeList(AVAILABILITYZONEIDS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
AWSACCOUNTID_DESCRIPTOR.index -> builder.awsAccountId = deserializeString()
CERTIFICATEAUTHORITYARN_DESCRIPTOR.index -> builder.certificateAuthorityArn = deserializeString()
CREATIONTIMESTAMP_DESCRIPTOR.index -> builder.creationTimestamp = deserializeString().let { Instant.fromEpochSeconds(it) }
CUSTOMDNSCONFIGURATION_DESCRIPTOR.index -> builder.customDnsConfiguration =
deserializer.deserializeList(CUSTOMDNSCONFIGURATION_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeCustomDnsServerDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
DEDICATEDSERVICEACCOUNTID_DESCRIPTOR.index -> builder.dedicatedServiceAccountId = deserializeString()
DESCRIPTION_DESCRIPTOR.index -> builder.description = deserializeString()
DNSSTATUS_DESCRIPTOR.index -> builder.dnsStatus = deserializeString().let { DnsStatus.fromValue(it) }
ENVIRONMENTARN_DESCRIPTOR.index -> builder.environmentArn = deserializeString()
ENVIRONMENTID_DESCRIPTOR.index -> builder.environmentId = deserializeString()
ERRORMESSAGE_DESCRIPTOR.index -> builder.errorMessage = deserializeString()
KMSKEYID_DESCRIPTOR.index -> builder.kmsKeyId = deserializeString()
NAME_DESCRIPTOR.index -> builder.name = deserializeString()
STATUS_DESCRIPTOR.index -> builder.status = deserializeString().let { EnvironmentStatus.fromValue(it) }
TGWSTATUS_DESCRIPTOR.index -> builder.tgwStatus = deserializeString().let { TgwStatus.fromValue(it) }
TRANSITGATEWAYCONFIGURATION_DESCRIPTOR.index -> builder.transitGatewayConfiguration = deserializeTransitGatewayConfigurationDocument(deserializer)
UPDATETIMESTAMP_DESCRIPTOR.index -> builder.updateTimestamp = deserializeString().let { Instant.fromEpochSeconds(it) }
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy