commonMain.aws.sdk.kotlin.services.cloudwatchlogs.serde.ExportTaskDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudwatchlogs-jvm Show documentation
Show all versions of cloudwatchlogs-jvm Show documentation
The AWS SDK for Kotlin client for CloudWatch Logs
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudwatchlogs.serde
import aws.sdk.kotlin.services.cloudwatchlogs.model.ExportTask
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 deserializeExportTaskDocument(deserializer: Deserializer): ExportTask {
val builder = ExportTask.Builder()
val DESTINATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("destination"))
val DESTINATIONPREFIX_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("destinationPrefix"))
val EXECUTIONINFO_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("executionInfo"))
val FROM_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("from"))
val LOGGROUPNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("logGroupName"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("status"))
val TASKID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("taskId"))
val TASKNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("taskName"))
val TO_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("to"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(DESTINATION_DESCRIPTOR)
field(DESTINATIONPREFIX_DESCRIPTOR)
field(EXECUTIONINFO_DESCRIPTOR)
field(FROM_DESCRIPTOR)
field(LOGGROUPNAME_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(TASKID_DESCRIPTOR)
field(TASKNAME_DESCRIPTOR)
field(TO_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
DESTINATION_DESCRIPTOR.index -> builder.destination = deserializeString()
DESTINATIONPREFIX_DESCRIPTOR.index -> builder.destinationPrefix = deserializeString()
EXECUTIONINFO_DESCRIPTOR.index -> builder.executionInfo = deserializeExportTaskExecutionInfoDocument(deserializer)
FROM_DESCRIPTOR.index -> builder.from = deserializeLong()
LOGGROUPNAME_DESCRIPTOR.index -> builder.logGroupName = deserializeString()
STATUS_DESCRIPTOR.index -> builder.status = deserializeExportTaskStatusDocument(deserializer)
TASKID_DESCRIPTOR.index -> builder.taskId = deserializeString()
TASKNAME_DESCRIPTOR.index -> builder.taskName = deserializeString()
TO_DESCRIPTOR.index -> builder.to = deserializeLong()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}