commonMain.aws.sdk.kotlin.services.datasync.serde.OptionsDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of datasync-jvm Show documentation
Show all versions of datasync-jvm Show documentation
The AWS SDK for Kotlin client for DataSync
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.datasync.serde
import aws.sdk.kotlin.services.datasync.model.Atime
import aws.sdk.kotlin.services.datasync.model.Gid
import aws.sdk.kotlin.services.datasync.model.LogLevel
import aws.sdk.kotlin.services.datasync.model.Mtime
import aws.sdk.kotlin.services.datasync.model.ObjectTags
import aws.sdk.kotlin.services.datasync.model.Options
import aws.sdk.kotlin.services.datasync.model.OverwriteMode
import aws.sdk.kotlin.services.datasync.model.PosixPermissions
import aws.sdk.kotlin.services.datasync.model.PreserveDeletedFiles
import aws.sdk.kotlin.services.datasync.model.PreserveDevices
import aws.sdk.kotlin.services.datasync.model.SmbSecurityDescriptorCopyFlags
import aws.sdk.kotlin.services.datasync.model.TaskQueueing
import aws.sdk.kotlin.services.datasync.model.TransferMode
import aws.sdk.kotlin.services.datasync.model.Uid
import aws.sdk.kotlin.services.datasync.model.VerifyMode
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 deserializeOptionsDocument(deserializer: Deserializer): Options {
val builder = Options.Builder()
val ATIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Atime"))
val BYTESPERSECOND_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("BytesPerSecond"))
val GID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Gid"))
val LOGLEVEL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("LogLevel"))
val MTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Mtime"))
val OBJECTTAGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ObjectTags"))
val OVERWRITEMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("OverwriteMode"))
val POSIXPERMISSIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("PosixPermissions"))
val PRESERVEDELETEDFILES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("PreserveDeletedFiles"))
val PRESERVEDEVICES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("PreserveDevices"))
val SECURITYDESCRIPTORCOPYFLAGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("SecurityDescriptorCopyFlags"))
val TASKQUEUEING_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("TaskQueueing"))
val TRANSFERMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("TransferMode"))
val UID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Uid"))
val VERIFYMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("VerifyMode"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ATIME_DESCRIPTOR)
field(BYTESPERSECOND_DESCRIPTOR)
field(GID_DESCRIPTOR)
field(LOGLEVEL_DESCRIPTOR)
field(MTIME_DESCRIPTOR)
field(OBJECTTAGS_DESCRIPTOR)
field(OVERWRITEMODE_DESCRIPTOR)
field(POSIXPERMISSIONS_DESCRIPTOR)
field(PRESERVEDELETEDFILES_DESCRIPTOR)
field(PRESERVEDEVICES_DESCRIPTOR)
field(SECURITYDESCRIPTORCOPYFLAGS_DESCRIPTOR)
field(TASKQUEUEING_DESCRIPTOR)
field(TRANSFERMODE_DESCRIPTOR)
field(UID_DESCRIPTOR)
field(VERIFYMODE_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ATIME_DESCRIPTOR.index -> builder.atime = deserializeString().let { Atime.fromValue(it) }
BYTESPERSECOND_DESCRIPTOR.index -> builder.bytesPerSecond = deserializeLong()
GID_DESCRIPTOR.index -> builder.gid = deserializeString().let { Gid.fromValue(it) }
LOGLEVEL_DESCRIPTOR.index -> builder.logLevel = deserializeString().let { LogLevel.fromValue(it) }
MTIME_DESCRIPTOR.index -> builder.mtime = deserializeString().let { Mtime.fromValue(it) }
OBJECTTAGS_DESCRIPTOR.index -> builder.objectTags = deserializeString().let { ObjectTags.fromValue(it) }
OVERWRITEMODE_DESCRIPTOR.index -> builder.overwriteMode = deserializeString().let { OverwriteMode.fromValue(it) }
POSIXPERMISSIONS_DESCRIPTOR.index -> builder.posixPermissions = deserializeString().let { PosixPermissions.fromValue(it) }
PRESERVEDELETEDFILES_DESCRIPTOR.index -> builder.preserveDeletedFiles = deserializeString().let { PreserveDeletedFiles.fromValue(it) }
PRESERVEDEVICES_DESCRIPTOR.index -> builder.preserveDevices = deserializeString().let { PreserveDevices.fromValue(it) }
SECURITYDESCRIPTORCOPYFLAGS_DESCRIPTOR.index -> builder.securityDescriptorCopyFlags = deserializeString().let { SmbSecurityDescriptorCopyFlags.fromValue(it) }
TASKQUEUEING_DESCRIPTOR.index -> builder.taskQueueing = deserializeString().let { TaskQueueing.fromValue(it) }
TRANSFERMODE_DESCRIPTOR.index -> builder.transferMode = deserializeString().let { TransferMode.fromValue(it) }
UID_DESCRIPTOR.index -> builder.uid = deserializeString().let { Uid.fromValue(it) }
VERIFYMODE_DESCRIPTOR.index -> builder.verifyMode = deserializeString().let { VerifyMode.fromValue(it) }
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy