commonMain.aws.sdk.kotlin.services.chimesdkmediapipelines.serde.MediaCapturePipelineDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chimesdkmediapipelines-jvm Show documentation
Show all versions of chimesdkmediapipelines-jvm Show documentation
The AWS SDK for Kotlin client for Chime SDK Media Pipelines
The 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 SINKIAMROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SinkIamRoleArn"))
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 SSEAWSKEYMANAGEMENTPARAMS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("SseAwsKeyManagementParams"))
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(SINKIAMROLEARN_DESCRIPTOR)
field(SINKTYPE_DESCRIPTOR)
field(SOURCEARN_DESCRIPTOR)
field(SOURCETYPE_DESCRIPTOR)
field(SSEAWSKEYMANAGEMENTPARAMS_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()
SINKIAMROLEARN_DESCRIPTOR.index -> builder.sinkIamRoleArn = 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) }
SSEAWSKEYMANAGEMENTPARAMS_DESCRIPTOR.index -> builder.sseAwsKeyManagementParams = deserializeSseAwsKeyManagementParamsDocument(deserializer)
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()
}