commonMain.aws.sdk.kotlin.services.elastictranscoder.serde.PipelineDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of elastictranscoder-jvm Show documentation
Show all versions of elastictranscoder-jvm Show documentation
The AWS SDK for Kotlin client for Elastic Transcoder
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.elastictranscoder.serde
import aws.sdk.kotlin.services.elastictranscoder.model.Pipeline
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 deserializePipelineDocument(deserializer: Deserializer): Pipeline {
val builder = Pipeline.Builder()
val ARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Arn"))
val AWSKMSKEYARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("AwsKmsKeyArn"))
val CONTENTCONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ContentConfig"))
val ID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Id"))
val INPUTBUCKET_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("InputBucket"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Name"))
val NOTIFICATIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Notifications"))
val OUTPUTBUCKET_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("OutputBucket"))
val ROLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Role"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Status"))
val THUMBNAILCONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ThumbnailConfig"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ARN_DESCRIPTOR)
field(AWSKMSKEYARN_DESCRIPTOR)
field(CONTENTCONFIG_DESCRIPTOR)
field(ID_DESCRIPTOR)
field(INPUTBUCKET_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(NOTIFICATIONS_DESCRIPTOR)
field(OUTPUTBUCKET_DESCRIPTOR)
field(ROLE_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(THUMBNAILCONFIG_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ARN_DESCRIPTOR.index -> builder.arn = deserializeString()
AWSKMSKEYARN_DESCRIPTOR.index -> builder.awsKmsKeyArn = deserializeString()
CONTENTCONFIG_DESCRIPTOR.index -> builder.contentConfig = deserializePipelineOutputConfigDocument(deserializer)
ID_DESCRIPTOR.index -> builder.id = deserializeString()
INPUTBUCKET_DESCRIPTOR.index -> builder.inputBucket = deserializeString()
NAME_DESCRIPTOR.index -> builder.name = deserializeString()
NOTIFICATIONS_DESCRIPTOR.index -> builder.notifications = deserializeNotificationsDocument(deserializer)
OUTPUTBUCKET_DESCRIPTOR.index -> builder.outputBucket = deserializeString()
ROLE_DESCRIPTOR.index -> builder.role = deserializeString()
STATUS_DESCRIPTOR.index -> builder.status = deserializeString()
THUMBNAILCONFIG_DESCRIPTOR.index -> builder.thumbnailConfig = deserializePipelineOutputConfigDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy