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

commonMain.aws.sdk.kotlin.services.sagemakergeospatial.serde.JobConfigInputDocumentDeserializer.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.sagemakergeospatial.serde

import aws.sdk.kotlin.services.sagemakergeospatial.model.JobConfigInput
import aws.smithy.kotlin.runtime.serde.DeserializationException
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.IgnoreKey
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 deserializeJobConfigInputDocument(deserializer: Deserializer): JobConfigInput {
    var value: JobConfigInput? = null
    val BANDMATHCONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("BandMathConfig"))
    val CLOUDMASKINGCONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("CloudMaskingConfig"))
    val CLOUDREMOVALCONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("CloudRemovalConfig"))
    val GEOMOSAICCONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("GeoMosaicConfig"))
    val LANDCOVERSEGMENTATIONCONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("LandCoverSegmentationConfig"))
    val RESAMPLINGCONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ResamplingConfig"))
    val STACKCONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("StackConfig"))
    val TEMPORALSTATISTICSCONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("TemporalStatisticsConfig"))
    val ZONALSTATISTICSCONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ZonalStatisticsConfig"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        trait(IgnoreKey("__type"))
        field(BANDMATHCONFIG_DESCRIPTOR)
        field(CLOUDMASKINGCONFIG_DESCRIPTOR)
        field(CLOUDREMOVALCONFIG_DESCRIPTOR)
        field(GEOMOSAICCONFIG_DESCRIPTOR)
        field(LANDCOVERSEGMENTATIONCONFIG_DESCRIPTOR)
        field(RESAMPLINGCONFIG_DESCRIPTOR)
        field(STACKCONFIG_DESCRIPTOR)
        field(TEMPORALSTATISTICSCONFIG_DESCRIPTOR)
        field(ZONALSTATISTICSCONFIG_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while(true) {
            when(findNextFieldIndex()) {
                BANDMATHCONFIG_DESCRIPTOR.index -> value = JobConfigInput.BandMathConfig(deserializeBandMathConfigInputDocument(deserializer))
                CLOUDMASKINGCONFIG_DESCRIPTOR.index -> value = JobConfigInput.CloudMaskingConfig(deserializeCloudMaskingConfigInputDocument(deserializer))
                CLOUDREMOVALCONFIG_DESCRIPTOR.index -> value = JobConfigInput.CloudRemovalConfig(deserializeCloudRemovalConfigInputDocument(deserializer))
                GEOMOSAICCONFIG_DESCRIPTOR.index -> value = JobConfigInput.GeoMosaicConfig(deserializeGeoMosaicConfigInputDocument(deserializer))
                LANDCOVERSEGMENTATIONCONFIG_DESCRIPTOR.index -> value = JobConfigInput.LandCoverSegmentationConfig(deserializeLandCoverSegmentationConfigInputDocument(deserializer))
                RESAMPLINGCONFIG_DESCRIPTOR.index -> value = JobConfigInput.ResamplingConfig(deserializeResamplingConfigInputDocument(deserializer))
                STACKCONFIG_DESCRIPTOR.index -> value = JobConfigInput.StackConfig(deserializeStackConfigInputDocument(deserializer))
                TEMPORALSTATISTICSCONFIG_DESCRIPTOR.index -> value = JobConfigInput.TemporalStatisticsConfig(deserializeTemporalStatisticsConfigInputDocument(deserializer))
                ZONALSTATISTICSCONFIG_DESCRIPTOR.index -> value = JobConfigInput.ZonalStatisticsConfig(deserializeZonalStatisticsConfigInputDocument(deserializer))
                null -> break@loop
                else -> value = JobConfigInput.SdkUnknown.also { skipValue() }
            }
        }
    }
    return value ?: throw DeserializationException("Deserialized union value unexpectedly null: JobConfigInput")
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy