commonMain.aws.sdk.kotlin.services.backup.serde.BackupSelectionDocumentSerializer.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.BackupSelection
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 serializeBackupSelectionDocument(serializer: Serializer, input: BackupSelection) {
val CONDITIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Conditions"))
val IAMROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("IamRoleArn"))
val LISTOFTAGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("ListOfTags"))
val NOTRESOURCES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("NotResources"))
val RESOURCES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("Resources"))
val SELECTIONNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SelectionName"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CONDITIONS_DESCRIPTOR)
field(IAMROLEARN_DESCRIPTOR)
field(LISTOFTAGS_DESCRIPTOR)
field(NOTRESOURCES_DESCRIPTOR)
field(RESOURCES_DESCRIPTOR)
field(SELECTIONNAME_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
field(SELECTIONNAME_DESCRIPTOR, input.selectionName)
field(IAMROLEARN_DESCRIPTOR, input.iamRoleArn)
if (input.resources != null) {
listField(RESOURCES_DESCRIPTOR) {
for (el0 in input.resources) {
serializeString(el0)
}
}
}
if (input.listOfTags != null) {
listField(LISTOFTAGS_DESCRIPTOR) {
for (el0 in input.listOfTags) {
serializeSdkSerializable(asSdkSerializable(el0, ::serializeConditionDocument))
}
}
}
if (input.notResources != null) {
listField(NOTRESOURCES_DESCRIPTOR) {
for (el0 in input.notResources) {
serializeString(el0)
}
}
}
input.conditions?.let { field(CONDITIONS_DESCRIPTOR, it, ::serializeConditionsDocument) }
}
}