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

commonMain.aws.sdk.kotlin.services.snowball.serde.PickupDetailsDocumentSerializer.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.snowball.serde

import aws.sdk.kotlin.services.snowball.model.PickupDetails
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
import aws.smithy.kotlin.runtime.time.TimestampFormat

internal fun serializePickupDetailsDocument(serializer: Serializer, input: PickupDetails) {
    val DEVICEPICKUPID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DevicePickupId"))
    val EMAIL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Email"))
    val IDENTIFICATIONEXPIRATIONDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("IdentificationExpirationDate"))
    val IDENTIFICATIONISSUINGORG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("IdentificationIssuingOrg"))
    val IDENTIFICATIONNUMBER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("IdentificationNumber"))
    val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Name"))
    val PHONENUMBER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("PhoneNumber"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(DEVICEPICKUPID_DESCRIPTOR)
        field(EMAIL_DESCRIPTOR)
        field(IDENTIFICATIONEXPIRATIONDATE_DESCRIPTOR)
        field(IDENTIFICATIONISSUINGORG_DESCRIPTOR)
        field(IDENTIFICATIONNUMBER_DESCRIPTOR)
        field(NAME_DESCRIPTOR)
        field(PHONENUMBER_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        input.name?.let { field(NAME_DESCRIPTOR, it) }
        input.phoneNumber?.let { field(PHONENUMBER_DESCRIPTOR, it) }
        input.email?.let { field(EMAIL_DESCRIPTOR, it) }
        input.identificationNumber?.let { field(IDENTIFICATIONNUMBER_DESCRIPTOR, it) }
        input.identificationExpirationDate?.let { field(IDENTIFICATIONEXPIRATIONDATE_DESCRIPTOR, it, TimestampFormat.EPOCH_SECONDS) }
        input.identificationIssuingOrg?.let { field(IDENTIFICATIONISSUINGORG_DESCRIPTOR, it) }
        input.devicePickupId?.let { field(DEVICEPICKUPID_DESCRIPTOR, it) }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy