commonMain.aws.sdk.kotlin.services.snowball.serde.JobResourceDocumentSerializer.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.JobResource
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 serializeJobResourceDocument(serializer: Serializer, input: JobResource) {
val EC2AMIRESOURCES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("Ec2AmiResources"))
val LAMBDARESOURCES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("LambdaResources"))
val S3RESOURCES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("S3Resources"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(EC2AMIRESOURCES_DESCRIPTOR)
field(LAMBDARESOURCES_DESCRIPTOR)
field(S3RESOURCES_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
if (input.s3Resources != null) {
listField(S3RESOURCES_DESCRIPTOR) {
for (el0 in input.s3Resources) {
serializeSdkSerializable(asSdkSerializable(el0, ::serializeS3ResourceDocument))
}
}
}
if (input.lambdaResources != null) {
listField(LAMBDARESOURCES_DESCRIPTOR) {
for (el0 in input.lambdaResources) {
serializeSdkSerializable(asSdkSerializable(el0, ::serializeLambdaResourceDocument))
}
}
}
if (input.ec2AmiResources != null) {
listField(EC2AMIRESOURCES_DESCRIPTOR) {
for (el0 in input.ec2AmiResources) {
serializeSdkSerializable(asSdkSerializable(el0, ::serializeEc2AmiResourceDocument))
}
}
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy