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

commonMain.aws.sdk.kotlin.services.glacier.transform.GlacierJobDescriptionDocumentDeserializer.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.glacier.transform

import aws.sdk.kotlin.services.glacier.model.ActionCode
import aws.sdk.kotlin.services.glacier.model.GlacierJobDescription
import aws.sdk.kotlin.services.glacier.model.StatusCode
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 deserializeGlacierJobDescriptionDocument(deserializer: Deserializer): GlacierJobDescription {
    val builder = GlacierJobDescription.Builder()
    val ACTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Action"))
    val ARCHIVEID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ArchiveId"))
    val ARCHIVESHA256TREEHASH_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ArchiveSHA256TreeHash"))
    val ARCHIVESIZEINBYTES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("ArchiveSizeInBytes"))
    val COMPLETED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("Completed"))
    val COMPLETIONDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CompletionDate"))
    val CREATIONDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CreationDate"))
    val INVENTORYRETRIEVALPARAMETERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("InventoryRetrievalParameters"))
    val INVENTORYSIZEINBYTES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("InventorySizeInBytes"))
    val JOBDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("JobDescription"))
    val JOBID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("JobId"))
    val JOBOUTPUTPATH_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("JobOutputPath"))
    val OUTPUTLOCATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("OutputLocation"))
    val RETRIEVALBYTERANGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("RetrievalByteRange"))
    val SHA256TREEHASH_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SHA256TreeHash"))
    val SNSTOPIC_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SNSTopic"))
    val SELECTPARAMETERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("SelectParameters"))
    val STATUSCODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("StatusCode"))
    val STATUSMESSAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("StatusMessage"))
    val TIER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Tier"))
    val VAULTARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("VaultARN"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(ACTION_DESCRIPTOR)
        field(ARCHIVEID_DESCRIPTOR)
        field(ARCHIVESHA256TREEHASH_DESCRIPTOR)
        field(ARCHIVESIZEINBYTES_DESCRIPTOR)
        field(COMPLETED_DESCRIPTOR)
        field(COMPLETIONDATE_DESCRIPTOR)
        field(CREATIONDATE_DESCRIPTOR)
        field(INVENTORYRETRIEVALPARAMETERS_DESCRIPTOR)
        field(INVENTORYSIZEINBYTES_DESCRIPTOR)
        field(JOBDESCRIPTION_DESCRIPTOR)
        field(JOBID_DESCRIPTOR)
        field(JOBOUTPUTPATH_DESCRIPTOR)
        field(OUTPUTLOCATION_DESCRIPTOR)
        field(RETRIEVALBYTERANGE_DESCRIPTOR)
        field(SHA256TREEHASH_DESCRIPTOR)
        field(SNSTOPIC_DESCRIPTOR)
        field(SELECTPARAMETERS_DESCRIPTOR)
        field(STATUSCODE_DESCRIPTOR)
        field(STATUSMESSAGE_DESCRIPTOR)
        field(TIER_DESCRIPTOR)
        field(VAULTARN_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                ACTION_DESCRIPTOR.index -> builder.action = deserializeString().let { ActionCode.fromValue(it) }
                ARCHIVEID_DESCRIPTOR.index -> builder.archiveId = deserializeString()
                ARCHIVESHA256TREEHASH_DESCRIPTOR.index -> builder.archiveSha256TreeHash = deserializeString()
                ARCHIVESIZEINBYTES_DESCRIPTOR.index -> builder.archiveSizeInBytes = deserializeLong()
                COMPLETED_DESCRIPTOR.index -> builder.completed = deserializeBoolean()
                COMPLETIONDATE_DESCRIPTOR.index -> builder.completionDate = deserializeString()
                CREATIONDATE_DESCRIPTOR.index -> builder.creationDate = deserializeString()
                INVENTORYRETRIEVALPARAMETERS_DESCRIPTOR.index -> builder.inventoryRetrievalParameters = deserializeInventoryRetrievalJobDescriptionDocument(deserializer)
                INVENTORYSIZEINBYTES_DESCRIPTOR.index -> builder.inventorySizeInBytes = deserializeLong()
                JOBDESCRIPTION_DESCRIPTOR.index -> builder.jobDescription = deserializeString()
                JOBID_DESCRIPTOR.index -> builder.jobId = deserializeString()
                JOBOUTPUTPATH_DESCRIPTOR.index -> builder.jobOutputPath = deserializeString()
                OUTPUTLOCATION_DESCRIPTOR.index -> builder.outputLocation = deserializeOutputLocationDocument(deserializer)
                RETRIEVALBYTERANGE_DESCRIPTOR.index -> builder.retrievalByteRange = deserializeString()
                SHA256TREEHASH_DESCRIPTOR.index -> builder.sha256TreeHash = deserializeString()
                SNSTOPIC_DESCRIPTOR.index -> builder.snsTopic = deserializeString()
                SELECTPARAMETERS_DESCRIPTOR.index -> builder.selectParameters = deserializeSelectParametersDocument(deserializer)
                STATUSCODE_DESCRIPTOR.index -> builder.statusCode = deserializeString().let { StatusCode.fromValue(it) }
                STATUSMESSAGE_DESCRIPTOR.index -> builder.statusMessage = deserializeString()
                TIER_DESCRIPTOR.index -> builder.tier = deserializeString()
                VAULTARN_DESCRIPTOR.index -> builder.vaultArn = deserializeString()
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy