All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.databasemigrationservice.serde.ReplicationTaskAssessmentRunDocumentDeserializer.kt Maven / Gradle / Ivy

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.ReplicationTaskAssessmentRun
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 deserializeReplicationTaskAssessmentRunDocument(deserializer: Deserializer): ReplicationTaskAssessmentRun {
    val builder = ReplicationTaskAssessmentRun.Builder()
    val ASSESSMENTPROGRESS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("AssessmentProgress"))
    val ASSESSMENTRUNNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("AssessmentRunName"))
    val ISLATESTTASKASSESSMENTRUN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("IsLatestTaskAssessmentRun"))
    val LASTFAILUREMESSAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("LastFailureMessage"))
    val REPLICATIONTASKARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ReplicationTaskArn"))
    val REPLICATIONTASKASSESSMENTRUNARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ReplicationTaskAssessmentRunArn"))
    val REPLICATIONTASKASSESSMENTRUNCREATIONDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("ReplicationTaskAssessmentRunCreationDate"))
    val RESULTENCRYPTIONMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ResultEncryptionMode"))
    val RESULTKMSKEYARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ResultKmsKeyArn"))
    val RESULTLOCATIONBUCKET_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ResultLocationBucket"))
    val RESULTLOCATIONFOLDER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ResultLocationFolder"))
    val RESULTSTATISTIC_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ResultStatistic"))
    val SERVICEACCESSROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ServiceAccessRoleArn"))
    val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Status"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(ASSESSMENTPROGRESS_DESCRIPTOR)
        field(ASSESSMENTRUNNAME_DESCRIPTOR)
        field(ISLATESTTASKASSESSMENTRUN_DESCRIPTOR)
        field(LASTFAILUREMESSAGE_DESCRIPTOR)
        field(REPLICATIONTASKARN_DESCRIPTOR)
        field(REPLICATIONTASKASSESSMENTRUNARN_DESCRIPTOR)
        field(REPLICATIONTASKASSESSMENTRUNCREATIONDATE_DESCRIPTOR)
        field(RESULTENCRYPTIONMODE_DESCRIPTOR)
        field(RESULTKMSKEYARN_DESCRIPTOR)
        field(RESULTLOCATIONBUCKET_DESCRIPTOR)
        field(RESULTLOCATIONFOLDER_DESCRIPTOR)
        field(RESULTSTATISTIC_DESCRIPTOR)
        field(SERVICEACCESSROLEARN_DESCRIPTOR)
        field(STATUS_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                ASSESSMENTPROGRESS_DESCRIPTOR.index -> builder.assessmentProgress = deserializeReplicationTaskAssessmentRunProgressDocument(deserializer)
                ASSESSMENTRUNNAME_DESCRIPTOR.index -> builder.assessmentRunName = deserializeString()
                ISLATESTTASKASSESSMENTRUN_DESCRIPTOR.index -> builder.isLatestTaskAssessmentRun = deserializeBoolean()
                LASTFAILUREMESSAGE_DESCRIPTOR.index -> builder.lastFailureMessage = deserializeString()
                REPLICATIONTASKARN_DESCRIPTOR.index -> builder.replicationTaskArn = deserializeString()
                REPLICATIONTASKASSESSMENTRUNARN_DESCRIPTOR.index -> builder.replicationTaskAssessmentRunArn = deserializeString()
                REPLICATIONTASKASSESSMENTRUNCREATIONDATE_DESCRIPTOR.index -> builder.replicationTaskAssessmentRunCreationDate = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
                RESULTENCRYPTIONMODE_DESCRIPTOR.index -> builder.resultEncryptionMode = deserializeString()
                RESULTKMSKEYARN_DESCRIPTOR.index -> builder.resultKmsKeyArn = deserializeString()
                RESULTLOCATIONBUCKET_DESCRIPTOR.index -> builder.resultLocationBucket = deserializeString()
                RESULTLOCATIONFOLDER_DESCRIPTOR.index -> builder.resultLocationFolder = deserializeString()
                RESULTSTATISTIC_DESCRIPTOR.index -> builder.resultStatistic = deserializeReplicationTaskAssessmentRunResultStatisticDocument(deserializer)
                SERVICEACCESSROLEARN_DESCRIPTOR.index -> builder.serviceAccessRoleArn = deserializeString()
                STATUS_DESCRIPTOR.index -> builder.status = deserializeString()
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy