commonMain.aws.sdk.kotlin.services.eventbridge.serde.EcsParametersDocumentSerializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eventbridge-jvm Show documentation
Show all versions of eventbridge-jvm Show documentation
The AWS SDK for Kotlin client for EventBridge
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.eventbridge.serde
import aws.sdk.kotlin.services.eventbridge.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))
}
}
}
}
}