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

commonMain.aws.sdk.kotlin.services.databasemigrationservice.serde.ReplicationTaskIndividualAssessmentDocumentDeserializer.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.ReplicationTaskIndividualAssessment
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 deserializeReplicationTaskIndividualAssessmentDocument(deserializer: Deserializer): ReplicationTaskIndividualAssessment {
    val builder = ReplicationTaskIndividualAssessment.Builder()
    val INDIVIDUALASSESSMENTNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("IndividualAssessmentName"))
    val REPLICATIONTASKASSESSMENTRUNARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ReplicationTaskAssessmentRunArn"))
    val REPLICATIONTASKINDIVIDUALASSESSMENTARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ReplicationTaskIndividualAssessmentArn"))
    val REPLICATIONTASKINDIVIDUALASSESSMENTSTARTDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("ReplicationTaskIndividualAssessmentStartDate"))
    val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Status"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(INDIVIDUALASSESSMENTNAME_DESCRIPTOR)
        field(REPLICATIONTASKASSESSMENTRUNARN_DESCRIPTOR)
        field(REPLICATIONTASKINDIVIDUALASSESSMENTARN_DESCRIPTOR)
        field(REPLICATIONTASKINDIVIDUALASSESSMENTSTARTDATE_DESCRIPTOR)
        field(STATUS_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                INDIVIDUALASSESSMENTNAME_DESCRIPTOR.index -> builder.individualAssessmentName = deserializeString()
                REPLICATIONTASKASSESSMENTRUNARN_DESCRIPTOR.index -> builder.replicationTaskAssessmentRunArn = deserializeString()
                REPLICATIONTASKINDIVIDUALASSESSMENTARN_DESCRIPTOR.index -> builder.replicationTaskIndividualAssessmentArn = deserializeString()
                REPLICATIONTASKINDIVIDUALASSESSMENTSTARTDATE_DESCRIPTOR.index -> builder.replicationTaskIndividualAssessmentStartDate = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
                STATUS_DESCRIPTOR.index -> builder.status = deserializeString()
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy