All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.transcribestreaming.transform.CallAnalyticsEntityDocumentDeserializer.kt Maven / Gradle / Ivy

There is a newer version: 1.3.100
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.transcribestreaming.transform

import aws.sdk.kotlin.services.transcribestreaming.model.CallAnalyticsEntity
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 deserializeCallAnalyticsEntityDocument(deserializer: Deserializer): CallAnalyticsEntity {
    val builder = CallAnalyticsEntity.Builder()
    val BEGINOFFSETMILLIS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("BeginOffsetMillis"))
    val CATEGORY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Category"))
    val CONFIDENCE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Double, JsonSerialName("Confidence"))
    val CONTENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Content"))
    val ENDOFFSETMILLIS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("EndOffsetMillis"))
    val TYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Type"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(BEGINOFFSETMILLIS_DESCRIPTOR)
        field(CATEGORY_DESCRIPTOR)
        field(CONFIDENCE_DESCRIPTOR)
        field(CONTENT_DESCRIPTOR)
        field(ENDOFFSETMILLIS_DESCRIPTOR)
        field(TYPE_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                BEGINOFFSETMILLIS_DESCRIPTOR.index -> builder.beginOffsetMillis = deserializeLong()
                CATEGORY_DESCRIPTOR.index -> builder.category = deserializeString()
                CONFIDENCE_DESCRIPTOR.index -> builder.confidence = deserializeDouble()
                CONTENT_DESCRIPTOR.index -> builder.content = deserializeString()
                ENDOFFSETMILLIS_DESCRIPTOR.index -> builder.endOffsetMillis = deserializeLong()
                TYPE_DESCRIPTOR.index -> builder.type = deserializeString()
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy