commonMain.aws.sdk.kotlin.services.transfer.serde.DescribedExecutionDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of transfer-jvm Show documentation
Show all versions of transfer-jvm Show documentation
The AWS SDK for Kotlin client for Transfer
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.transfer.serde
import aws.sdk.kotlin.services.transfer.model.DescribedExecution
import aws.sdk.kotlin.services.transfer.model.ExecutionStatus
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
internal fun deserializeDescribedExecutionDocument(deserializer: Deserializer): DescribedExecution {
val builder = DescribedExecution.Builder()
val EXECUTIONID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ExecutionId"))
val EXECUTIONROLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ExecutionRole"))
val INITIALFILELOCATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("InitialFileLocation"))
val LOGGINGCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("LoggingConfiguration"))
val POSIXPROFILE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("PosixProfile"))
val RESULTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Results"))
val SERVICEMETADATA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ServiceMetadata"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Status"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(EXECUTIONID_DESCRIPTOR)
field(EXECUTIONROLE_DESCRIPTOR)
field(INITIALFILELOCATION_DESCRIPTOR)
field(LOGGINGCONFIGURATION_DESCRIPTOR)
field(POSIXPROFILE_DESCRIPTOR)
field(RESULTS_DESCRIPTOR)
field(SERVICEMETADATA_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
EXECUTIONID_DESCRIPTOR.index -> builder.executionId = deserializeString()
EXECUTIONROLE_DESCRIPTOR.index -> builder.executionRole = deserializeString()
INITIALFILELOCATION_DESCRIPTOR.index -> builder.initialFileLocation = deserializeFileLocationDocument(deserializer)
LOGGINGCONFIGURATION_DESCRIPTOR.index -> builder.loggingConfiguration = deserializeLoggingConfigurationDocument(deserializer)
POSIXPROFILE_DESCRIPTOR.index -> builder.posixProfile = deserializePosixProfileDocument(deserializer)
RESULTS_DESCRIPTOR.index -> builder.results = deserializeExecutionResultsDocument(deserializer)
SERVICEMETADATA_DESCRIPTOR.index -> builder.serviceMetadata = deserializeServiceMetadataDocument(deserializer)
STATUS_DESCRIPTOR.index -> builder.status = deserializeString().let { ExecutionStatus.fromValue(it) }
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}