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

commonMain.aws.sdk.kotlin.services.account.serde.ContactInformationDocumentSerializer.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.account.serde

import aws.sdk.kotlin.services.account.model.ContactInformation
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 serializeContactInformationDocument(serializer: Serializer, input: ContactInformation) {
    val ADDRESSLINE1_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("AddressLine1"))
    val ADDRESSLINE2_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("AddressLine2"))
    val ADDRESSLINE3_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("AddressLine3"))
    val CITY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("City"))
    val COMPANYNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CompanyName"))
    val COUNTRYCODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CountryCode"))
    val DISTRICTORCOUNTY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DistrictOrCounty"))
    val FULLNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("FullName"))
    val PHONENUMBER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("PhoneNumber"))
    val POSTALCODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("PostalCode"))
    val STATEORREGION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("StateOrRegion"))
    val WEBSITEURL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("WebsiteUrl"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(ADDRESSLINE1_DESCRIPTOR)
        field(ADDRESSLINE2_DESCRIPTOR)
        field(ADDRESSLINE3_DESCRIPTOR)
        field(CITY_DESCRIPTOR)
        field(COMPANYNAME_DESCRIPTOR)
        field(COUNTRYCODE_DESCRIPTOR)
        field(DISTRICTORCOUNTY_DESCRIPTOR)
        field(FULLNAME_DESCRIPTOR)
        field(PHONENUMBER_DESCRIPTOR)
        field(POSTALCODE_DESCRIPTOR)
        field(STATEORREGION_DESCRIPTOR)
        field(WEBSITEURL_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        field(FULLNAME_DESCRIPTOR, input.fullName)
        field(ADDRESSLINE1_DESCRIPTOR, input.addressLine1)
        input.addressLine2?.let { field(ADDRESSLINE2_DESCRIPTOR, it) }
        input.addressLine3?.let { field(ADDRESSLINE3_DESCRIPTOR, it) }
        field(CITY_DESCRIPTOR, input.city)
        input.stateOrRegion?.let { field(STATEORREGION_DESCRIPTOR, it) }
        input.districtOrCounty?.let { field(DISTRICTORCOUNTY_DESCRIPTOR, it) }
        field(POSTALCODE_DESCRIPTOR, input.postalCode)
        field(COUNTRYCODE_DESCRIPTOR, input.countryCode)
        field(PHONENUMBER_DESCRIPTOR, input.phoneNumber)
        input.companyName?.let { field(COMPANYNAME_DESCRIPTOR, it) }
        input.websiteUrl?.let { field(WEBSITEURL_DESCRIPTOR, it) }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy