commonMain.aws.sdk.kotlin.services.dataexchange.serde.AssetDetailsDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dataexchange-jvm Show documentation
Show all versions of dataexchange-jvm Show documentation
The AWS Kotlin client for DataExchange
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.dataexchange.serde
import aws.sdk.kotlin.services.dataexchange.model.AssetDetails
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
internal fun deserializeAssetDetailsDocument(deserializer: Deserializer): AssetDetails {
val builder = AssetDetails.Builder()
val APIGATEWAYAPIASSET_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ApiGatewayApiAsset"))
val LAKEFORMATIONDATAPERMISSIONASSET_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("LakeFormationDataPermissionAsset"))
val REDSHIFTDATASHAREASSET_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("RedshiftDataShareAsset"))
val S3DATAACCESSASSET_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("S3DataAccessAsset"))
val S3SNAPSHOTASSET_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("S3SnapshotAsset"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(APIGATEWAYAPIASSET_DESCRIPTOR)
field(LAKEFORMATIONDATAPERMISSIONASSET_DESCRIPTOR)
field(REDSHIFTDATASHAREASSET_DESCRIPTOR)
field(S3DATAACCESSASSET_DESCRIPTOR)
field(S3SNAPSHOTASSET_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
APIGATEWAYAPIASSET_DESCRIPTOR.index -> builder.apiGatewayApiAsset = deserializeApiGatewayApiAssetDocument(deserializer)
LAKEFORMATIONDATAPERMISSIONASSET_DESCRIPTOR.index -> builder.lakeFormationDataPermissionAsset = deserializeLakeFormationDataPermissionAssetDocument(deserializer)
REDSHIFTDATASHAREASSET_DESCRIPTOR.index -> builder.redshiftDataShareAsset = deserializeRedshiftDataShareAssetDocument(deserializer)
S3DATAACCESSASSET_DESCRIPTOR.index -> builder.s3DataAccessAsset = deserializeS3DataAccessAssetDocument(deserializer)
S3SNAPSHOTASSET_DESCRIPTOR.index -> builder.s3SnapshotAsset = deserializeS3SnapshotAssetDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}