commonMain.aws.sdk.kotlin.services.codepipeline.serde.PipelineExecutionSummaryDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codepipeline-jvm Show documentation
Show all versions of codepipeline-jvm Show documentation
The AWS SDK for Kotlin client for CodePipeline
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codepipeline.serde
import aws.sdk.kotlin.services.codepipeline.model.ExecutionMode
import aws.sdk.kotlin.services.codepipeline.model.ExecutionType
import aws.sdk.kotlin.services.codepipeline.model.PipelineExecutionStatus
import aws.sdk.kotlin.services.codepipeline.model.PipelineExecutionSummary
import aws.sdk.kotlin.services.codepipeline.model.SourceRevision
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
import aws.smithy.kotlin.runtime.time.TimestampFormat
import kotlin.collections.mutableListOf
internal fun deserializePipelineExecutionSummaryDocument(deserializer: Deserializer): PipelineExecutionSummary {
val builder = PipelineExecutionSummary.Builder()
val EXECUTIONMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("executionMode"))
val EXECUTIONTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("executionType"))
val LASTUPDATETIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("lastUpdateTime"))
val PIPELINEEXECUTIONID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("pipelineExecutionId"))
val ROLLBACKMETADATA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("rollbackMetadata"))
val SOURCEREVISIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("sourceRevisions"))
val STARTTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("startTime"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("status"))
val STATUSSUMMARY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("statusSummary"))
val STOPTRIGGER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("stopTrigger"))
val TRIGGER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("trigger"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(EXECUTIONMODE_DESCRIPTOR)
field(EXECUTIONTYPE_DESCRIPTOR)
field(LASTUPDATETIME_DESCRIPTOR)
field(PIPELINEEXECUTIONID_DESCRIPTOR)
field(ROLLBACKMETADATA_DESCRIPTOR)
field(SOURCEREVISIONS_DESCRIPTOR)
field(STARTTIME_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(STATUSSUMMARY_DESCRIPTOR)
field(STOPTRIGGER_DESCRIPTOR)
field(TRIGGER_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
EXECUTIONMODE_DESCRIPTOR.index -> builder.executionMode = deserializeString().let { ExecutionMode.fromValue(it) }
EXECUTIONTYPE_DESCRIPTOR.index -> builder.executionType = deserializeString().let { ExecutionType.fromValue(it) }
LASTUPDATETIME_DESCRIPTOR.index -> builder.lastUpdateTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
PIPELINEEXECUTIONID_DESCRIPTOR.index -> builder.pipelineExecutionId = deserializeString()
ROLLBACKMETADATA_DESCRIPTOR.index -> builder.rollbackMetadata = deserializePipelineRollbackMetadataDocument(deserializer)
SOURCEREVISIONS_DESCRIPTOR.index -> builder.sourceRevisions =
deserializer.deserializeList(SOURCEREVISIONS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeSourceRevisionDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
STARTTIME_DESCRIPTOR.index -> builder.startTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
STATUS_DESCRIPTOR.index -> builder.status = deserializeString().let { PipelineExecutionStatus.fromValue(it) }
STATUSSUMMARY_DESCRIPTOR.index -> builder.statusSummary = deserializeString()
STOPTRIGGER_DESCRIPTOR.index -> builder.stopTrigger = deserializeStopExecutionTriggerDocument(deserializer)
TRIGGER_DESCRIPTOR.index -> builder.trigger = deserializeExecutionTriggerDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy