commonMain.aws.sdk.kotlin.services.connect.transform.ContactFlowSummaryDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.connect.transform
import aws.sdk.kotlin.services.connect.model.ContactFlowState
import aws.sdk.kotlin.services.connect.model.ContactFlowSummary
import aws.sdk.kotlin.services.connect.model.ContactFlowType
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 deserializeContactFlowSummaryDocument(deserializer: Deserializer): ContactFlowSummary {
val builder = ContactFlowSummary.Builder()
val ARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Arn"))
val CONTACTFLOWSTATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ContactFlowState"))
val CONTACTFLOWTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ContactFlowType"))
val ID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Id"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Name"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ARN_DESCRIPTOR)
field(CONTACTFLOWSTATE_DESCRIPTOR)
field(CONTACTFLOWTYPE_DESCRIPTOR)
field(ID_DESCRIPTOR)
field(NAME_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ARN_DESCRIPTOR.index -> builder.arn = deserializeString()
CONTACTFLOWSTATE_DESCRIPTOR.index -> builder.contactFlowState = deserializeString().let { ContactFlowState.fromValue(it) }
CONTACTFLOWTYPE_DESCRIPTOR.index -> builder.contactFlowType = deserializeString().let { ContactFlowType.fromValue(it) }
ID_DESCRIPTOR.index -> builder.id = deserializeString()
NAME_DESCRIPTOR.index -> builder.name = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy