commonMain.aws.sdk.kotlin.services.codepipeline.transform.ActionExecutionDocumentDeserializer.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.ActionExecution
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 deserializeActionExecutionDocument(deserializer: Deserializer): ActionExecution {
val builder = ActionExecution.Builder()
val ACTIONEXECUTIONID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("actionExecutionId"))
val ERRORDETAILS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("errorDetails"))
val EXTERNALEXECUTIONID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("externalExecutionId"))
val EXTERNALEXECUTIONURL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("externalExecutionUrl"))
val LASTSTATUSCHANGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("lastStatusChange"))
val LASTUPDATEDBY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("lastUpdatedBy"))
val PERCENTCOMPLETE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("percentComplete"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("status"))
val SUMMARY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("summary"))
val TOKEN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("token"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ACTIONEXECUTIONID_DESCRIPTOR)
field(ERRORDETAILS_DESCRIPTOR)
field(EXTERNALEXECUTIONID_DESCRIPTOR)
field(EXTERNALEXECUTIONURL_DESCRIPTOR)
field(LASTSTATUSCHANGE_DESCRIPTOR)
field(LASTUPDATEDBY_DESCRIPTOR)
field(PERCENTCOMPLETE_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(SUMMARY_DESCRIPTOR)
field(TOKEN_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ACTIONEXECUTIONID_DESCRIPTOR.index -> builder.actionExecutionId = deserializeString()
ERRORDETAILS_DESCRIPTOR.index -> builder.errorDetails = deserializeErrorDetailsDocument(deserializer)
EXTERNALEXECUTIONID_DESCRIPTOR.index -> builder.externalExecutionId = deserializeString()
EXTERNALEXECUTIONURL_DESCRIPTOR.index -> builder.externalExecutionUrl = deserializeString()
LASTSTATUSCHANGE_DESCRIPTOR.index -> builder.lastStatusChange = deserializeString().let { Instant.fromEpochSeconds(it) }
LASTUPDATEDBY_DESCRIPTOR.index -> builder.lastUpdatedBy = deserializeString()
PERCENTCOMPLETE_DESCRIPTOR.index -> builder.percentComplete = deserializeInt()
STATUS_DESCRIPTOR.index -> builder.status = deserializeString().let { ActionExecutionStatus.fromValue(it) }
SUMMARY_DESCRIPTOR.index -> builder.summary = deserializeString()
TOKEN_DESCRIPTOR.index -> builder.token = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy