commonMain.aws.sdk.kotlin.services.glacier.transform.S3LocationDocumentSerializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glacier-jvm Show documentation
Show all versions of glacier-jvm Show documentation
The AWS Kotlin client for Glacier
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glacier.transform
import aws.sdk.kotlin.services.glacier.model.S3Location
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.Serializer
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 serializeS3LocationDocument(serializer: Serializer, input: S3Location) {
val ACCESSCONTROLLIST_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("AccessControlList"))
val BUCKETNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("BucketName"))
val CANNEDACL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CannedACL"))
val ENCRYPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Encryption"))
val PREFIX_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Prefix"))
val STORAGECLASS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("StorageClass"))
val TAGGING_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("Tagging"))
val USERMETADATA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("UserMetadata"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ACCESSCONTROLLIST_DESCRIPTOR)
field(BUCKETNAME_DESCRIPTOR)
field(CANNEDACL_DESCRIPTOR)
field(ENCRYPTION_DESCRIPTOR)
field(PREFIX_DESCRIPTOR)
field(STORAGECLASS_DESCRIPTOR)
field(TAGGING_DESCRIPTOR)
field(USERMETADATA_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.bucketName?.let { field(BUCKETNAME_DESCRIPTOR, it) }
input.prefix?.let { field(PREFIX_DESCRIPTOR, it) }
input.encryption?.let { field(ENCRYPTION_DESCRIPTOR, it, ::serializeEncryptionDocument) }
input.cannedAcl?.let { field(CANNEDACL_DESCRIPTOR, it.value) }
if (input.accessControlList != null) {
listField(ACCESSCONTROLLIST_DESCRIPTOR) {
for (el0 in input.accessControlList) {
serializeSdkSerializable(asSdkSerializable(el0, ::serializeGrantDocument))
}
}
}
if (input.tagging != null) {
mapField(TAGGING_DESCRIPTOR) {
input.tagging.forEach { (key, value) -> entry(key, value) }
}
}
if (input.userMetadata != null) {
mapField(USERMETADATA_DESCRIPTOR) {
input.userMetadata.forEach { (key, value) -> entry(key, value) }
}
}
input.storageClass?.let { field(STORAGECLASS_DESCRIPTOR, it.value) }
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy