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

commonMain.aws.sdk.kotlin.services.groundstation.serde.TleDataDocumentSerializer.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.groundstation.serde

import aws.sdk.kotlin.services.groundstation.model.TleData
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.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 serializeTleDataDocument(serializer: Serializer, input: TleData) {
    val TLELINE1_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("tleLine1"))
    val TLELINE2_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("tleLine2"))
    val VALIDTIMERANGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("validTimeRange"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(TLELINE1_DESCRIPTOR)
        field(TLELINE2_DESCRIPTOR)
        field(VALIDTIMERANGE_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        field(TLELINE1_DESCRIPTOR, input.tleLine1)
        field(TLELINE2_DESCRIPTOR, input.tleLine2)
        input.validTimeRange?.let { field(VALIDTIMERANGE_DESCRIPTOR, it, ::serializeTimeRangeDocument) }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy