commonMain.aws.sdk.kotlin.services.backup.serde.RestoreTestingRecoveryPointSelectionDocumentSerializer.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.RestoreTestingRecoveryPointSelection
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 serializeRestoreTestingRecoveryPointSelectionDocument(serializer: Serializer, input: RestoreTestingRecoveryPointSelection) {
val ALGORITHM_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Algorithm"))
val EXCLUDEVAULTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("ExcludeVaults"))
val INCLUDEVAULTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("IncludeVaults"))
val RECOVERYPOINTTYPES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("RecoveryPointTypes"))
val SELECTIONWINDOWDAYS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("SelectionWindowDays"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ALGORITHM_DESCRIPTOR)
field(EXCLUDEVAULTS_DESCRIPTOR)
field(INCLUDEVAULTS_DESCRIPTOR)
field(RECOVERYPOINTTYPES_DESCRIPTOR)
field(SELECTIONWINDOWDAYS_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.algorithm?.let { field(ALGORITHM_DESCRIPTOR, it.value) }
if (input.excludeVaults != null) {
listField(EXCLUDEVAULTS_DESCRIPTOR) {
for (el0 in input.excludeVaults) {
serializeString(el0)
}
}
}
if (input.includeVaults != null) {
listField(INCLUDEVAULTS_DESCRIPTOR) {
for (el0 in input.includeVaults) {
serializeString(el0)
}
}
}
if (input.recoveryPointTypes != null) {
listField(RECOVERYPOINTTYPES_DESCRIPTOR) {
for (el0 in input.recoveryPointTypes) {
serializeString(el0.value)
}
}
}
if (input.selectionWindowDays != 0) field(SELECTIONWINDOWDAYS_DESCRIPTOR, input.selectionWindowDays)
}
}