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

commonMain.aws.sdk.kotlin.services.configservice.serde.OrganizationCustomRuleMetadataDocumentSerializer.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.configservice.serde

import aws.sdk.kotlin.services.configservice.model.OrganizationCustomRuleMetadata
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.Serializer
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 serializeOrganizationCustomRuleMetadataDocument(serializer: Serializer, input: OrganizationCustomRuleMetadata) {
    val DESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Description"))
    val INPUTPARAMETERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("InputParameters"))
    val LAMBDAFUNCTIONARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("LambdaFunctionArn"))
    val MAXIMUMEXECUTIONFREQUENCY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("MaximumExecutionFrequency"))
    val ORGANIZATIONCONFIGRULETRIGGERTYPES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("OrganizationConfigRuleTriggerTypes"))
    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(DESCRIPTION_DESCRIPTOR)
        field(INPUTPARAMETERS_DESCRIPTOR)
        field(LAMBDAFUNCTIONARN_DESCRIPTOR)
        field(MAXIMUMEXECUTIONFREQUENCY_DESCRIPTOR)
        field(ORGANIZATIONCONFIGRULETRIGGERTYPES_DESCRIPTOR)
        field(RESOURCEIDSCOPE_DESCRIPTOR)
        field(RESOURCETYPESSCOPE_DESCRIPTOR)
        field(TAGKEYSCOPE_DESCRIPTOR)
        field(TAGVALUESCOPE_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        input.description?.let { field(DESCRIPTION_DESCRIPTOR, it) }
        field(LAMBDAFUNCTIONARN_DESCRIPTOR, input.lambdaFunctionArn)
        listField(ORGANIZATIONCONFIGRULETRIGGERTYPES_DESCRIPTOR) {
            for (el0 in input.organizationConfigRuleTriggerTypes) {
                serializeString(el0.value)
            }
        }
        input.inputParameters?.let { field(INPUTPARAMETERS_DESCRIPTOR, it) }
        input.maximumExecutionFrequency?.let { field(MAXIMUMEXECUTIONFREQUENCY_DESCRIPTOR, it.value) }
        if (input.resourceTypesScope != null) {
            listField(RESOURCETYPESSCOPE_DESCRIPTOR) {
                for (el0 in input.resourceTypesScope) {
                    serializeString(el0)
                }
            }
        }
        input.resourceIdScope?.let { field(RESOURCEIDSCOPE_DESCRIPTOR, it) }
        input.tagKeyScope?.let { field(TAGKEYSCOPE_DESCRIPTOR, it) }
        input.tagValueScope?.let { field(TAGVALUESCOPE_DESCRIPTOR, it) }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy