commonMain.aws.sdk.kotlin.services.codepipeline.transform.ActionExecutionDetailDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codepipeline Show documentation
Show all versions of codepipeline Show documentation
The AWS Kotlin client for CodePipeline
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codepipeline.transform
import aws.sdk.kotlin.services.codepipeline.model.ActionExecutionDetail
import aws.sdk.kotlin.services.codepipeline.model.ActionExecutionStatus
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 aws.smithy.kotlin.runtime.time.Instant
internal fun deserializeActionExecutionDetailDocument(deserializer: Deserializer): ActionExecutionDetail {
val builder = ActionExecutionDetail.Builder()
val ACTIONEXECUTIONID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("actionExecutionId"))
val ACTIONNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("actionName"))
val INPUT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("input"))
val LASTUPDATETIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("lastUpdateTime"))
val OUTPUT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("output"))
val PIPELINEEXECUTIONID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("pipelineExecutionId"))
val PIPELINEVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("pipelineVersion"))
val STAGENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("stageName"))
val STARTTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("startTime"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("status"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ACTIONEXECUTIONID_DESCRIPTOR)
field(ACTIONNAME_DESCRIPTOR)
field(INPUT_DESCRIPTOR)
field(LASTUPDATETIME_DESCRIPTOR)
field(OUTPUT_DESCRIPTOR)
field(PIPELINEEXECUTIONID_DESCRIPTOR)
field(PIPELINEVERSION_DESCRIPTOR)
field(STAGENAME_DESCRIPTOR)
field(STARTTIME_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ACTIONEXECUTIONID_DESCRIPTOR.index -> builder.actionExecutionId = deserializeString()
ACTIONNAME_DESCRIPTOR.index -> builder.actionName = deserializeString()
INPUT_DESCRIPTOR.index -> builder.input = deserializeActionExecutionInputDocument(deserializer)
LASTUPDATETIME_DESCRIPTOR.index -> builder.lastUpdateTime = deserializeString().let { Instant.fromEpochSeconds(it) }
OUTPUT_DESCRIPTOR.index -> builder.output = deserializeActionExecutionOutputDocument(deserializer)
PIPELINEEXECUTIONID_DESCRIPTOR.index -> builder.pipelineExecutionId = deserializeString()
PIPELINEVERSION_DESCRIPTOR.index -> builder.pipelineVersion = deserializeInt()
STAGENAME_DESCRIPTOR.index -> builder.stageName = deserializeString()
STARTTIME_DESCRIPTOR.index -> builder.startTime = deserializeString().let { Instant.fromEpochSeconds(it) }
STATUS_DESCRIPTOR.index -> builder.status = deserializeString().let { ActionExecutionStatus.fromValue(it) }
null -> break@loop
else -> skipValue()
}
}
}
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy