commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.serde.RegistrationFieldDisplayHintsDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pinpointsmsvoicev2-jvm Show documentation
Show all versions of pinpointsmsvoicev2-jvm Show documentation
The AWS SDK for Kotlin client for Pinpoint SMS Voice V2
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.pinpointsmsvoicev2.serde
import aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationFieldDisplayHints
import aws.sdk.kotlin.services.pinpointsmsvoicev2.model.SelectOptionDescription
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
import kotlin.collections.mutableListOf
internal fun deserializeRegistrationFieldDisplayHintsDocument(deserializer: Deserializer): RegistrationFieldDisplayHints {
val builder = RegistrationFieldDisplayHints.Builder()
val DOCUMENTATIONLINK_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DocumentationLink"))
val DOCUMENTATIONTITLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DocumentationTitle"))
val EXAMPLETEXTVALUE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ExampleTextValue"))
val LONGDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("LongDescription"))
val SELECTOPTIONDESCRIPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("SelectOptionDescriptions"))
val SHORTDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ShortDescription"))
val TEXTVALIDATIONDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TextValidationDescription"))
val TITLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Title"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(DOCUMENTATIONLINK_DESCRIPTOR)
field(DOCUMENTATIONTITLE_DESCRIPTOR)
field(EXAMPLETEXTVALUE_DESCRIPTOR)
field(LONGDESCRIPTION_DESCRIPTOR)
field(SELECTOPTIONDESCRIPTIONS_DESCRIPTOR)
field(SHORTDESCRIPTION_DESCRIPTOR)
field(TEXTVALIDATIONDESCRIPTION_DESCRIPTOR)
field(TITLE_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
DOCUMENTATIONLINK_DESCRIPTOR.index -> builder.documentationLink = deserializeString()
DOCUMENTATIONTITLE_DESCRIPTOR.index -> builder.documentationTitle = deserializeString()
EXAMPLETEXTVALUE_DESCRIPTOR.index -> builder.exampleTextValue = deserializeString()
LONGDESCRIPTION_DESCRIPTOR.index -> builder.longDescription = deserializeString()
SELECTOPTIONDESCRIPTIONS_DESCRIPTOR.index -> builder.selectOptionDescriptions =
deserializer.deserializeList(SELECTOPTIONDESCRIPTIONS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeSelectOptionDescriptionDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
SHORTDESCRIPTION_DESCRIPTOR.index -> builder.shortDescription = deserializeString()
TEXTVALIDATIONDESCRIPTION_DESCRIPTOR.index -> builder.textValidationDescription = deserializeString()
TITLE_DESCRIPTOR.index -> builder.title = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}