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

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

There is a newer version: 1.3.77
Show 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.Property
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 serializePropertyDocument(serializer: Serializer, input: Property) {
    val EOCLOUDCOVER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("EoCloudCover"))
    val LANDSATCLOUDCOVERLAND_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("LandsatCloudCoverLand"))
    val PLATFORM_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Platform"))
    val VIEWOFFNADIR_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ViewOffNadir"))
    val VIEWSUNAZIMUTH_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ViewSunAzimuth"))
    val VIEWSUNELEVATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ViewSunElevation"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(EOCLOUDCOVER_DESCRIPTOR)
        field(LANDSATCLOUDCOVERLAND_DESCRIPTOR)
        field(PLATFORM_DESCRIPTOR)
        field(VIEWOFFNADIR_DESCRIPTOR)
        field(VIEWSUNAZIMUTH_DESCRIPTOR)
        field(VIEWSUNELEVATION_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        when (input) {
            is Property.EoCloudCover -> field(EOCLOUDCOVER_DESCRIPTOR, input.value, ::serializeEoCloudCoverInputDocument)
            is Property.ViewOffNadir -> field(VIEWOFFNADIR_DESCRIPTOR, input.value, ::serializeViewOffNadirInputDocument)
            is Property.ViewSunAzimuth -> field(VIEWSUNAZIMUTH_DESCRIPTOR, input.value, ::serializeViewSunAzimuthInputDocument)
            is Property.ViewSunElevation -> field(VIEWSUNELEVATION_DESCRIPTOR, input.value, ::serializeViewSunElevationInputDocument)
            is Property.Platform -> field(PLATFORM_DESCRIPTOR, input.value, ::serializePlatformInputDocument)
            is Property.LandsatCloudCoverLand -> field(LANDSATCLOUDCOVERLAND_DESCRIPTOR, input.value, ::serializeLandsatCloudCoverLandInputDocument)
            is Property.SdkUnknown -> throw SerializationException("Cannot serialize SdkUnknown")
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy