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

commonMain.aws.sdk.kotlin.services.cloudwatchevents.serde.EcsParametersDocumentSerializer.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.cloudwatchevents.serde

import aws.sdk.kotlin.services.cloudwatchevents.model.EcsParameters
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 serializeEcsParametersDocument(serializer: Serializer, input: EcsParameters) {
    val CAPACITYPROVIDERSTRATEGY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("CapacityProviderStrategy"))
    val ENABLEECSMANAGEDTAGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("EnableECSManagedTags"))
    val ENABLEEXECUTECOMMAND_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("EnableExecuteCommand"))
    val GROUP_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Group"))
    val LAUNCHTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("LaunchType"))
    val NETWORKCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("NetworkConfiguration"))
    val PLACEMENTCONSTRAINTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("PlacementConstraints"))
    val PLACEMENTSTRATEGY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("PlacementStrategy"))
    val PLATFORMVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("PlatformVersion"))
    val PROPAGATETAGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("PropagateTags"))
    val REFERENCEID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ReferenceId"))
    val TAGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("Tags"))
    val TASKCOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("TaskCount"))
    val TASKDEFINITIONARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TaskDefinitionArn"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(CAPACITYPROVIDERSTRATEGY_DESCRIPTOR)
        field(ENABLEECSMANAGEDTAGS_DESCRIPTOR)
        field(ENABLEEXECUTECOMMAND_DESCRIPTOR)
        field(GROUP_DESCRIPTOR)
        field(LAUNCHTYPE_DESCRIPTOR)
        field(NETWORKCONFIGURATION_DESCRIPTOR)
        field(PLACEMENTCONSTRAINTS_DESCRIPTOR)
        field(PLACEMENTSTRATEGY_DESCRIPTOR)
        field(PLATFORMVERSION_DESCRIPTOR)
        field(PROPAGATETAGS_DESCRIPTOR)
        field(REFERENCEID_DESCRIPTOR)
        field(TAGS_DESCRIPTOR)
        field(TASKCOUNT_DESCRIPTOR)
        field(TASKDEFINITIONARN_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        field(TASKDEFINITIONARN_DESCRIPTOR, input.taskDefinitionArn)
        input.taskCount?.let { field(TASKCOUNT_DESCRIPTOR, it) }
        input.launchType?.let { field(LAUNCHTYPE_DESCRIPTOR, it.value) }
        input.networkConfiguration?.let { field(NETWORKCONFIGURATION_DESCRIPTOR, it, ::serializeNetworkConfigurationDocument) }
        input.platformVersion?.let { field(PLATFORMVERSION_DESCRIPTOR, it) }
        input.group?.let { field(GROUP_DESCRIPTOR, it) }
        if (input.capacityProviderStrategy != null) {
            listField(CAPACITYPROVIDERSTRATEGY_DESCRIPTOR) {
                for (el0 in input.capacityProviderStrategy) {
                    serializeSdkSerializable(asSdkSerializable(el0, ::serializeCapacityProviderStrategyItemDocument))
                }
            }
        }
        if (input.enableEcsManagedTags != false) field(ENABLEECSMANAGEDTAGS_DESCRIPTOR, input.enableEcsManagedTags)
        if (input.enableExecuteCommand != false) field(ENABLEEXECUTECOMMAND_DESCRIPTOR, input.enableExecuteCommand)
        if (input.placementConstraints != null) {
            listField(PLACEMENTCONSTRAINTS_DESCRIPTOR) {
                for (el0 in input.placementConstraints) {
                    serializeSdkSerializable(asSdkSerializable(el0, ::serializePlacementConstraintDocument))
                }
            }
        }
        if (input.placementStrategy != null) {
            listField(PLACEMENTSTRATEGY_DESCRIPTOR) {
                for (el0 in input.placementStrategy) {
                    serializeSdkSerializable(asSdkSerializable(el0, ::serializePlacementStrategyDocument))
                }
            }
        }
        input.propagateTags?.let { field(PROPAGATETAGS_DESCRIPTOR, it.value) }
        input.referenceId?.let { field(REFERENCEID_DESCRIPTOR, it) }
        if (input.tags != null) {
            listField(TAGS_DESCRIPTOR) {
                for (el0 in input.tags) {
                    serializeSdkSerializable(asSdkSerializable(el0, ::serializeTagDocument))
                }
            }
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy