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

commonMain.aws.sdk.kotlin.services.chimesdkmediapipelines.serde.MediaCapturePipelineDocumentDeserializer.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.chimesdkmediapipelines.serde

import aws.sdk.kotlin.services.chimesdkmediapipelines.model.MediaCapturePipeline
import aws.sdk.kotlin.services.chimesdkmediapipelines.model.MediaPipelineSinkType
import aws.sdk.kotlin.services.chimesdkmediapipelines.model.MediaPipelineSourceType
import aws.sdk.kotlin.services.chimesdkmediapipelines.model.MediaPipelineStatus
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
import aws.smithy.kotlin.runtime.time.TimestampFormat

internal fun deserializeMediaCapturePipelineDocument(deserializer: Deserializer): MediaCapturePipeline {
    val builder = MediaCapturePipeline.Builder()
    val CHIMESDKMEETINGCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ChimeSdkMeetingConfiguration"))
    val CREATEDTIMESTAMP_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("CreatedTimestamp"))
    val MEDIAPIPELINEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("MediaPipelineArn"))
    val MEDIAPIPELINEID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("MediaPipelineId"))
    val SINKARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SinkArn"))
    val SINKTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("SinkType"))
    val SOURCEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SourceArn"))
    val SOURCETYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("SourceType"))
    val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Status"))
    val UPDATEDTIMESTAMP_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("UpdatedTimestamp"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(CHIMESDKMEETINGCONFIGURATION_DESCRIPTOR)
        field(CREATEDTIMESTAMP_DESCRIPTOR)
        field(MEDIAPIPELINEARN_DESCRIPTOR)
        field(MEDIAPIPELINEID_DESCRIPTOR)
        field(SINKARN_DESCRIPTOR)
        field(SINKTYPE_DESCRIPTOR)
        field(SOURCEARN_DESCRIPTOR)
        field(SOURCETYPE_DESCRIPTOR)
        field(STATUS_DESCRIPTOR)
        field(UPDATEDTIMESTAMP_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                CHIMESDKMEETINGCONFIGURATION_DESCRIPTOR.index -> builder.chimeSdkMeetingConfiguration = deserializeChimeSdkMeetingConfigurationDocument(deserializer)
                CREATEDTIMESTAMP_DESCRIPTOR.index -> builder.createdTimestamp = deserializeInstant(TimestampFormat.ISO_8601)
                MEDIAPIPELINEARN_DESCRIPTOR.index -> builder.mediaPipelineArn = deserializeString()
                MEDIAPIPELINEID_DESCRIPTOR.index -> builder.mediaPipelineId = deserializeString()
                SINKARN_DESCRIPTOR.index -> builder.sinkArn = deserializeString()
                SINKTYPE_DESCRIPTOR.index -> builder.sinkType = deserializeString().let { MediaPipelineSinkType.fromValue(it) }
                SOURCEARN_DESCRIPTOR.index -> builder.sourceArn = deserializeString()
                SOURCETYPE_DESCRIPTOR.index -> builder.sourceType = deserializeString().let { MediaPipelineSourceType.fromValue(it) }
                STATUS_DESCRIPTOR.index -> builder.status = deserializeString().let { MediaPipelineStatus.fromValue(it) }
                UPDATEDTIMESTAMP_DESCRIPTOR.index -> builder.updatedTimestamp = deserializeInstant(TimestampFormat.ISO_8601)
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy