commonMain.aws.sdk.kotlin.services.snowball.serde.AddressDocumentSerializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of snowball-jvm Show documentation
Show all versions of snowball-jvm Show documentation
The AWS Kotlin client for Snowball
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.Address
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 serializeAddressDocument(serializer: Serializer, input: Address) {
val ADDRESSID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("AddressId"))
val CITY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("City"))
val COMPANY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Company"))
val COUNTRY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Country"))
val ISRESTRICTED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("IsRestricted"))
val LANDMARK_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Landmark"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Name"))
val PHONENUMBER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("PhoneNumber"))
val POSTALCODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("PostalCode"))
val PREFECTUREORDISTRICT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("PrefectureOrDistrict"))
val STATEORPROVINCE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("StateOrProvince"))
val STREET1_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Street1"))
val STREET2_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Street2"))
val STREET3_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Street3"))
val TYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Type"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ADDRESSID_DESCRIPTOR)
field(CITY_DESCRIPTOR)
field(COMPANY_DESCRIPTOR)
field(COUNTRY_DESCRIPTOR)
field(ISRESTRICTED_DESCRIPTOR)
field(LANDMARK_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(PHONENUMBER_DESCRIPTOR)
field(POSTALCODE_DESCRIPTOR)
field(PREFECTUREORDISTRICT_DESCRIPTOR)
field(STATEORPROVINCE_DESCRIPTOR)
field(STREET1_DESCRIPTOR)
field(STREET2_DESCRIPTOR)
field(STREET3_DESCRIPTOR)
field(TYPE_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.addressId?.let { field(ADDRESSID_DESCRIPTOR, it) }
input.name?.let { field(NAME_DESCRIPTOR, it) }
input.company?.let { field(COMPANY_DESCRIPTOR, it) }
input.street1?.let { field(STREET1_DESCRIPTOR, it) }
input.street2?.let { field(STREET2_DESCRIPTOR, it) }
input.street3?.let { field(STREET3_DESCRIPTOR, it) }
input.city?.let { field(CITY_DESCRIPTOR, it) }
input.stateOrProvince?.let { field(STATEORPROVINCE_DESCRIPTOR, it) }
input.prefectureOrDistrict?.let { field(PREFECTUREORDISTRICT_DESCRIPTOR, it) }
input.landmark?.let { field(LANDMARK_DESCRIPTOR, it) }
input.country?.let { field(COUNTRY_DESCRIPTOR, it) }
input.postalCode?.let { field(POSTALCODE_DESCRIPTOR, it) }
input.phoneNumber?.let { field(PHONENUMBER_DESCRIPTOR, it) }
if (input.isRestricted != false) field(ISRESTRICTED_DESCRIPTOR, input.isRestricted)
input.type?.let { field(TYPE_DESCRIPTOR, it.value) }
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy