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

commonMain.aws.sdk.kotlin.services.cloudwatchevents.serde.TargetDocumentSerializer.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.Target
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 serializeTargetDocument(serializer: Serializer, input: Target) {
    val ARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Arn"))
    val BATCHPARAMETERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("BatchParameters"))
    val DEADLETTERCONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("DeadLetterConfig"))
    val ECSPARAMETERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("EcsParameters"))
    val HTTPPARAMETERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("HttpParameters"))
    val ID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Id"))
    val INPUT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Input"))
    val INPUTPATH_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("InputPath"))
    val INPUTTRANSFORMER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("InputTransformer"))
    val KINESISPARAMETERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("KinesisParameters"))
    val REDSHIFTDATAPARAMETERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("RedshiftDataParameters"))
    val RETRYPOLICY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("RetryPolicy"))
    val ROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("RoleArn"))
    val RUNCOMMANDPARAMETERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("RunCommandParameters"))
    val SAGEMAKERPIPELINEPARAMETERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("SageMakerPipelineParameters"))
    val SQSPARAMETERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("SqsParameters"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(ARN_DESCRIPTOR)
        field(BATCHPARAMETERS_DESCRIPTOR)
        field(DEADLETTERCONFIG_DESCRIPTOR)
        field(ECSPARAMETERS_DESCRIPTOR)
        field(HTTPPARAMETERS_DESCRIPTOR)
        field(ID_DESCRIPTOR)
        field(INPUT_DESCRIPTOR)
        field(INPUTPATH_DESCRIPTOR)
        field(INPUTTRANSFORMER_DESCRIPTOR)
        field(KINESISPARAMETERS_DESCRIPTOR)
        field(REDSHIFTDATAPARAMETERS_DESCRIPTOR)
        field(RETRYPOLICY_DESCRIPTOR)
        field(ROLEARN_DESCRIPTOR)
        field(RUNCOMMANDPARAMETERS_DESCRIPTOR)
        field(SAGEMAKERPIPELINEPARAMETERS_DESCRIPTOR)
        field(SQSPARAMETERS_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        field(ID_DESCRIPTOR, input.id)
        field(ARN_DESCRIPTOR, input.arn)
        input.roleArn?.let { field(ROLEARN_DESCRIPTOR, it) }
        input.input?.let { field(INPUT_DESCRIPTOR, it) }
        input.inputPath?.let { field(INPUTPATH_DESCRIPTOR, it) }
        input.inputTransformer?.let { field(INPUTTRANSFORMER_DESCRIPTOR, it, ::serializeInputTransformerDocument) }
        input.kinesisParameters?.let { field(KINESISPARAMETERS_DESCRIPTOR, it, ::serializeKinesisParametersDocument) }
        input.runCommandParameters?.let { field(RUNCOMMANDPARAMETERS_DESCRIPTOR, it, ::serializeRunCommandParametersDocument) }
        input.ecsParameters?.let { field(ECSPARAMETERS_DESCRIPTOR, it, ::serializeEcsParametersDocument) }
        input.batchParameters?.let { field(BATCHPARAMETERS_DESCRIPTOR, it, ::serializeBatchParametersDocument) }
        input.sqsParameters?.let { field(SQSPARAMETERS_DESCRIPTOR, it, ::serializeSqsParametersDocument) }
        input.httpParameters?.let { field(HTTPPARAMETERS_DESCRIPTOR, it, ::serializeHttpParametersDocument) }
        input.redshiftDataParameters?.let { field(REDSHIFTDATAPARAMETERS_DESCRIPTOR, it, ::serializeRedshiftDataParametersDocument) }
        input.sageMakerPipelineParameters?.let { field(SAGEMAKERPIPELINEPARAMETERS_DESCRIPTOR, it, ::serializeSageMakerPipelineParametersDocument) }
        input.deadLetterConfig?.let { field(DEADLETTERCONFIG_DESCRIPTOR, it, ::serializeDeadLetterConfigDocument) }
        input.retryPolicy?.let { field(RETRYPOLICY_DESCRIPTOR, it, ::serializeRetryPolicyDocument) }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy