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

commonMain.aws.sdk.kotlin.services.glue.serde.JobUpdateDocumentSerializer.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.glue.serde

import aws.sdk.kotlin.services.glue.model.JobUpdate
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 serializeJobUpdateDocument(serializer: Serializer, input: JobUpdate) {
    val ALLOCATEDCAPACITY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("AllocatedCapacity"))
    val CODEGENCONFIGURATIONNODES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("CodeGenConfigurationNodes"))
    val COMMAND_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Command"))
    val CONNECTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Connections"))
    val DEFAULTARGUMENTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("DefaultArguments"))
    val DESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Description"))
    val EXECUTIONCLASS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ExecutionClass"))
    val EXECUTIONPROPERTY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ExecutionProperty"))
    val GLUEVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("GlueVersion"))
    val JOBMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("JobMode"))
    val JOBRUNQUEUINGENABLED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("JobRunQueuingEnabled"))
    val LOGURI_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("LogUri"))
    val MAINTENANCEWINDOW_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("MaintenanceWindow"))
    val MAXCAPACITY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Double, JsonSerialName("MaxCapacity"))
    val MAXRETRIES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("MaxRetries"))
    val NONOVERRIDABLEARGUMENTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("NonOverridableArguments"))
    val NOTIFICATIONPROPERTY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("NotificationProperty"))
    val NUMBEROFWORKERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("NumberOfWorkers"))
    val ROLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Role"))
    val SECURITYCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SecurityConfiguration"))
    val SOURCECONTROLDETAILS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("SourceControlDetails"))
    val TIMEOUT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("Timeout"))
    val WORKERTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("WorkerType"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(ALLOCATEDCAPACITY_DESCRIPTOR)
        field(CODEGENCONFIGURATIONNODES_DESCRIPTOR)
        field(COMMAND_DESCRIPTOR)
        field(CONNECTIONS_DESCRIPTOR)
        field(DEFAULTARGUMENTS_DESCRIPTOR)
        field(DESCRIPTION_DESCRIPTOR)
        field(EXECUTIONCLASS_DESCRIPTOR)
        field(EXECUTIONPROPERTY_DESCRIPTOR)
        field(GLUEVERSION_DESCRIPTOR)
        field(JOBMODE_DESCRIPTOR)
        field(JOBRUNQUEUINGENABLED_DESCRIPTOR)
        field(LOGURI_DESCRIPTOR)
        field(MAINTENANCEWINDOW_DESCRIPTOR)
        field(MAXCAPACITY_DESCRIPTOR)
        field(MAXRETRIES_DESCRIPTOR)
        field(NONOVERRIDABLEARGUMENTS_DESCRIPTOR)
        field(NOTIFICATIONPROPERTY_DESCRIPTOR)
        field(NUMBEROFWORKERS_DESCRIPTOR)
        field(ROLE_DESCRIPTOR)
        field(SECURITYCONFIGURATION_DESCRIPTOR)
        field(SOURCECONTROLDETAILS_DESCRIPTOR)
        field(TIMEOUT_DESCRIPTOR)
        field(WORKERTYPE_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        input.jobMode?.let { field(JOBMODE_DESCRIPTOR, it.value) }
        input.jobRunQueuingEnabled?.let { field(JOBRUNQUEUINGENABLED_DESCRIPTOR, it) }
        input.description?.let { field(DESCRIPTION_DESCRIPTOR, it) }
        input.logUri?.let { field(LOGURI_DESCRIPTOR, it) }
        input.role?.let { field(ROLE_DESCRIPTOR, it) }
        input.executionProperty?.let { field(EXECUTIONPROPERTY_DESCRIPTOR, it, ::serializeExecutionPropertyDocument) }
        input.command?.let { field(COMMAND_DESCRIPTOR, it, ::serializeJobCommandDocument) }
        if (input.defaultArguments != null) {
            mapField(DEFAULTARGUMENTS_DESCRIPTOR) {
                input.defaultArguments.forEach { (key, value) ->
                    entry(key, value)
                }
            }
        }
        if (input.nonOverridableArguments != null) {
            mapField(NONOVERRIDABLEARGUMENTS_DESCRIPTOR) {
                input.nonOverridableArguments.forEach { (key, value) ->
                    entry(key, value)
                }
            }
        }
        input.connections?.let { field(CONNECTIONS_DESCRIPTOR, it, ::serializeConnectionsListDocument) }
        if (input.maxRetries != 0) field(MAXRETRIES_DESCRIPTOR, input.maxRetries)
        if (input.allocatedCapacity != 0) field(ALLOCATEDCAPACITY_DESCRIPTOR, input.allocatedCapacity)
        input.timeout?.let { field(TIMEOUT_DESCRIPTOR, it) }
        input.maxCapacity?.let { field(MAXCAPACITY_DESCRIPTOR, it) }
        input.workerType?.let { field(WORKERTYPE_DESCRIPTOR, it.value) }
        input.numberOfWorkers?.let { field(NUMBEROFWORKERS_DESCRIPTOR, it) }
        input.securityConfiguration?.let { field(SECURITYCONFIGURATION_DESCRIPTOR, it) }
        input.notificationProperty?.let { field(NOTIFICATIONPROPERTY_DESCRIPTOR, it, ::serializeNotificationPropertyDocument) }
        input.glueVersion?.let { field(GLUEVERSION_DESCRIPTOR, it) }
        if (input.codeGenConfigurationNodes != null) {
            mapField(CODEGENCONFIGURATIONNODES_DESCRIPTOR) {
                input.codeGenConfigurationNodes.forEach { (key, value) -> entry(key, asSdkSerializable(value, ::serializeCodeGenConfigurationNodeDocument)) }
            }
        }
        input.executionClass?.let { field(EXECUTIONCLASS_DESCRIPTOR, it.value) }
        input.sourceControlDetails?.let { field(SOURCECONTROLDETAILS_DESCRIPTOR, it, ::serializeSourceControlDetailsDocument) }
        input.maintenanceWindow?.let { field(MAINTENANCEWINDOW_DESCRIPTOR, it) }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy