aws.sdk.kotlin.services.sagemaker.transform.TrialComponentSummaryDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.sagemaker.transform
import aws.sdk.kotlin.services.sagemaker.model.TrialComponentSummary
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 suspend fun deserializeTrialComponentSummaryDocument(deserializer: Deserializer): TrialComponentSummary {
val builder = TrialComponentSummary.builder()
val CREATEDBY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("CreatedBy"))
val CREATIONTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("CreationTime"))
val DISPLAYNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DisplayName"))
val ENDTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("EndTime"))
val LASTMODIFIEDBY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("LastModifiedBy"))
val LASTMODIFIEDTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("LastModifiedTime"))
val STARTTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("StartTime"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Status"))
val TRIALCOMPONENTARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TrialComponentArn"))
val TRIALCOMPONENTNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TrialComponentName"))
val TRIALCOMPONENTSOURCE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("TrialComponentSource"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CREATEDBY_DESCRIPTOR)
field(CREATIONTIME_DESCRIPTOR)
field(DISPLAYNAME_DESCRIPTOR)
field(ENDTIME_DESCRIPTOR)
field(LASTMODIFIEDBY_DESCRIPTOR)
field(LASTMODIFIEDTIME_DESCRIPTOR)
field(STARTTIME_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(TRIALCOMPONENTARN_DESCRIPTOR)
field(TRIALCOMPONENTNAME_DESCRIPTOR)
field(TRIALCOMPONENTSOURCE_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CREATEDBY_DESCRIPTOR.index -> builder.createdBy = deserializeUserContextDocument(deserializer)
CREATIONTIME_DESCRIPTOR.index -> builder.creationTime = deserializeString().let { Instant.fromEpochSeconds(it) }
DISPLAYNAME_DESCRIPTOR.index -> builder.displayName = deserializeString()
ENDTIME_DESCRIPTOR.index -> builder.endTime = deserializeString().let { Instant.fromEpochSeconds(it) }
LASTMODIFIEDBY_DESCRIPTOR.index -> builder.lastModifiedBy = deserializeUserContextDocument(deserializer)
LASTMODIFIEDTIME_DESCRIPTOR.index -> builder.lastModifiedTime = deserializeString().let { Instant.fromEpochSeconds(it) }
STARTTIME_DESCRIPTOR.index -> builder.startTime = deserializeString().let { Instant.fromEpochSeconds(it) }
STATUS_DESCRIPTOR.index -> builder.status = deserializeTrialComponentStatusDocument(deserializer)
TRIALCOMPONENTARN_DESCRIPTOR.index -> builder.trialComponentArn = deserializeString()
TRIALCOMPONENTNAME_DESCRIPTOR.index -> builder.trialComponentName = deserializeString()
TRIALCOMPONENTSOURCE_DESCRIPTOR.index -> builder.trialComponentSource = deserializeTrialComponentSourceDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy