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

commonMain.aws.sdk.kotlin.services.sagemakergeospatial.serde.JobConfigInputDocumentSerializer.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.SdkFieldDescriptor
import aws.smithy.kotlin.runtime.serde.SdkObjectDescriptor
import aws.smithy.kotlin.runtime.serde.SerialKind
import aws.smithy.kotlin.runtime.serde.SerializationException
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 serializeJobConfigInputDocument(serializer: Serializer, input: JobConfigInput) {
    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 {
        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)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        when (input) {
            is JobConfigInput.BandMathConfig -> field(BANDMATHCONFIG_DESCRIPTOR, input.value, ::serializeBandMathConfigInputDocument)
            is JobConfigInput.ResamplingConfig -> field(RESAMPLINGCONFIG_DESCRIPTOR, input.value, ::serializeResamplingConfigInputDocument)
            is JobConfigInput.TemporalStatisticsConfig -> field(TEMPORALSTATISTICSCONFIG_DESCRIPTOR, input.value, ::serializeTemporalStatisticsConfigInputDocument)
            is JobConfigInput.CloudRemovalConfig -> field(CLOUDREMOVALCONFIG_DESCRIPTOR, input.value, ::serializeCloudRemovalConfigInputDocument)
            is JobConfigInput.ZonalStatisticsConfig -> field(ZONALSTATISTICSCONFIG_DESCRIPTOR, input.value, ::serializeZonalStatisticsConfigInputDocument)
            is JobConfigInput.GeoMosaicConfig -> field(GEOMOSAICCONFIG_DESCRIPTOR, input.value, ::serializeGeoMosaicConfigInputDocument)
            is JobConfigInput.StackConfig -> field(STACKCONFIG_DESCRIPTOR, input.value, ::serializeStackConfigInputDocument)
            is JobConfigInput.CloudMaskingConfig -> field(CLOUDMASKINGCONFIG_DESCRIPTOR, input.value, ::serializeCloudMaskingConfigInputDocument)
            is JobConfigInput.LandCoverSegmentationConfig -> field(LANDCOVERSEGMENTATIONCONFIG_DESCRIPTOR, input.value, ::serializeLandCoverSegmentationConfigInputDocument)
            is JobConfigInput.SdkUnknown -> throw SerializationException("Cannot serialize SdkUnknown")
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy