commonMain.aws.sdk.kotlin.services.datazone.serde.DataSourceSummaryDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of datazone-jvm Show documentation
Show all versions of datazone-jvm Show documentation
The AWS SDK for Kotlin client for DataZone
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.datazone.serde
import aws.sdk.kotlin.services.datazone.model.DataSourceRunStatus
import aws.sdk.kotlin.services.datazone.model.DataSourceStatus
import aws.sdk.kotlin.services.datazone.model.DataSourceSummary
import aws.sdk.kotlin.services.datazone.model.EnableSetting
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 deserializeDataSourceSummaryDocument(deserializer: Deserializer): DataSourceSummary {
val builder = DataSourceSummary.Builder()
val CREATEDAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("createdAt"))
val DATASOURCEID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("dataSourceId"))
val DOMAINID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("domainId"))
val ENABLESETTING_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("enableSetting"))
val ENVIRONMENTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("environmentId"))
val LASTRUNASSETCOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("lastRunAssetCount"))
val LASTRUNAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("lastRunAt"))
val LASTRUNERRORMESSAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("lastRunErrorMessage"))
val LASTRUNSTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("lastRunStatus"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("name"))
val SCHEDULE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("schedule"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("status"))
val TYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("type"))
val UPDATEDAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("updatedAt"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CREATEDAT_DESCRIPTOR)
field(DATASOURCEID_DESCRIPTOR)
field(DOMAINID_DESCRIPTOR)
field(ENABLESETTING_DESCRIPTOR)
field(ENVIRONMENTID_DESCRIPTOR)
field(LASTRUNASSETCOUNT_DESCRIPTOR)
field(LASTRUNAT_DESCRIPTOR)
field(LASTRUNERRORMESSAGE_DESCRIPTOR)
field(LASTRUNSTATUS_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(SCHEDULE_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(TYPE_DESCRIPTOR)
field(UPDATEDAT_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CREATEDAT_DESCRIPTOR.index -> builder.createdAt = deserializeString().let { Instant.fromIso8601(it) }
DATASOURCEID_DESCRIPTOR.index -> builder.dataSourceId = deserializeString()
DOMAINID_DESCRIPTOR.index -> builder.domainId = deserializeString()
ENABLESETTING_DESCRIPTOR.index -> builder.enableSetting = deserializeString().let { EnableSetting.fromValue(it) }
ENVIRONMENTID_DESCRIPTOR.index -> builder.environmentId = deserializeString()
LASTRUNASSETCOUNT_DESCRIPTOR.index -> builder.lastRunAssetCount = deserializeInt()
LASTRUNAT_DESCRIPTOR.index -> builder.lastRunAt = deserializeString().let { Instant.fromIso8601(it) }
LASTRUNERRORMESSAGE_DESCRIPTOR.index -> builder.lastRunErrorMessage = deserializeDataSourceErrorMessageDocument(deserializer)
LASTRUNSTATUS_DESCRIPTOR.index -> builder.lastRunStatus = deserializeString().let { DataSourceRunStatus.fromValue(it) }
NAME_DESCRIPTOR.index -> builder.name = deserializeString()
SCHEDULE_DESCRIPTOR.index -> builder.schedule = deserializeScheduleConfigurationDocument(deserializer)
STATUS_DESCRIPTOR.index -> builder.status = deserializeString().let { DataSourceStatus.fromValue(it) }
TYPE_DESCRIPTOR.index -> builder.type = deserializeString()
UPDATEDAT_DESCRIPTOR.index -> builder.updatedAt = deserializeString().let { Instant.fromIso8601(it) }
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy