commonMain.aws.sdk.kotlin.services.datazone.serde.SubscriptionTargetSummaryDocumentDeserializer.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.SubscriptionTargetForm
import aws.sdk.kotlin.services.datazone.model.SubscriptionTargetSummary
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 kotlin.collections.mutableListOf
internal fun deserializeSubscriptionTargetSummaryDocument(deserializer: Deserializer): SubscriptionTargetSummary {
val builder = SubscriptionTargetSummary.Builder()
val APPLICABLEASSETTYPES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("applicableAssetTypes"))
val AUTHORIZEDPRINCIPALS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("authorizedPrincipals"))
val CREATEDAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("createdAt"))
val CREATEDBY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("createdBy"))
val DOMAINID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("domainId"))
val ENVIRONMENTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("environmentId"))
val ID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("id"))
val MANAGEACCESSROLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("manageAccessRole"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("name"))
val PROJECTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("projectId"))
val PROVIDER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("provider"))
val SUBSCRIPTIONTARGETCONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("subscriptionTargetConfig"))
val TYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("type"))
val UPDATEDAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("updatedAt"))
val UPDATEDBY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("updatedBy"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(APPLICABLEASSETTYPES_DESCRIPTOR)
field(AUTHORIZEDPRINCIPALS_DESCRIPTOR)
field(CREATEDAT_DESCRIPTOR)
field(CREATEDBY_DESCRIPTOR)
field(DOMAINID_DESCRIPTOR)
field(ENVIRONMENTID_DESCRIPTOR)
field(ID_DESCRIPTOR)
field(MANAGEACCESSROLE_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(PROJECTID_DESCRIPTOR)
field(PROVIDER_DESCRIPTOR)
field(SUBSCRIPTIONTARGETCONFIG_DESCRIPTOR)
field(TYPE_DESCRIPTOR)
field(UPDATEDAT_DESCRIPTOR)
field(UPDATEDBY_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
APPLICABLEASSETTYPES_DESCRIPTOR.index -> builder.applicableAssetTypes =
deserializer.deserializeList(APPLICABLEASSETTYPES_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
AUTHORIZEDPRINCIPALS_DESCRIPTOR.index -> builder.authorizedPrincipals =
deserializer.deserializeList(AUTHORIZEDPRINCIPALS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
CREATEDAT_DESCRIPTOR.index -> builder.createdAt = deserializeString().let { Instant.fromEpochSeconds(it) }
CREATEDBY_DESCRIPTOR.index -> builder.createdBy = deserializeString()
DOMAINID_DESCRIPTOR.index -> builder.domainId = deserializeString()
ENVIRONMENTID_DESCRIPTOR.index -> builder.environmentId = deserializeString()
ID_DESCRIPTOR.index -> builder.id = deserializeString()
MANAGEACCESSROLE_DESCRIPTOR.index -> builder.manageAccessRole = deserializeString()
NAME_DESCRIPTOR.index -> builder.name = deserializeString()
PROJECTID_DESCRIPTOR.index -> builder.projectId = deserializeString()
PROVIDER_DESCRIPTOR.index -> builder.provider = deserializeString()
SUBSCRIPTIONTARGETCONFIG_DESCRIPTOR.index -> builder.subscriptionTargetConfig =
deserializer.deserializeList(SUBSCRIPTIONTARGETCONFIG_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeSubscriptionTargetFormDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
TYPE_DESCRIPTOR.index -> builder.type = deserializeString()
UPDATEDAT_DESCRIPTOR.index -> builder.updatedAt = deserializeString().let { Instant.fromEpochSeconds(it) }
UPDATEDBY_DESCRIPTOR.index -> builder.updatedBy = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy