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

commonMain.aws.sdk.kotlin.services.partnercentralselling.serde.LifeCycleDocumentSerializer.kt Maven / Gradle / Ivy

There is a newer version: 1.3.79
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.partnercentralselling.serde

import aws.sdk.kotlin.services.partnercentralselling.model.LifeCycle
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 serializeLifeCycleDocument(serializer: Serializer, input: LifeCycle) {
    val CLOSEDLOSTREASON_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ClosedLostReason"))
    val NEXTSTEPS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("NextSteps"))
    val NEXTSTEPSHISTORY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("NextStepsHistory"))
    val REVIEWCOMMENTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ReviewComments"))
    val REVIEWSTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ReviewStatus"))
    val REVIEWSTATUSREASON_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ReviewStatusReason"))
    val STAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Stage"))
    val TARGETCLOSEDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TargetCloseDate"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(CLOSEDLOSTREASON_DESCRIPTOR)
        field(NEXTSTEPS_DESCRIPTOR)
        field(NEXTSTEPSHISTORY_DESCRIPTOR)
        field(REVIEWCOMMENTS_DESCRIPTOR)
        field(REVIEWSTATUS_DESCRIPTOR)
        field(REVIEWSTATUSREASON_DESCRIPTOR)
        field(STAGE_DESCRIPTOR)
        field(TARGETCLOSEDATE_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        input.stage?.let { field(STAGE_DESCRIPTOR, it.value) }
        input.closedLostReason?.let { field(CLOSEDLOSTREASON_DESCRIPTOR, it.value) }
        input.nextSteps?.let { field(NEXTSTEPS_DESCRIPTOR, it) }
        input.targetCloseDate?.let { field(TARGETCLOSEDATE_DESCRIPTOR, it) }
        input.reviewStatus?.let { field(REVIEWSTATUS_DESCRIPTOR, it.value) }
        input.reviewComments?.let { field(REVIEWCOMMENTS_DESCRIPTOR, it) }
        input.reviewStatusReason?.let { field(REVIEWSTATUSREASON_DESCRIPTOR, it) }
        if (input.nextStepsHistory != null) {
            listField(NEXTSTEPSHISTORY_DESCRIPTOR) {
                for (el0 in input.nextStepsHistory) {
                    serializeSdkSerializable(asSdkSerializable(el0, ::serializeNextStepsHistoryDocument))
                }
            }
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy