commonMain.aws.sdk.kotlin.services.glue.serde.IntegrationDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glue-jvm Show documentation
Show all versions of glue-jvm Show documentation
The AWS SDK for Kotlin client for Glue
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.serde
import aws.sdk.kotlin.services.glue.model.Integration
import aws.sdk.kotlin.services.glue.model.IntegrationError
import aws.sdk.kotlin.services.glue.model.IntegrationStatus
import aws.sdk.kotlin.services.glue.model.Tag
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 aws.smithy.kotlin.runtime.time.TimestampFormat
import kotlin.collections.mutableListOf
import kotlin.collections.mutableMapOf
internal fun deserializeIntegrationDocument(deserializer: Deserializer): Integration {
val builder = Integration.Builder()
val ADDITIONALENCRYPTIONCONTEXT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("AdditionalEncryptionContext"))
val CREATETIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("CreateTime"))
val DATAFILTER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DataFilter"))
val DESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Description"))
val ERRORS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("Errors"))
val INTEGRATIONARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("IntegrationArn"))
val INTEGRATIONNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("IntegrationName"))
val KMSKEYID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("KmsKeyId"))
val SOURCEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SourceArn"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Status"))
val TAGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("Tags"))
val TARGETARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TargetArn"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ADDITIONALENCRYPTIONCONTEXT_DESCRIPTOR)
field(CREATETIME_DESCRIPTOR)
field(DATAFILTER_DESCRIPTOR)
field(DESCRIPTION_DESCRIPTOR)
field(ERRORS_DESCRIPTOR)
field(INTEGRATIONARN_DESCRIPTOR)
field(INTEGRATIONNAME_DESCRIPTOR)
field(KMSKEYID_DESCRIPTOR)
field(SOURCEARN_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(TAGS_DESCRIPTOR)
field(TARGETARN_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ADDITIONALENCRYPTIONCONTEXT_DESCRIPTOR.index -> builder.additionalEncryptionContext =
deserializer.deserializeMap(ADDITIONALENCRYPTIONCONTEXT_DESCRIPTOR) {
val map0 = mutableMapOf()
while (hasNextEntry()) {
val k0 = key()
val v0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
map0[k0] = v0
}
map0
}
CREATETIME_DESCRIPTOR.index -> builder.createTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
DATAFILTER_DESCRIPTOR.index -> builder.dataFilter = deserializeString()
DESCRIPTION_DESCRIPTOR.index -> builder.description = deserializeString()
ERRORS_DESCRIPTOR.index -> builder.errors =
deserializer.deserializeList(ERRORS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeIntegrationErrorDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
INTEGRATIONARN_DESCRIPTOR.index -> builder.integrationArn = deserializeString()
INTEGRATIONNAME_DESCRIPTOR.index -> builder.integrationName = deserializeString()
KMSKEYID_DESCRIPTOR.index -> builder.kmsKeyId = deserializeString()
SOURCEARN_DESCRIPTOR.index -> builder.sourceArn = deserializeString()
STATUS_DESCRIPTOR.index -> builder.status = deserializeString().let { IntegrationStatus.fromValue(it) }
TAGS_DESCRIPTOR.index -> builder.tags =
deserializer.deserializeList(TAGS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeTagDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
TARGETARN_DESCRIPTOR.index -> builder.targetArn = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy