commonMain.aws.sdk.kotlin.services.glue.serde.InboundIntegrationDocumentDeserializer.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.InboundIntegration
import aws.sdk.kotlin.services.glue.model.IntegrationError
import aws.sdk.kotlin.services.glue.model.IntegrationStatus
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
internal fun deserializeInboundIntegrationDocument(deserializer: Deserializer): InboundIntegration {
val builder = InboundIntegration.Builder()
val CREATETIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("CreateTime"))
val ERRORS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("Errors"))
val INTEGRATIONARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("IntegrationArn"))
val SOURCEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SourceArn"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Status"))
val TARGETARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TargetArn"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CREATETIME_DESCRIPTOR)
field(ERRORS_DESCRIPTOR)
field(INTEGRATIONARN_DESCRIPTOR)
field(SOURCEARN_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(TARGETARN_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CREATETIME_DESCRIPTOR.index -> builder.createTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
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()
SOURCEARN_DESCRIPTOR.index -> builder.sourceArn = deserializeString()
STATUS_DESCRIPTOR.index -> builder.status = deserializeString().let { IntegrationStatus.fromValue(it) }
TARGETARN_DESCRIPTOR.index -> builder.targetArn = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy