commonMain.aws.sdk.kotlin.services.codepipeline.serde.RuleExecutionDetailDocumentDeserializer.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.RuleExecutionDetail
import aws.sdk.kotlin.services.codepipeline.model.RuleExecutionStatus
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
internal fun deserializeRuleExecutionDetailDocument(deserializer: Deserializer): RuleExecutionDetail {
val builder = RuleExecutionDetail.Builder()
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 RULEEXECUTIONID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ruleExecutionId"))
val RULENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ruleName"))
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 UPDATEDBY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("updatedBy"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(INPUT_DESCRIPTOR)
field(LASTUPDATETIME_DESCRIPTOR)
field(OUTPUT_DESCRIPTOR)
field(PIPELINEEXECUTIONID_DESCRIPTOR)
field(PIPELINEVERSION_DESCRIPTOR)
field(RULEEXECUTIONID_DESCRIPTOR)
field(RULENAME_DESCRIPTOR)
field(STAGENAME_DESCRIPTOR)
field(STARTTIME_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(UPDATEDBY_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
INPUT_DESCRIPTOR.index -> builder.input = deserializeRuleExecutionInputDocument(deserializer)
LASTUPDATETIME_DESCRIPTOR.index -> builder.lastUpdateTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
OUTPUT_DESCRIPTOR.index -> builder.output = deserializeRuleExecutionOutputDocument(deserializer)
PIPELINEEXECUTIONID_DESCRIPTOR.index -> builder.pipelineExecutionId = deserializeString()
PIPELINEVERSION_DESCRIPTOR.index -> builder.pipelineVersion = deserializeInt()
RULEEXECUTIONID_DESCRIPTOR.index -> builder.ruleExecutionId = deserializeString()
RULENAME_DESCRIPTOR.index -> builder.ruleName = deserializeString()
STAGENAME_DESCRIPTOR.index -> builder.stageName = deserializeString()
STARTTIME_DESCRIPTOR.index -> builder.startTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
STATUS_DESCRIPTOR.index -> builder.status = deserializeString().let { RuleExecutionStatus.fromValue(it) }
UPDATEDBY_DESCRIPTOR.index -> builder.updatedBy = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy