commonMain.aws.sdk.kotlin.services.lookoutmetrics.serde.MetricSourceDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lookoutmetrics-jvm Show documentation
Show all versions of lookoutmetrics-jvm Show documentation
The AWS SDK for Kotlin client for LookoutMetrics
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lookoutmetrics.serde
import aws.sdk.kotlin.services.lookoutmetrics.model.MetricSource
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 deserializeMetricSourceDocument(deserializer: Deserializer): MetricSource {
val builder = MetricSource.Builder()
val APPFLOWCONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("AppFlowConfig"))
val ATHENASOURCECONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("AthenaSourceConfig"))
val CLOUDWATCHCONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("CloudWatchConfig"))
val RDSSOURCECONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("RDSSourceConfig"))
val REDSHIFTSOURCECONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("RedshiftSourceConfig"))
val S3SOURCECONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("S3SourceConfig"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(APPFLOWCONFIG_DESCRIPTOR)
field(ATHENASOURCECONFIG_DESCRIPTOR)
field(CLOUDWATCHCONFIG_DESCRIPTOR)
field(RDSSOURCECONFIG_DESCRIPTOR)
field(REDSHIFTSOURCECONFIG_DESCRIPTOR)
field(S3SOURCECONFIG_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
APPFLOWCONFIG_DESCRIPTOR.index -> builder.appFlowConfig = deserializeAppFlowConfigDocument(deserializer)
ATHENASOURCECONFIG_DESCRIPTOR.index -> builder.athenaSourceConfig = deserializeAthenaSourceConfigDocument(deserializer)
CLOUDWATCHCONFIG_DESCRIPTOR.index -> builder.cloudWatchConfig = deserializeCloudWatchConfigDocument(deserializer)
RDSSOURCECONFIG_DESCRIPTOR.index -> builder.rdsSourceConfig = deserializeRdsSourceConfigDocument(deserializer)
REDSHIFTSOURCECONFIG_DESCRIPTOR.index -> builder.redshiftSourceConfig = deserializeRedshiftSourceConfigDocument(deserializer)
S3SOURCECONFIG_DESCRIPTOR.index -> builder.s3SourceConfig = deserializeS3SourceConfigDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy