All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.s3.serde.DestinationDocumentSerializer.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.s3.serde

import aws.sdk.kotlin.services.s3.model.Destination
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.serializeList
import aws.smithy.kotlin.runtime.serde.serializeMap
import aws.smithy.kotlin.runtime.serde.serializeStruct
import aws.smithy.kotlin.runtime.serde.xml.XmlNamespace
import aws.smithy.kotlin.runtime.serde.xml.XmlSerialName

internal fun serializeDestinationDocument(serializer: Serializer, input: Destination) {
    val ACCESSCONTROLTRANSLATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, XmlSerialName("AccessControlTranslation"))
    val ACCOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, XmlSerialName("Account"))
    val BUCKET_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, XmlSerialName("Bucket"))
    val ENCRYPTIONCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, XmlSerialName("EncryptionConfiguration"))
    val METRICS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, XmlSerialName("Metrics"))
    val REPLICATIONTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, XmlSerialName("ReplicationTime"))
    val STORAGECLASS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, XmlSerialName("StorageClass"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        trait(XmlSerialName("Destination"))
        trait(XmlNamespace("http://s3.amazonaws.com/doc/2006-03-01/"))
        field(ACCESSCONTROLTRANSLATION_DESCRIPTOR)
        field(ACCOUNT_DESCRIPTOR)
        field(BUCKET_DESCRIPTOR)
        field(ENCRYPTIONCONFIGURATION_DESCRIPTOR)
        field(METRICS_DESCRIPTOR)
        field(REPLICATIONTIME_DESCRIPTOR)
        field(STORAGECLASS_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        input.accessControlTranslation?.let { field(ACCESSCONTROLTRANSLATION_DESCRIPTOR, it, ::serializeAccessControlTranslationDocument) }
        input.account?.let { field(ACCOUNT_DESCRIPTOR, it) }
        field(BUCKET_DESCRIPTOR, input.bucket)
        input.encryptionConfiguration?.let { field(ENCRYPTIONCONFIGURATION_DESCRIPTOR, it, ::serializeEncryptionConfigurationDocument) }
        input.metrics?.let { field(METRICS_DESCRIPTOR, it, ::serializeMetricsDocument) }
        input.replicationTime?.let { field(REPLICATIONTIME_DESCRIPTOR, it, ::serializeReplicationTimeDocument) }
        input.storageClass?.let { field(STORAGECLASS_DESCRIPTOR, it.value) }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy