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

commonMain.aws.sdk.kotlin.services.qldb.serde.JournalS3ExportDescriptionDocumentDeserializer.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.qldb.serde

import aws.sdk.kotlin.services.qldb.model.ExportStatus
import aws.sdk.kotlin.services.qldb.model.JournalS3ExportDescription
import aws.sdk.kotlin.services.qldb.model.OutputFormat
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

internal fun deserializeJournalS3ExportDescriptionDocument(deserializer: Deserializer): JournalS3ExportDescription {
    val builder = JournalS3ExportDescription.Builder()
    val EXCLUSIVEENDTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("ExclusiveEndTime"))
    val EXPORTCREATIONTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("ExportCreationTime"))
    val EXPORTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ExportId"))
    val INCLUSIVESTARTTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("InclusiveStartTime"))
    val LEDGERNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("LedgerName"))
    val OUTPUTFORMAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("OutputFormat"))
    val ROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("RoleArn"))
    val S3EXPORTCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("S3ExportConfiguration"))
    val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Status"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(EXCLUSIVEENDTIME_DESCRIPTOR)
        field(EXPORTCREATIONTIME_DESCRIPTOR)
        field(EXPORTID_DESCRIPTOR)
        field(INCLUSIVESTARTTIME_DESCRIPTOR)
        field(LEDGERNAME_DESCRIPTOR)
        field(OUTPUTFORMAT_DESCRIPTOR)
        field(ROLEARN_DESCRIPTOR)
        field(S3EXPORTCONFIGURATION_DESCRIPTOR)
        field(STATUS_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                EXCLUSIVEENDTIME_DESCRIPTOR.index -> builder.exclusiveEndTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
                EXPORTCREATIONTIME_DESCRIPTOR.index -> builder.exportCreationTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
                EXPORTID_DESCRIPTOR.index -> builder.exportId = deserializeString()
                INCLUSIVESTARTTIME_DESCRIPTOR.index -> builder.inclusiveStartTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
                LEDGERNAME_DESCRIPTOR.index -> builder.ledgerName = deserializeString()
                OUTPUTFORMAT_DESCRIPTOR.index -> builder.outputFormat = deserializeString().let { OutputFormat.fromValue(it) }
                ROLEARN_DESCRIPTOR.index -> builder.roleArn = deserializeString()
                S3EXPORTCONFIGURATION_DESCRIPTOR.index -> builder.s3ExportConfiguration = deserializeS3ExportConfigurationDocument(deserializer)
                STATUS_DESCRIPTOR.index -> builder.status = deserializeString().let { ExportStatus.fromValue(it) }
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy