commonMain.aws.sdk.kotlin.services.transcribe.transform.TranscriptionJobSummaryDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of transcribe Show documentation
Show all versions of transcribe Show documentation
Amazon Transcribe Service
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.transcribe.transform
import aws.sdk.kotlin.services.transcribe.model.LanguageCode
import aws.sdk.kotlin.services.transcribe.model.LanguageCodeItem
import aws.sdk.kotlin.services.transcribe.model.OutputLocationType
import aws.sdk.kotlin.services.transcribe.model.TranscriptionJobStatus
import aws.sdk.kotlin.services.transcribe.model.TranscriptionJobSummary
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 aws.smithy.kotlin.runtime.time.Instant
internal fun deserializeTranscriptionJobSummaryDocument(deserializer: Deserializer): TranscriptionJobSummary {
val builder = TranscriptionJobSummary.Builder()
val COMPLETIONTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("CompletionTime"))
val CONTENTREDACTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ContentRedaction"))
val CREATIONTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("CreationTime"))
val FAILUREREASON_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("FailureReason"))
val IDENTIFIEDLANGUAGESCORE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Float, JsonSerialName("IdentifiedLanguageScore"))
val IDENTIFYLANGUAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("IdentifyLanguage"))
val IDENTIFYMULTIPLELANGUAGES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("IdentifyMultipleLanguages"))
val LANGUAGECODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("LanguageCode"))
val LANGUAGECODES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("LanguageCodes"))
val MODELSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ModelSettings"))
val OUTPUTLOCATIONTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("OutputLocationType"))
val STARTTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("StartTime"))
val TRANSCRIPTIONJOBNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TranscriptionJobName"))
val TRANSCRIPTIONJOBSTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TranscriptionJobStatus"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(COMPLETIONTIME_DESCRIPTOR)
field(CONTENTREDACTION_DESCRIPTOR)
field(CREATIONTIME_DESCRIPTOR)
field(FAILUREREASON_DESCRIPTOR)
field(IDENTIFIEDLANGUAGESCORE_DESCRIPTOR)
field(IDENTIFYLANGUAGE_DESCRIPTOR)
field(IDENTIFYMULTIPLELANGUAGES_DESCRIPTOR)
field(LANGUAGECODE_DESCRIPTOR)
field(LANGUAGECODES_DESCRIPTOR)
field(MODELSETTINGS_DESCRIPTOR)
field(OUTPUTLOCATIONTYPE_DESCRIPTOR)
field(STARTTIME_DESCRIPTOR)
field(TRANSCRIPTIONJOBNAME_DESCRIPTOR)
field(TRANSCRIPTIONJOBSTATUS_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
COMPLETIONTIME_DESCRIPTOR.index -> builder.completionTime = deserializeString().let { Instant.fromEpochSeconds(it) }
CONTENTREDACTION_DESCRIPTOR.index -> builder.contentRedaction = deserializeContentRedactionDocument(deserializer)
CREATIONTIME_DESCRIPTOR.index -> builder.creationTime = deserializeString().let { Instant.fromEpochSeconds(it) }
FAILUREREASON_DESCRIPTOR.index -> builder.failureReason = deserializeString()
IDENTIFIEDLANGUAGESCORE_DESCRIPTOR.index -> builder.identifiedLanguageScore = deserializeFloat()
IDENTIFYLANGUAGE_DESCRIPTOR.index -> builder.identifyLanguage = deserializeBoolean()
IDENTIFYMULTIPLELANGUAGES_DESCRIPTOR.index -> builder.identifyMultipleLanguages = deserializeBoolean()
LANGUAGECODE_DESCRIPTOR.index -> builder.languageCode = deserializeString().let { LanguageCode.fromValue(it) }
LANGUAGECODES_DESCRIPTOR.index -> builder.languageCodes =
deserializer.deserializeList(LANGUAGECODES_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeLanguageCodeItemDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
MODELSETTINGS_DESCRIPTOR.index -> builder.modelSettings = deserializeModelSettingsDocument(deserializer)
OUTPUTLOCATIONTYPE_DESCRIPTOR.index -> builder.outputLocationType = deserializeString().let { OutputLocationType.fromValue(it) }
STARTTIME_DESCRIPTOR.index -> builder.startTime = deserializeString().let { Instant.fromEpochSeconds(it) }
TRANSCRIPTIONJOBNAME_DESCRIPTOR.index -> builder.transcriptionJobName = deserializeString()
TRANSCRIPTIONJOBSTATUS_DESCRIPTOR.index -> builder.transcriptionJobStatus = deserializeString().let { TranscriptionJobStatus.fromValue(it) }
null -> break@loop
else -> skipValue()
}
}
}
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy