
commonMain.aws.sdk.kotlin.services.swf.serde.WorkflowExecutionCancelRequestedEventAttributesDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.swf.serde
import aws.sdk.kotlin.services.swf.model.WorkflowExecutionCancelRequestedCause
import aws.sdk.kotlin.services.swf.model.WorkflowExecutionCancelRequestedEventAttributes
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 deserializeWorkflowExecutionCancelRequestedEventAttributesDocument(deserializer: Deserializer): WorkflowExecutionCancelRequestedEventAttributes {
val builder = WorkflowExecutionCancelRequestedEventAttributes.Builder()
val CAUSE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("cause"))
val EXTERNALINITIATEDEVENTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("externalInitiatedEventId"))
val EXTERNALWORKFLOWEXECUTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("externalWorkflowExecution"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CAUSE_DESCRIPTOR)
field(EXTERNALINITIATEDEVENTID_DESCRIPTOR)
field(EXTERNALWORKFLOWEXECUTION_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CAUSE_DESCRIPTOR.index -> builder.cause = deserializeString().let { WorkflowExecutionCancelRequestedCause.fromValue(it) }
EXTERNALINITIATEDEVENTID_DESCRIPTOR.index -> builder.externalInitiatedEventId = deserializeLong()
EXTERNALWORKFLOWEXECUTION_DESCRIPTOR.index -> builder.externalWorkflowExecution = deserializeWorkflowExecutionDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy