commonMain.aws.sdk.kotlin.services.deadline.serde.JobEntityIdentifiersUnionDocumentSerializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deadline-jvm Show documentation
Show all versions of deadline-jvm Show documentation
The AWS SDK for Kotlin client for deadline
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.deadline.serde
import aws.sdk.kotlin.services.deadline.model.JobEntityIdentifiersUnion
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.SerializationException
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 serializeJobEntityIdentifiersUnionDocument(serializer: Serializer, input: JobEntityIdentifiersUnion) {
val ENVIRONMENTDETAILS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("environmentDetails"))
val JOBATTACHMENTDETAILS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("jobAttachmentDetails"))
val JOBDETAILS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("jobDetails"))
val STEPDETAILS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("stepDetails"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ENVIRONMENTDETAILS_DESCRIPTOR)
field(JOBATTACHMENTDETAILS_DESCRIPTOR)
field(JOBDETAILS_DESCRIPTOR)
field(STEPDETAILS_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
when (input) {
is JobEntityIdentifiersUnion.JobDetails -> field(JOBDETAILS_DESCRIPTOR, input.value, ::serializeJobDetailsIdentifiersDocument)
is JobEntityIdentifiersUnion.JobAttachmentDetails -> field(JOBATTACHMENTDETAILS_DESCRIPTOR, input.value, ::serializeJobAttachmentDetailsIdentifiersDocument)
is JobEntityIdentifiersUnion.StepDetails -> field(STEPDETAILS_DESCRIPTOR, input.value, ::serializeStepDetailsIdentifiersDocument)
is JobEntityIdentifiersUnion.EnvironmentDetails -> field(ENVIRONMENTDETAILS_DESCRIPTOR, input.value, ::serializeEnvironmentDetailsIdentifiersDocument)
is JobEntityIdentifiersUnion.SdkUnknown -> throw SerializationException("Cannot serialize SdkUnknown")
}
}
}