commonMain.aws.sdk.kotlin.services.codepipeline.serde.RuleExecutionDocumentDeserializer.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.RuleExecution
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 deserializeRuleExecutionDocument(deserializer: Deserializer): RuleExecution {
val builder = RuleExecution.Builder()
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 RULEEXECUTIONID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ruleExecutionId"))
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(ERRORDETAILS_DESCRIPTOR)
field(EXTERNALEXECUTIONID_DESCRIPTOR)
field(EXTERNALEXECUTIONURL_DESCRIPTOR)
field(LASTSTATUSCHANGE_DESCRIPTOR)
field(LASTUPDATEDBY_DESCRIPTOR)
field(RULEEXECUTIONID_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(SUMMARY_DESCRIPTOR)
field(TOKEN_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ERRORDETAILS_DESCRIPTOR.index -> builder.errorDetails = deserializeErrorDetailsDocument(deserializer)
EXTERNALEXECUTIONID_DESCRIPTOR.index -> builder.externalExecutionId = deserializeString()
EXTERNALEXECUTIONURL_DESCRIPTOR.index -> builder.externalExecutionUrl = deserializeString()
LASTSTATUSCHANGE_DESCRIPTOR.index -> builder.lastStatusChange = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
LASTUPDATEDBY_DESCRIPTOR.index -> builder.lastUpdatedBy = deserializeString()
RULEEXECUTIONID_DESCRIPTOR.index -> builder.ruleExecutionId = deserializeString()
STATUS_DESCRIPTOR.index -> builder.status = deserializeString().let { RuleExecutionStatus.fromValue(it) }
SUMMARY_DESCRIPTOR.index -> builder.summary = deserializeString()
TOKEN_DESCRIPTOR.index -> builder.token = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy