commonMain.aws.sdk.kotlin.services.databasemigrationservice.serde.ReplicationTaskDocumentDeserializer.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.MigrationTypeValue
import aws.sdk.kotlin.services.databasemigrationservice.model.ReplicationTask
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
internal fun deserializeReplicationTaskDocument(deserializer: Deserializer): ReplicationTask {
val builder = ReplicationTask.Builder()
val CDCSTARTPOSITION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CdcStartPosition"))
val CDCSTOPPOSITION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CdcStopPosition"))
val LASTFAILUREMESSAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("LastFailureMessage"))
val MIGRATIONTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("MigrationType"))
val RECOVERYCHECKPOINT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("RecoveryCheckpoint"))
val REPLICATIONINSTANCEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ReplicationInstanceArn"))
val REPLICATIONTASKARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ReplicationTaskArn"))
val REPLICATIONTASKCREATIONDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("ReplicationTaskCreationDate"))
val REPLICATIONTASKIDENTIFIER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ReplicationTaskIdentifier"))
val REPLICATIONTASKSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ReplicationTaskSettings"))
val REPLICATIONTASKSTARTDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("ReplicationTaskStartDate"))
val REPLICATIONTASKSTATS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ReplicationTaskStats"))
val SOURCEENDPOINTARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SourceEndpointArn"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Status"))
val STOPREASON_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("StopReason"))
val TABLEMAPPINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TableMappings"))
val TARGETENDPOINTARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TargetEndpointArn"))
val TARGETREPLICATIONINSTANCEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TargetReplicationInstanceArn"))
val TASKDATA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TaskData"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CDCSTARTPOSITION_DESCRIPTOR)
field(CDCSTOPPOSITION_DESCRIPTOR)
field(LASTFAILUREMESSAGE_DESCRIPTOR)
field(MIGRATIONTYPE_DESCRIPTOR)
field(RECOVERYCHECKPOINT_DESCRIPTOR)
field(REPLICATIONINSTANCEARN_DESCRIPTOR)
field(REPLICATIONTASKARN_DESCRIPTOR)
field(REPLICATIONTASKCREATIONDATE_DESCRIPTOR)
field(REPLICATIONTASKIDENTIFIER_DESCRIPTOR)
field(REPLICATIONTASKSETTINGS_DESCRIPTOR)
field(REPLICATIONTASKSTARTDATE_DESCRIPTOR)
field(REPLICATIONTASKSTATS_DESCRIPTOR)
field(SOURCEENDPOINTARN_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(STOPREASON_DESCRIPTOR)
field(TABLEMAPPINGS_DESCRIPTOR)
field(TARGETENDPOINTARN_DESCRIPTOR)
field(TARGETREPLICATIONINSTANCEARN_DESCRIPTOR)
field(TASKDATA_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CDCSTARTPOSITION_DESCRIPTOR.index -> builder.cdcStartPosition = deserializeString()
CDCSTOPPOSITION_DESCRIPTOR.index -> builder.cdcStopPosition = deserializeString()
LASTFAILUREMESSAGE_DESCRIPTOR.index -> builder.lastFailureMessage = deserializeString()
MIGRATIONTYPE_DESCRIPTOR.index -> builder.migrationType = deserializeString().let { MigrationTypeValue.fromValue(it) }
RECOVERYCHECKPOINT_DESCRIPTOR.index -> builder.recoveryCheckpoint = deserializeString()
REPLICATIONINSTANCEARN_DESCRIPTOR.index -> builder.replicationInstanceArn = deserializeString()
REPLICATIONTASKARN_DESCRIPTOR.index -> builder.replicationTaskArn = deserializeString()
REPLICATIONTASKCREATIONDATE_DESCRIPTOR.index -> builder.replicationTaskCreationDate = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
REPLICATIONTASKIDENTIFIER_DESCRIPTOR.index -> builder.replicationTaskIdentifier = deserializeString()
REPLICATIONTASKSETTINGS_DESCRIPTOR.index -> builder.replicationTaskSettings = deserializeString()
REPLICATIONTASKSTARTDATE_DESCRIPTOR.index -> builder.replicationTaskStartDate = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
REPLICATIONTASKSTATS_DESCRIPTOR.index -> builder.replicationTaskStats = deserializeReplicationTaskStatsDocument(deserializer)
SOURCEENDPOINTARN_DESCRIPTOR.index -> builder.sourceEndpointArn = deserializeString()
STATUS_DESCRIPTOR.index -> builder.status = deserializeString()
STOPREASON_DESCRIPTOR.index -> builder.stopReason = deserializeString()
TABLEMAPPINGS_DESCRIPTOR.index -> builder.tableMappings = deserializeString()
TARGETENDPOINTARN_DESCRIPTOR.index -> builder.targetEndpointArn = deserializeString()
TARGETREPLICATIONINSTANCEARN_DESCRIPTOR.index -> builder.targetReplicationInstanceArn = deserializeString()
TASKDATA_DESCRIPTOR.index -> builder.taskData = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy