
commonMain.aws.sdk.kotlin.services.wellarchitected.transform.ProfileNotificationSummaryDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.wellarchitected.transform
import aws.sdk.kotlin.services.wellarchitected.model.ProfileNotificationSummary
import aws.sdk.kotlin.services.wellarchitected.model.ProfileNotificationType
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 deserializeProfileNotificationSummaryDocument(deserializer: Deserializer): ProfileNotificationSummary {
val builder = ProfileNotificationSummary.Builder()
val CURRENTPROFILEVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CurrentProfileVersion"))
val LATESTPROFILEVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("LatestProfileVersion"))
val PROFILEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ProfileArn"))
val PROFILENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ProfileName"))
val TYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Type"))
val WORKLOADID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("WorkloadId"))
val WORKLOADNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("WorkloadName"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CURRENTPROFILEVERSION_DESCRIPTOR)
field(LATESTPROFILEVERSION_DESCRIPTOR)
field(PROFILEARN_DESCRIPTOR)
field(PROFILENAME_DESCRIPTOR)
field(TYPE_DESCRIPTOR)
field(WORKLOADID_DESCRIPTOR)
field(WORKLOADNAME_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CURRENTPROFILEVERSION_DESCRIPTOR.index -> builder.currentProfileVersion = deserializeString()
LATESTPROFILEVERSION_DESCRIPTOR.index -> builder.latestProfileVersion = deserializeString()
PROFILEARN_DESCRIPTOR.index -> builder.profileArn = deserializeString()
PROFILENAME_DESCRIPTOR.index -> builder.profileName = deserializeString()
TYPE_DESCRIPTOR.index -> builder.type = deserializeString().let { ProfileNotificationType.fromValue(it) }
WORKLOADID_DESCRIPTOR.index -> builder.workloadId = deserializeString()
WORKLOADNAME_DESCRIPTOR.index -> builder.workloadName = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy