aws.sdk.kotlin.services.sagemaker.transform.MonitoringExecutionSummaryDocumentDeserializer.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.ExecutionStatus
import aws.sdk.kotlin.services.sagemaker.model.MonitoringExecutionSummary
import aws.sdk.kotlin.services.sagemaker.model.MonitoringType
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 deserializeMonitoringExecutionSummaryDocument(deserializer: Deserializer): MonitoringExecutionSummary {
val builder = MonitoringExecutionSummary.builder()
val CREATIONTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("CreationTime"))
val ENDPOINTNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("EndpointName"))
val FAILUREREASON_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("FailureReason"))
val LASTMODIFIEDTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("LastModifiedTime"))
val MONITORINGEXECUTIONSTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("MonitoringExecutionStatus"))
val MONITORINGJOBDEFINITIONNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("MonitoringJobDefinitionName"))
val MONITORINGSCHEDULENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("MonitoringScheduleName"))
val MONITORINGTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("MonitoringType"))
val PROCESSINGJOBARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ProcessingJobArn"))
val SCHEDULEDTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("ScheduledTime"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CREATIONTIME_DESCRIPTOR)
field(ENDPOINTNAME_DESCRIPTOR)
field(FAILUREREASON_DESCRIPTOR)
field(LASTMODIFIEDTIME_DESCRIPTOR)
field(MONITORINGEXECUTIONSTATUS_DESCRIPTOR)
field(MONITORINGJOBDEFINITIONNAME_DESCRIPTOR)
field(MONITORINGSCHEDULENAME_DESCRIPTOR)
field(MONITORINGTYPE_DESCRIPTOR)
field(PROCESSINGJOBARN_DESCRIPTOR)
field(SCHEDULEDTIME_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CREATIONTIME_DESCRIPTOR.index -> builder.creationTime = deserializeString().let { Instant.fromEpochSeconds(it) }
ENDPOINTNAME_DESCRIPTOR.index -> builder.endpointName = deserializeString()
FAILUREREASON_DESCRIPTOR.index -> builder.failureReason = deserializeString()
LASTMODIFIEDTIME_DESCRIPTOR.index -> builder.lastModifiedTime = deserializeString().let { Instant.fromEpochSeconds(it) }
MONITORINGEXECUTIONSTATUS_DESCRIPTOR.index -> builder.monitoringExecutionStatus = deserializeString().let { ExecutionStatus.fromValue(it) }
MONITORINGJOBDEFINITIONNAME_DESCRIPTOR.index -> builder.monitoringJobDefinitionName = deserializeString()
MONITORINGSCHEDULENAME_DESCRIPTOR.index -> builder.monitoringScheduleName = deserializeString()
MONITORINGTYPE_DESCRIPTOR.index -> builder.monitoringType = deserializeString().let { MonitoringType.fromValue(it) }
PROCESSINGJOBARN_DESCRIPTOR.index -> builder.processingJobArn = deserializeString()
SCHEDULEDTIME_DESCRIPTOR.index -> builder.scheduledTime = deserializeString().let { Instant.fromEpochSeconds(it) }
null -> break@loop
else -> skipValue()
}
}
}
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy