commonMain.aws.sdk.kotlin.services.backup.serde.ReportSettingDocumentSerializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.backup.serde
import aws.sdk.kotlin.services.backup.model.ReportSetting
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 serializeReportSettingDocument(serializer: Serializer, input: ReportSetting) {
val ACCOUNTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("Accounts"))
val FRAMEWORKARNS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("FrameworkArns"))
val NUMBEROFFRAMEWORKS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("NumberOfFrameworks"))
val ORGANIZATIONUNITS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("OrganizationUnits"))
val REGIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("Regions"))
val REPORTTEMPLATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ReportTemplate"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ACCOUNTS_DESCRIPTOR)
field(FRAMEWORKARNS_DESCRIPTOR)
field(NUMBEROFFRAMEWORKS_DESCRIPTOR)
field(ORGANIZATIONUNITS_DESCRIPTOR)
field(REGIONS_DESCRIPTOR)
field(REPORTTEMPLATE_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
field(REPORTTEMPLATE_DESCRIPTOR, input.reportTemplate)
if (input.frameworkArns != null) {
listField(FRAMEWORKARNS_DESCRIPTOR) {
for (el0 in input.frameworkArns) {
serializeString(el0)
}
}
}
if (input.numberOfFrameworks != 0) field(NUMBEROFFRAMEWORKS_DESCRIPTOR, input.numberOfFrameworks)
if (input.accounts != null) {
listField(ACCOUNTS_DESCRIPTOR) {
for (el0 in input.accounts) {
serializeString(el0)
}
}
}
if (input.organizationUnits != null) {
listField(ORGANIZATIONUNITS_DESCRIPTOR) {
for (el0 in input.organizationUnits) {
serializeString(el0)
}
}
}
if (input.regions != null) {
listField(REGIONS_DESCRIPTOR) {
for (el0 in input.regions) {
serializeString(el0)
}
}
}
}
}