commonMain.aws.sdk.kotlin.services.appstream.serde.ImageBuilderDocumentDeserializer.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.ImageBuilder
import aws.sdk.kotlin.services.appstream.model.ImageBuilderState
import aws.sdk.kotlin.services.appstream.model.PlatformType
import aws.sdk.kotlin.services.appstream.model.ResourceError
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 kotlin.collections.mutableListOf
internal fun deserializeImageBuilderDocument(deserializer: Deserializer): ImageBuilder {
val builder = ImageBuilder.Builder()
val ACCESSENDPOINTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("AccessEndpoints"))
val APPSTREAMAGENTVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("AppstreamAgentVersion"))
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 DOMAINJOININFO_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("DomainJoinInfo"))
val ENABLEDEFAULTINTERNETACCESS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("EnableDefaultInternetAccess"))
val IAMROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("IamRoleArn"))
val IMAGEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ImageArn"))
val IMAGEBUILDERERRORS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("ImageBuilderErrors"))
val INSTANCETYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("InstanceType"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Name"))
val NETWORKACCESSCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("NetworkAccessConfiguration"))
val PLATFORM_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Platform"))
val STATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("State"))
val STATECHANGEREASON_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("StateChangeReason"))
val VPCCONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("VpcConfig"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ACCESSENDPOINTS_DESCRIPTOR)
field(APPSTREAMAGENTVERSION_DESCRIPTOR)
field(ARN_DESCRIPTOR)
field(CREATEDTIME_DESCRIPTOR)
field(DESCRIPTION_DESCRIPTOR)
field(DISPLAYNAME_DESCRIPTOR)
field(DOMAINJOININFO_DESCRIPTOR)
field(ENABLEDEFAULTINTERNETACCESS_DESCRIPTOR)
field(IAMROLEARN_DESCRIPTOR)
field(IMAGEARN_DESCRIPTOR)
field(IMAGEBUILDERERRORS_DESCRIPTOR)
field(INSTANCETYPE_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(NETWORKACCESSCONFIGURATION_DESCRIPTOR)
field(PLATFORM_DESCRIPTOR)
field(STATE_DESCRIPTOR)
field(STATECHANGEREASON_DESCRIPTOR)
field(VPCCONFIG_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
}
APPSTREAMAGENTVERSION_DESCRIPTOR.index -> builder.appstreamAgentVersion = deserializeString()
ARN_DESCRIPTOR.index -> builder.arn = deserializeString()
CREATEDTIME_DESCRIPTOR.index -> builder.createdTime = deserializeString().let { Instant.fromEpochSeconds(it) }
DESCRIPTION_DESCRIPTOR.index -> builder.description = deserializeString()
DISPLAYNAME_DESCRIPTOR.index -> builder.displayName = deserializeString()
DOMAINJOININFO_DESCRIPTOR.index -> builder.domainJoinInfo = deserializeDomainJoinInfoDocument(deserializer)
ENABLEDEFAULTINTERNETACCESS_DESCRIPTOR.index -> builder.enableDefaultInternetAccess = deserializeBoolean()
IAMROLEARN_DESCRIPTOR.index -> builder.iamRoleArn = deserializeString()
IMAGEARN_DESCRIPTOR.index -> builder.imageArn = deserializeString()
IMAGEBUILDERERRORS_DESCRIPTOR.index -> builder.imageBuilderErrors =
deserializer.deserializeList(IMAGEBUILDERERRORS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeResourceErrorDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
INSTANCETYPE_DESCRIPTOR.index -> builder.instanceType = deserializeString()
NAME_DESCRIPTOR.index -> builder.name = deserializeString()
NETWORKACCESSCONFIGURATION_DESCRIPTOR.index -> builder.networkAccessConfiguration = deserializeNetworkAccessConfigurationDocument(deserializer)
PLATFORM_DESCRIPTOR.index -> builder.platform = deserializeString().let { PlatformType.fromValue(it) }
STATE_DESCRIPTOR.index -> builder.state = deserializeString().let { ImageBuilderState.fromValue(it) }
STATECHANGEREASON_DESCRIPTOR.index -> builder.stateChangeReason = deserializeImageBuilderStateChangeReasonDocument(deserializer)
VPCCONFIG_DESCRIPTOR.index -> builder.vpcConfig = deserializeVpcConfigDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy