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

commonMain.aws.sdk.kotlin.services.ssm.serde.InstanceAssociationStatusInfoDocumentDeserializer.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.ssm.serde

import aws.sdk.kotlin.services.ssm.model.InstanceAssociationStatusInfo
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 deserializeInstanceAssociationStatusInfoDocument(deserializer: Deserializer): InstanceAssociationStatusInfo {
    val builder = InstanceAssociationStatusInfo.Builder()
    val ASSOCIATIONID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("AssociationId"))
    val ASSOCIATIONNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("AssociationName"))
    val ASSOCIATIONVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("AssociationVersion"))
    val DETAILEDSTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DetailedStatus"))
    val DOCUMENTVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DocumentVersion"))
    val ERRORCODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ErrorCode"))
    val EXECUTIONDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("ExecutionDate"))
    val EXECUTIONSUMMARY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ExecutionSummary"))
    val INSTANCEID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("InstanceId"))
    val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Name"))
    val OUTPUTURL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("OutputUrl"))
    val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Status"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(ASSOCIATIONID_DESCRIPTOR)
        field(ASSOCIATIONNAME_DESCRIPTOR)
        field(ASSOCIATIONVERSION_DESCRIPTOR)
        field(DETAILEDSTATUS_DESCRIPTOR)
        field(DOCUMENTVERSION_DESCRIPTOR)
        field(ERRORCODE_DESCRIPTOR)
        field(EXECUTIONDATE_DESCRIPTOR)
        field(EXECUTIONSUMMARY_DESCRIPTOR)
        field(INSTANCEID_DESCRIPTOR)
        field(NAME_DESCRIPTOR)
        field(OUTPUTURL_DESCRIPTOR)
        field(STATUS_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                ASSOCIATIONID_DESCRIPTOR.index -> builder.associationId = deserializeString()
                ASSOCIATIONNAME_DESCRIPTOR.index -> builder.associationName = deserializeString()
                ASSOCIATIONVERSION_DESCRIPTOR.index -> builder.associationVersion = deserializeString()
                DETAILEDSTATUS_DESCRIPTOR.index -> builder.detailedStatus = deserializeString()
                DOCUMENTVERSION_DESCRIPTOR.index -> builder.documentVersion = deserializeString()
                ERRORCODE_DESCRIPTOR.index -> builder.errorCode = deserializeString()
                EXECUTIONDATE_DESCRIPTOR.index -> builder.executionDate = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
                EXECUTIONSUMMARY_DESCRIPTOR.index -> builder.executionSummary = deserializeString()
                INSTANCEID_DESCRIPTOR.index -> builder.instanceId = deserializeString()
                NAME_DESCRIPTOR.index -> builder.name = deserializeString()
                OUTPUTURL_DESCRIPTOR.index -> builder.outputUrl = deserializeInstanceAssociationOutputUrlDocument(deserializer)
                STATUS_DESCRIPTOR.index -> builder.status = deserializeString()
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy