commonMain.aws.sdk.kotlin.services.appstream.serde.StackDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of appstream-jvm Show documentation
Show all versions of appstream-jvm Show documentation
The AWS SDK for Kotlin client for AppStream
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.appstream.serde
import aws.sdk.kotlin.services.appstream.model.AccessEndpoint
import aws.sdk.kotlin.services.appstream.model.Stack
import aws.sdk.kotlin.services.appstream.model.StackError
import aws.sdk.kotlin.services.appstream.model.StorageConnector
import aws.sdk.kotlin.services.appstream.model.UserSetting
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
import kotlin.collections.mutableListOf
internal fun deserializeStackDocument(deserializer: Deserializer): Stack {
val builder = Stack.Builder()
val ACCESSENDPOINTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("AccessEndpoints"))
val APPLICATIONSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ApplicationSettings"))
val ARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Arn"))
val CREATEDTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("CreatedTime"))
val DESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Description"))
val DISPLAYNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DisplayName"))
val EMBEDHOSTDOMAINS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("EmbedHostDomains"))
val FEEDBACKURL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("FeedbackURL"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Name"))
val REDIRECTURL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("RedirectURL"))
val STACKERRORS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("StackErrors"))
val STORAGECONNECTORS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("StorageConnectors"))
val STREAMINGEXPERIENCESETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("StreamingExperienceSettings"))
val USERSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("UserSettings"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ACCESSENDPOINTS_DESCRIPTOR)
field(APPLICATIONSETTINGS_DESCRIPTOR)
field(ARN_DESCRIPTOR)
field(CREATEDTIME_DESCRIPTOR)
field(DESCRIPTION_DESCRIPTOR)
field(DISPLAYNAME_DESCRIPTOR)
field(EMBEDHOSTDOMAINS_DESCRIPTOR)
field(FEEDBACKURL_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(REDIRECTURL_DESCRIPTOR)
field(STACKERRORS_DESCRIPTOR)
field(STORAGECONNECTORS_DESCRIPTOR)
field(STREAMINGEXPERIENCESETTINGS_DESCRIPTOR)
field(USERSETTINGS_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ACCESSENDPOINTS_DESCRIPTOR.index -> builder.accessEndpoints =
deserializer.deserializeList(ACCESSENDPOINTS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeAccessEndpointDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
APPLICATIONSETTINGS_DESCRIPTOR.index -> builder.applicationSettings = deserializeApplicationSettingsResponseDocument(deserializer)
ARN_DESCRIPTOR.index -> builder.arn = deserializeString()
CREATEDTIME_DESCRIPTOR.index -> builder.createdTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
DESCRIPTION_DESCRIPTOR.index -> builder.description = deserializeString()
DISPLAYNAME_DESCRIPTOR.index -> builder.displayName = deserializeString()
EMBEDHOSTDOMAINS_DESCRIPTOR.index -> builder.embedHostDomains =
deserializer.deserializeList(EMBEDHOSTDOMAINS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
FEEDBACKURL_DESCRIPTOR.index -> builder.feedbackUrl = deserializeString()
NAME_DESCRIPTOR.index -> builder.name = deserializeString()
REDIRECTURL_DESCRIPTOR.index -> builder.redirectUrl = deserializeString()
STACKERRORS_DESCRIPTOR.index -> builder.stackErrors =
deserializer.deserializeList(STACKERRORS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeStackErrorDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
STORAGECONNECTORS_DESCRIPTOR.index -> builder.storageConnectors =
deserializer.deserializeList(STORAGECONNECTORS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeStorageConnectorDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
STREAMINGEXPERIENCESETTINGS_DESCRIPTOR.index -> builder.streamingExperienceSettings = deserializeStreamingExperienceSettingsDocument(deserializer)
USERSETTINGS_DESCRIPTOR.index -> builder.userSettings =
deserializer.deserializeList(USERSETTINGS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeUserSettingDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy