
commonMain.aws.sdk.kotlin.services.pipes.serde.PipeLogConfigurationDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.pipes.serde
import aws.sdk.kotlin.services.pipes.model.IncludeExecutionDataOption
import aws.sdk.kotlin.services.pipes.model.LogLevel
import aws.sdk.kotlin.services.pipes.model.PipeLogConfiguration
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
import kotlin.collections.mutableListOf
internal fun deserializePipeLogConfigurationDocument(deserializer: Deserializer): PipeLogConfiguration {
val builder = PipeLogConfiguration.Builder()
val CLOUDWATCHLOGSLOGDESTINATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("CloudwatchLogsLogDestination"))
val FIREHOSELOGDESTINATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("FirehoseLogDestination"))
val INCLUDEEXECUTIONDATA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("IncludeExecutionData"))
val LEVEL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Level"))
val S3LOGDESTINATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("S3LogDestination"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CLOUDWATCHLOGSLOGDESTINATION_DESCRIPTOR)
field(FIREHOSELOGDESTINATION_DESCRIPTOR)
field(INCLUDEEXECUTIONDATA_DESCRIPTOR)
field(LEVEL_DESCRIPTOR)
field(S3LOGDESTINATION_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CLOUDWATCHLOGSLOGDESTINATION_DESCRIPTOR.index -> builder.cloudwatchLogsLogDestination = deserializeCloudwatchLogsLogDestinationDocument(deserializer)
FIREHOSELOGDESTINATION_DESCRIPTOR.index -> builder.firehoseLogDestination = deserializeFirehoseLogDestinationDocument(deserializer)
INCLUDEEXECUTIONDATA_DESCRIPTOR.index -> builder.includeExecutionData =
deserializer.deserializeList(INCLUDEEXECUTIONDATA_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString().let { IncludeExecutionDataOption.fromValue(it) } } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
LEVEL_DESCRIPTOR.index -> builder.level = deserializeString().let { LogLevel.fromValue(it) }
S3LOGDESTINATION_DESCRIPTOR.index -> builder.s3LogDestination = deserializeS3LogDestinationDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy