commonMain.aws.sdk.kotlin.services.datazone.serde.AssetItemDocumentDeserializer.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.AssetItem
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
import aws.smithy.kotlin.runtime.time.TimestampFormat
import kotlin.collections.mutableListOf
internal fun deserializeAssetItemDocument(deserializer: Deserializer): AssetItem {
val builder = AssetItem.Builder()
val ADDITIONALATTRIBUTES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("additionalAttributes"))
val CREATEDAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("createdAt"))
val CREATEDBY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("createdBy"))
val DESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("description"))
val DOMAINID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("domainId"))
val EXTERNALIDENTIFIER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("externalIdentifier"))
val FIRSTREVISIONCREATEDAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("firstRevisionCreatedAt"))
val FIRSTREVISIONCREATEDBY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("firstRevisionCreatedBy"))
val GLOSSARYTERMS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("glossaryTerms"))
val IDENTIFIER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("identifier"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("name"))
val OWNINGPROJECTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("owningProjectId"))
val TYPEIDENTIFIER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("typeIdentifier"))
val TYPEREVISION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("typeRevision"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ADDITIONALATTRIBUTES_DESCRIPTOR)
field(CREATEDAT_DESCRIPTOR)
field(CREATEDBY_DESCRIPTOR)
field(DESCRIPTION_DESCRIPTOR)
field(DOMAINID_DESCRIPTOR)
field(EXTERNALIDENTIFIER_DESCRIPTOR)
field(FIRSTREVISIONCREATEDAT_DESCRIPTOR)
field(FIRSTREVISIONCREATEDBY_DESCRIPTOR)
field(GLOSSARYTERMS_DESCRIPTOR)
field(IDENTIFIER_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(OWNINGPROJECTID_DESCRIPTOR)
field(TYPEIDENTIFIER_DESCRIPTOR)
field(TYPEREVISION_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ADDITIONALATTRIBUTES_DESCRIPTOR.index -> builder.additionalAttributes = deserializeAssetItemAdditionalAttributesDocument(deserializer)
CREATEDAT_DESCRIPTOR.index -> builder.createdAt = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
CREATEDBY_DESCRIPTOR.index -> builder.createdBy = deserializeString()
DESCRIPTION_DESCRIPTOR.index -> builder.description = deserializeString()
DOMAINID_DESCRIPTOR.index -> builder.domainId = deserializeString()
EXTERNALIDENTIFIER_DESCRIPTOR.index -> builder.externalIdentifier = deserializeString()
FIRSTREVISIONCREATEDAT_DESCRIPTOR.index -> builder.firstRevisionCreatedAt = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
FIRSTREVISIONCREATEDBY_DESCRIPTOR.index -> builder.firstRevisionCreatedBy = deserializeString()
GLOSSARYTERMS_DESCRIPTOR.index -> builder.glossaryTerms =
deserializer.deserializeList(GLOSSARYTERMS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
IDENTIFIER_DESCRIPTOR.index -> builder.identifier = deserializeString()
NAME_DESCRIPTOR.index -> builder.name = deserializeString()
OWNINGPROJECTID_DESCRIPTOR.index -> builder.owningProjectId = deserializeString()
TYPEIDENTIFIER_DESCRIPTOR.index -> builder.typeIdentifier = deserializeString()
TYPEREVISION_DESCRIPTOR.index -> builder.typeRevision = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy