commonMain.aws.sdk.kotlin.services.applicationinsights.serde.ApplicationInfoDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of applicationinsights-jvm Show documentation
Show all versions of applicationinsights-jvm Show documentation
The AWS SDK for Kotlin client for Application Insights
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.applicationinsights.serde
import aws.sdk.kotlin.services.applicationinsights.model.ApplicationInfo
import aws.sdk.kotlin.services.applicationinsights.model.DiscoveryType
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 deserializeApplicationInfoDocument(deserializer: Deserializer): ApplicationInfo {
val builder = ApplicationInfo.Builder()
val ACCOUNTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("AccountId"))
val ATTACHMISSINGPERMISSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("AttachMissingPermission"))
val AUTOCONFIGENABLED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("AutoConfigEnabled"))
val CWEMONITORENABLED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("CWEMonitorEnabled"))
val DISCOVERYTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("DiscoveryType"))
val LIFECYCLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("LifeCycle"))
val OPSCENTERENABLED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("OpsCenterEnabled"))
val OPSITEMSNSTOPICARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("OpsItemSNSTopicArn"))
val REMARKS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Remarks"))
val RESOURCEGROUPNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ResourceGroupName"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ACCOUNTID_DESCRIPTOR)
field(ATTACHMISSINGPERMISSION_DESCRIPTOR)
field(AUTOCONFIGENABLED_DESCRIPTOR)
field(CWEMONITORENABLED_DESCRIPTOR)
field(DISCOVERYTYPE_DESCRIPTOR)
field(LIFECYCLE_DESCRIPTOR)
field(OPSCENTERENABLED_DESCRIPTOR)
field(OPSITEMSNSTOPICARN_DESCRIPTOR)
field(REMARKS_DESCRIPTOR)
field(RESOURCEGROUPNAME_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ACCOUNTID_DESCRIPTOR.index -> builder.accountId = deserializeString()
ATTACHMISSINGPERMISSION_DESCRIPTOR.index -> builder.attachMissingPermission = deserializeBoolean()
AUTOCONFIGENABLED_DESCRIPTOR.index -> builder.autoConfigEnabled = deserializeBoolean()
CWEMONITORENABLED_DESCRIPTOR.index -> builder.cweMonitorEnabled = deserializeBoolean()
DISCOVERYTYPE_DESCRIPTOR.index -> builder.discoveryType = deserializeString().let { DiscoveryType.fromValue(it) }
LIFECYCLE_DESCRIPTOR.index -> builder.lifeCycle = deserializeString()
OPSCENTERENABLED_DESCRIPTOR.index -> builder.opsCenterEnabled = deserializeBoolean()
OPSITEMSNSTOPICARN_DESCRIPTOR.index -> builder.opsItemSnsTopicArn = deserializeString()
REMARKS_DESCRIPTOR.index -> builder.remarks = deserializeString()
RESOURCEGROUPNAME_DESCRIPTOR.index -> builder.resourceGroupName = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy