commonMain.aws.sdk.kotlin.services.eventbridge.serde.TargetDocumentDeserializer.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.Target
import aws.smithy.kotlin.runtime.serde.Deserializer
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.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 deserializeTargetDocument(deserializer: Deserializer): Target {
val builder = Target.Builder()
val APPSYNCPARAMETERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("AppSyncParameters"))
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(APPSYNCPARAMETERS_DESCRIPTOR)
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)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
APPSYNCPARAMETERS_DESCRIPTOR.index -> builder.appSyncParameters = deserializeAppSyncParametersDocument(deserializer)
ARN_DESCRIPTOR.index -> builder.arn = deserializeString()
BATCHPARAMETERS_DESCRIPTOR.index -> builder.batchParameters = deserializeBatchParametersDocument(deserializer)
DEADLETTERCONFIG_DESCRIPTOR.index -> builder.deadLetterConfig = deserializeDeadLetterConfigDocument(deserializer)
ECSPARAMETERS_DESCRIPTOR.index -> builder.ecsParameters = deserializeEcsParametersDocument(deserializer)
HTTPPARAMETERS_DESCRIPTOR.index -> builder.httpParameters = deserializeHttpParametersDocument(deserializer)
ID_DESCRIPTOR.index -> builder.id = deserializeString()
INPUT_DESCRIPTOR.index -> builder.input = deserializeString()
INPUTPATH_DESCRIPTOR.index -> builder.inputPath = deserializeString()
INPUTTRANSFORMER_DESCRIPTOR.index -> builder.inputTransformer = deserializeInputTransformerDocument(deserializer)
KINESISPARAMETERS_DESCRIPTOR.index -> builder.kinesisParameters = deserializeKinesisParametersDocument(deserializer)
REDSHIFTDATAPARAMETERS_DESCRIPTOR.index -> builder.redshiftDataParameters = deserializeRedshiftDataParametersDocument(deserializer)
RETRYPOLICY_DESCRIPTOR.index -> builder.retryPolicy = deserializeRetryPolicyDocument(deserializer)
ROLEARN_DESCRIPTOR.index -> builder.roleArn = deserializeString()
RUNCOMMANDPARAMETERS_DESCRIPTOR.index -> builder.runCommandParameters = deserializeRunCommandParametersDocument(deserializer)
SAGEMAKERPIPELINEPARAMETERS_DESCRIPTOR.index -> builder.sageMakerPipelineParameters = deserializeSageMakerPipelineParametersDocument(deserializer)
SQSPARAMETERS_DESCRIPTOR.index -> builder.sqsParameters = deserializeSqsParametersDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}