commonMain.aws.sdk.kotlin.services.fsx.serde.LustreFileSystemConfigurationDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fsx-jvm Show documentation
Show all versions of fsx-jvm Show documentation
The AWS SDK for Kotlin client for FSx
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.fsx.serde
import aws.sdk.kotlin.services.fsx.model.DataCompressionType
import aws.sdk.kotlin.services.fsx.model.DriveCacheType
import aws.sdk.kotlin.services.fsx.model.LustreDeploymentType
import aws.sdk.kotlin.services.fsx.model.LustreFileSystemConfiguration
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
internal fun deserializeLustreFileSystemConfigurationDocument(deserializer: Deserializer): LustreFileSystemConfiguration {
val builder = LustreFileSystemConfiguration.Builder()
val AUTOMATICBACKUPRETENTIONDAYS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("AutomaticBackupRetentionDays"))
val COPYTAGSTOBACKUPS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("CopyTagsToBackups"))
val DAILYAUTOMATICBACKUPSTARTTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DailyAutomaticBackupStartTime"))
val DATACOMPRESSIONTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("DataCompressionType"))
val DATAREPOSITORYCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("DataRepositoryConfiguration"))
val DEPLOYMENTTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("DeploymentType"))
val DRIVECACHETYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("DriveCacheType"))
val LOGCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("LogConfiguration"))
val METADATACONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("MetadataConfiguration"))
val MOUNTNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("MountName"))
val PERUNITSTORAGETHROUGHPUT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("PerUnitStorageThroughput"))
val ROOTSQUASHCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("RootSquashConfiguration"))
val WEEKLYMAINTENANCESTARTTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("WeeklyMaintenanceStartTime"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(AUTOMATICBACKUPRETENTIONDAYS_DESCRIPTOR)
field(COPYTAGSTOBACKUPS_DESCRIPTOR)
field(DAILYAUTOMATICBACKUPSTARTTIME_DESCRIPTOR)
field(DATACOMPRESSIONTYPE_DESCRIPTOR)
field(DATAREPOSITORYCONFIGURATION_DESCRIPTOR)
field(DEPLOYMENTTYPE_DESCRIPTOR)
field(DRIVECACHETYPE_DESCRIPTOR)
field(LOGCONFIGURATION_DESCRIPTOR)
field(METADATACONFIGURATION_DESCRIPTOR)
field(MOUNTNAME_DESCRIPTOR)
field(PERUNITSTORAGETHROUGHPUT_DESCRIPTOR)
field(ROOTSQUASHCONFIGURATION_DESCRIPTOR)
field(WEEKLYMAINTENANCESTARTTIME_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
AUTOMATICBACKUPRETENTIONDAYS_DESCRIPTOR.index -> builder.automaticBackupRetentionDays = deserializeInt()
COPYTAGSTOBACKUPS_DESCRIPTOR.index -> builder.copyTagsToBackups = deserializeBoolean()
DAILYAUTOMATICBACKUPSTARTTIME_DESCRIPTOR.index -> builder.dailyAutomaticBackupStartTime = deserializeString()
DATACOMPRESSIONTYPE_DESCRIPTOR.index -> builder.dataCompressionType = deserializeString().let { DataCompressionType.fromValue(it) }
DATAREPOSITORYCONFIGURATION_DESCRIPTOR.index -> builder.dataRepositoryConfiguration = deserializeDataRepositoryConfigurationDocument(deserializer)
DEPLOYMENTTYPE_DESCRIPTOR.index -> builder.deploymentType = deserializeString().let { LustreDeploymentType.fromValue(it) }
DRIVECACHETYPE_DESCRIPTOR.index -> builder.driveCacheType = deserializeString().let { DriveCacheType.fromValue(it) }
LOGCONFIGURATION_DESCRIPTOR.index -> builder.logConfiguration = deserializeLustreLogConfigurationDocument(deserializer)
METADATACONFIGURATION_DESCRIPTOR.index -> builder.metadataConfiguration = deserializeFileSystemLustreMetadataConfigurationDocument(deserializer)
MOUNTNAME_DESCRIPTOR.index -> builder.mountName = deserializeString()
PERUNITSTORAGETHROUGHPUT_DESCRIPTOR.index -> builder.perUnitStorageThroughput = deserializeInt()
ROOTSQUASHCONFIGURATION_DESCRIPTOR.index -> builder.rootSquashConfiguration = deserializeLustreRootSquashConfigurationDocument(deserializer)
WEEKLYMAINTENANCESTARTTIME_DESCRIPTOR.index -> builder.weeklyMaintenanceStartTime = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}