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

commonMain.aws.sdk.kotlin.services.databasemigrationservice.serde.ComputeConfigDocumentSerializer.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.databasemigrationservice.serde

import aws.sdk.kotlin.services.databasemigrationservice.model.ComputeConfig
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 serializeComputeConfigDocument(serializer: Serializer, input: ComputeConfig) {
    val AVAILABILITYZONE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("AvailabilityZone"))
    val DNSNAMESERVERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DnsNameServers"))
    val KMSKEYID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("KmsKeyId"))
    val MAXCAPACITYUNITS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("MaxCapacityUnits"))
    val MINCAPACITYUNITS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("MinCapacityUnits"))
    val MULTIAZ_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("MultiAZ"))
    val PREFERREDMAINTENANCEWINDOW_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("PreferredMaintenanceWindow"))
    val REPLICATIONSUBNETGROUPID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ReplicationSubnetGroupId"))
    val VPCSECURITYGROUPIDS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("VpcSecurityGroupIds"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(AVAILABILITYZONE_DESCRIPTOR)
        field(DNSNAMESERVERS_DESCRIPTOR)
        field(KMSKEYID_DESCRIPTOR)
        field(MAXCAPACITYUNITS_DESCRIPTOR)
        field(MINCAPACITYUNITS_DESCRIPTOR)
        field(MULTIAZ_DESCRIPTOR)
        field(PREFERREDMAINTENANCEWINDOW_DESCRIPTOR)
        field(REPLICATIONSUBNETGROUPID_DESCRIPTOR)
        field(VPCSECURITYGROUPIDS_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        input.availabilityZone?.let { field(AVAILABILITYZONE_DESCRIPTOR, it) }
        input.dnsNameServers?.let { field(DNSNAMESERVERS_DESCRIPTOR, it) }
        input.kmsKeyId?.let { field(KMSKEYID_DESCRIPTOR, it) }
        input.maxCapacityUnits?.let { field(MAXCAPACITYUNITS_DESCRIPTOR, it) }
        input.minCapacityUnits?.let { field(MINCAPACITYUNITS_DESCRIPTOR, it) }
        input.multiAz?.let { field(MULTIAZ_DESCRIPTOR, it) }
        input.preferredMaintenanceWindow?.let { field(PREFERREDMAINTENANCEWINDOW_DESCRIPTOR, it) }
        input.replicationSubnetGroupId?.let { field(REPLICATIONSUBNETGROUPID_DESCRIPTOR, it) }
        if (input.vpcSecurityGroupIds != null) {
            listField(VPCSECURITYGROUPIDS_DESCRIPTOR) {
                for (el0 in input.vpcSecurityGroupIds) {
                    serializeString(el0)
                }
            }
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy