
commonMain.aws.sdk.kotlin.services.ivs.serde.AudioConfigurationDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ivs.serde
import aws.sdk.kotlin.services.ivs.model.AudioConfiguration
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 deserializeAudioConfigurationDocument(deserializer: Deserializer): AudioConfiguration {
val builder = AudioConfiguration.Builder()
val CHANNELS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("channels"))
val CODEC_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("codec"))
val SAMPLERATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("sampleRate"))
val TARGETBITRATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("targetBitrate"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CHANNELS_DESCRIPTOR)
field(CODEC_DESCRIPTOR)
field(SAMPLERATE_DESCRIPTOR)
field(TARGETBITRATE_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CHANNELS_DESCRIPTOR.index -> builder.channels = deserializeLong()
CODEC_DESCRIPTOR.index -> builder.codec = deserializeString()
SAMPLERATE_DESCRIPTOR.index -> builder.sampleRate = deserializeLong()
TARGETBITRATE_DESCRIPTOR.index -> builder.targetBitrate = deserializeLong()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy