commonMain.aws.sdk.kotlin.services.datasync.serde.FsxProtocolSmbDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.datasync.serde
import aws.sdk.kotlin.services.datasync.model.FsxProtocolSmb
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 deserializeFsxProtocolSmbDocument(deserializer: Deserializer): FsxProtocolSmb {
val builder = FsxProtocolSmb.Builder()
val DOMAIN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Domain"))
val MOUNTOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("MountOptions"))
val PASSWORD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Password"))
val USER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("User"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(DOMAIN_DESCRIPTOR)
field(MOUNTOPTIONS_DESCRIPTOR)
field(PASSWORD_DESCRIPTOR)
field(USER_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
DOMAIN_DESCRIPTOR.index -> builder.domain = deserializeString()
MOUNTOPTIONS_DESCRIPTOR.index -> builder.mountOptions = deserializeSmbMountOptionsDocument(deserializer)
PASSWORD_DESCRIPTOR.index -> builder.password = deserializeString()
USER_DESCRIPTOR.index -> builder.user = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy