commonMain.aws.sdk.kotlin.services.databasemigrationservice.serde.ConnectionDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of databasemigrationservice-jvm Show documentation
Show all versions of databasemigrationservice-jvm Show documentation
The AWS SDK for Kotlin client for Database Migration Service
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.databasemigrationservice.serde
import aws.sdk.kotlin.services.databasemigrationservice.model.Connection
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 deserializeConnectionDocument(deserializer: Deserializer): Connection {
val builder = Connection.Builder()
val ENDPOINTARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("EndpointArn"))
val ENDPOINTIDENTIFIER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("EndpointIdentifier"))
val LASTFAILUREMESSAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("LastFailureMessage"))
val REPLICATIONINSTANCEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ReplicationInstanceArn"))
val REPLICATIONINSTANCEIDENTIFIER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ReplicationInstanceIdentifier"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Status"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ENDPOINTARN_DESCRIPTOR)
field(ENDPOINTIDENTIFIER_DESCRIPTOR)
field(LASTFAILUREMESSAGE_DESCRIPTOR)
field(REPLICATIONINSTANCEARN_DESCRIPTOR)
field(REPLICATIONINSTANCEIDENTIFIER_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ENDPOINTARN_DESCRIPTOR.index -> builder.endpointArn = deserializeString()
ENDPOINTIDENTIFIER_DESCRIPTOR.index -> builder.endpointIdentifier = deserializeString()
LASTFAILUREMESSAGE_DESCRIPTOR.index -> builder.lastFailureMessage = deserializeString()
REPLICATIONINSTANCEARN_DESCRIPTOR.index -> builder.replicationInstanceArn = deserializeString()
REPLICATIONINSTANCEIDENTIFIER_DESCRIPTOR.index -> builder.replicationInstanceIdentifier = deserializeString()
STATUS_DESCRIPTOR.index -> builder.status = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy