aws.sdk.kotlin.services.sagemaker.transform.TrialComponentDocumentDeserializer.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.MetadataProperties
import aws.sdk.kotlin.services.sagemaker.model.Parent
import aws.sdk.kotlin.services.sagemaker.model.Tag
import aws.sdk.kotlin.services.sagemaker.model.TrialComponent
import aws.sdk.kotlin.services.sagemaker.model.TrialComponentArtifact
import aws.sdk.kotlin.services.sagemaker.model.TrialComponentMetricSummary
import aws.sdk.kotlin.services.sagemaker.model.TrialComponentParameterValue
import aws.sdk.kotlin.services.sagemaker.model.TrialComponentSource
import aws.sdk.kotlin.services.sagemaker.model.TrialComponentSourceDetail
import aws.sdk.kotlin.services.sagemaker.model.TrialComponentStatus
import aws.sdk.kotlin.services.sagemaker.model.UserContext
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 fun deserializeTrialComponentDocument(deserializer: Deserializer): TrialComponent {
val builder = TrialComponent.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 INPUTARTIFACTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("InputArtifacts"))
val LASTMODIFIEDBY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("LastModifiedBy"))
val LASTMODIFIEDTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("LastModifiedTime"))
val LINEAGEGROUPARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("LineageGroupArn"))
val METADATAPROPERTIES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("MetadataProperties"))
val METRICS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("Metrics"))
val OUTPUTARTIFACTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("OutputArtifacts"))
val PARAMETERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("Parameters"))
val PARENTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("Parents"))
val SOURCE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Source"))
val SOURCEDETAIL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("SourceDetail"))
val STARTTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("StartTime"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Status"))
val TAGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("Tags"))
val TRIALCOMPONENTARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TrialComponentArn"))
val TRIALCOMPONENTNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TrialComponentName"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CREATEDBY_DESCRIPTOR)
field(CREATIONTIME_DESCRIPTOR)
field(DISPLAYNAME_DESCRIPTOR)
field(ENDTIME_DESCRIPTOR)
field(INPUTARTIFACTS_DESCRIPTOR)
field(LASTMODIFIEDBY_DESCRIPTOR)
field(LASTMODIFIEDTIME_DESCRIPTOR)
field(LINEAGEGROUPARN_DESCRIPTOR)
field(METADATAPROPERTIES_DESCRIPTOR)
field(METRICS_DESCRIPTOR)
field(OUTPUTARTIFACTS_DESCRIPTOR)
field(PARAMETERS_DESCRIPTOR)
field(PARENTS_DESCRIPTOR)
field(SOURCE_DESCRIPTOR)
field(SOURCEDETAIL_DESCRIPTOR)
field(STARTTIME_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(TAGS_DESCRIPTOR)
field(TRIALCOMPONENTARN_DESCRIPTOR)
field(TRIALCOMPONENTNAME_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) }
INPUTARTIFACTS_DESCRIPTOR.index -> builder.inputArtifacts =
deserializer.deserializeMap(INPUTARTIFACTS_DESCRIPTOR) {
val map0 = mutableMapOf()
while (hasNextEntry()) {
val k0 = key()
val v0 = if (nextHasValue()) { deserializeTrialComponentArtifactDocument(deserializer) } else { deserializeNull(); continue }
map0[k0] = v0
}
map0
}
LASTMODIFIEDBY_DESCRIPTOR.index -> builder.lastModifiedBy = deserializeUserContextDocument(deserializer)
LASTMODIFIEDTIME_DESCRIPTOR.index -> builder.lastModifiedTime = deserializeString().let { Instant.fromEpochSeconds(it) }
LINEAGEGROUPARN_DESCRIPTOR.index -> builder.lineageGroupArn = deserializeString()
METADATAPROPERTIES_DESCRIPTOR.index -> builder.metadataProperties = deserializeMetadataPropertiesDocument(deserializer)
METRICS_DESCRIPTOR.index -> builder.metrics =
deserializer.deserializeList(METRICS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeTrialComponentMetricSummaryDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
OUTPUTARTIFACTS_DESCRIPTOR.index -> builder.outputArtifacts =
deserializer.deserializeMap(OUTPUTARTIFACTS_DESCRIPTOR) {
val map0 = mutableMapOf()
while (hasNextEntry()) {
val k0 = key()
val v0 = if (nextHasValue()) { deserializeTrialComponentArtifactDocument(deserializer) } else { deserializeNull(); continue }
map0[k0] = v0
}
map0
}
PARAMETERS_DESCRIPTOR.index -> builder.parameters =
deserializer.deserializeMap(PARAMETERS_DESCRIPTOR) {
val map0 = mutableMapOf()
while (hasNextEntry()) {
val k0 = key()
val v0 = if (nextHasValue()) { deserializeTrialComponentParameterValueDocument(deserializer) } else { deserializeNull(); continue }
map0[k0] = v0
}
map0
}
PARENTS_DESCRIPTOR.index -> builder.parents =
deserializer.deserializeList(PARENTS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeParentDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
SOURCE_DESCRIPTOR.index -> builder.source = deserializeTrialComponentSourceDocument(deserializer)
SOURCEDETAIL_DESCRIPTOR.index -> builder.sourceDetail = deserializeTrialComponentSourceDetailDocument(deserializer)
STARTTIME_DESCRIPTOR.index -> builder.startTime = deserializeString().let { Instant.fromEpochSeconds(it) }
STATUS_DESCRIPTOR.index -> builder.status = deserializeTrialComponentStatusDocument(deserializer)
TAGS_DESCRIPTOR.index -> builder.tags =
deserializer.deserializeList(TAGS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeTagDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
TRIALCOMPONENTARN_DESCRIPTOR.index -> builder.trialComponentArn = deserializeString()
TRIALCOMPONENTNAME_DESCRIPTOR.index -> builder.trialComponentName = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy