commonMain.aws.sdk.kotlin.services.configservice.serde.OrganizationCustomPolicyRuleMetadataNoPolicyDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of configservice-jvm Show documentation
Show all versions of configservice-jvm Show documentation
The AWS Kotlin client for Config Service
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.configservice.serde
import aws.sdk.kotlin.services.configservice.model.MaximumExecutionFrequency
import aws.sdk.kotlin.services.configservice.model.OrganizationConfigRuleTriggerTypeNoSn
import aws.sdk.kotlin.services.configservice.model.OrganizationCustomPolicyRuleMetadataNoPolicy
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 kotlin.collections.mutableListOf
internal fun deserializeOrganizationCustomPolicyRuleMetadataNoPolicyDocument(deserializer: Deserializer): OrganizationCustomPolicyRuleMetadataNoPolicy {
val builder = OrganizationCustomPolicyRuleMetadataNoPolicy.Builder()
val DEBUGLOGDELIVERYACCOUNTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("DebugLogDeliveryAccounts"))
val DESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Description"))
val INPUTPARAMETERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("InputParameters"))
val MAXIMUMEXECUTIONFREQUENCY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("MaximumExecutionFrequency"))
val ORGANIZATIONCONFIGRULETRIGGERTYPES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("OrganizationConfigRuleTriggerTypes"))
val POLICYRUNTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("PolicyRuntime"))
val RESOURCEIDSCOPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ResourceIdScope"))
val RESOURCETYPESSCOPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("ResourceTypesScope"))
val TAGKEYSCOPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TagKeyScope"))
val TAGVALUESCOPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TagValueScope"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(DEBUGLOGDELIVERYACCOUNTS_DESCRIPTOR)
field(DESCRIPTION_DESCRIPTOR)
field(INPUTPARAMETERS_DESCRIPTOR)
field(MAXIMUMEXECUTIONFREQUENCY_DESCRIPTOR)
field(ORGANIZATIONCONFIGRULETRIGGERTYPES_DESCRIPTOR)
field(POLICYRUNTIME_DESCRIPTOR)
field(RESOURCEIDSCOPE_DESCRIPTOR)
field(RESOURCETYPESSCOPE_DESCRIPTOR)
field(TAGKEYSCOPE_DESCRIPTOR)
field(TAGVALUESCOPE_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
DEBUGLOGDELIVERYACCOUNTS_DESCRIPTOR.index -> builder.debugLogDeliveryAccounts =
deserializer.deserializeList(DEBUGLOGDELIVERYACCOUNTS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
DESCRIPTION_DESCRIPTOR.index -> builder.description = deserializeString()
INPUTPARAMETERS_DESCRIPTOR.index -> builder.inputParameters = deserializeString()
MAXIMUMEXECUTIONFREQUENCY_DESCRIPTOR.index -> builder.maximumExecutionFrequency = deserializeString().let { MaximumExecutionFrequency.fromValue(it) }
ORGANIZATIONCONFIGRULETRIGGERTYPES_DESCRIPTOR.index -> builder.organizationConfigRuleTriggerTypes =
deserializer.deserializeList(ORGANIZATIONCONFIGRULETRIGGERTYPES_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString().let { OrganizationConfigRuleTriggerTypeNoSn.fromValue(it) } } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
POLICYRUNTIME_DESCRIPTOR.index -> builder.policyRuntime = deserializeString()
RESOURCEIDSCOPE_DESCRIPTOR.index -> builder.resourceIdScope = deserializeString()
RESOURCETYPESSCOPE_DESCRIPTOR.index -> builder.resourceTypesScope =
deserializer.deserializeList(RESOURCETYPESSCOPE_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
TAGKEYSCOPE_DESCRIPTOR.index -> builder.tagKeyScope = deserializeString()
TAGVALUESCOPE_DESCRIPTOR.index -> builder.tagValueScope = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy