commonMain.aws.sdk.kotlin.services.appstream.serde.FleetDocumentDeserializer.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.Fleet
import aws.sdk.kotlin.services.appstream.model.FleetError
import aws.sdk.kotlin.services.appstream.model.FleetState
import aws.sdk.kotlin.services.appstream.model.FleetType
import aws.sdk.kotlin.services.appstream.model.PlatformType
import aws.sdk.kotlin.services.appstream.model.StreamView
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 deserializeFleetDocument(deserializer: Deserializer): Fleet {
val builder = Fleet.Builder()
val ARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Arn"))
val COMPUTECAPACITYSTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ComputeCapacityStatus"))
val CREATEDTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("CreatedTime"))
val DESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Description"))
val DISCONNECTTIMEOUTINSECONDS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("DisconnectTimeoutInSeconds"))
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 FLEETERRORS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("FleetErrors"))
val FLEETTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("FleetType"))
val IAMROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("IamRoleArn"))
val IDLEDISCONNECTTIMEOUTINSECONDS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("IdleDisconnectTimeoutInSeconds"))
val IMAGEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ImageArn"))
val IMAGENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ImageName"))
val INSTANCETYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("InstanceType"))
val MAXCONCURRENTSESSIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("MaxConcurrentSessions"))
val MAXSESSIONSPERINSTANCE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("MaxSessionsPerInstance"))
val MAXUSERDURATIONINSECONDS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("MaxUserDurationInSeconds"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Name"))
val PLATFORM_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Platform"))
val SESSIONSCRIPTS3LOCATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("SessionScriptS3Location"))
val STATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("State"))
val STREAMVIEW_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("StreamView"))
val USBDEVICEFILTERSTRINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("UsbDeviceFilterStrings"))
val VPCCONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("VpcConfig"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ARN_DESCRIPTOR)
field(COMPUTECAPACITYSTATUS_DESCRIPTOR)
field(CREATEDTIME_DESCRIPTOR)
field(DESCRIPTION_DESCRIPTOR)
field(DISCONNECTTIMEOUTINSECONDS_DESCRIPTOR)
field(DISPLAYNAME_DESCRIPTOR)
field(DOMAINJOININFO_DESCRIPTOR)
field(ENABLEDEFAULTINTERNETACCESS_DESCRIPTOR)
field(FLEETERRORS_DESCRIPTOR)
field(FLEETTYPE_DESCRIPTOR)
field(IAMROLEARN_DESCRIPTOR)
field(IDLEDISCONNECTTIMEOUTINSECONDS_DESCRIPTOR)
field(IMAGEARN_DESCRIPTOR)
field(IMAGENAME_DESCRIPTOR)
field(INSTANCETYPE_DESCRIPTOR)
field(MAXCONCURRENTSESSIONS_DESCRIPTOR)
field(MAXSESSIONSPERINSTANCE_DESCRIPTOR)
field(MAXUSERDURATIONINSECONDS_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(PLATFORM_DESCRIPTOR)
field(SESSIONSCRIPTS3LOCATION_DESCRIPTOR)
field(STATE_DESCRIPTOR)
field(STREAMVIEW_DESCRIPTOR)
field(USBDEVICEFILTERSTRINGS_DESCRIPTOR)
field(VPCCONFIG_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ARN_DESCRIPTOR.index -> builder.arn = deserializeString()
COMPUTECAPACITYSTATUS_DESCRIPTOR.index -> builder.computeCapacityStatus = deserializeComputeCapacityStatusDocument(deserializer)
CREATEDTIME_DESCRIPTOR.index -> builder.createdTime = deserializeString().let { Instant.fromEpochSeconds(it) }
DESCRIPTION_DESCRIPTOR.index -> builder.description = deserializeString()
DISCONNECTTIMEOUTINSECONDS_DESCRIPTOR.index -> builder.disconnectTimeoutInSeconds = deserializeInt()
DISPLAYNAME_DESCRIPTOR.index -> builder.displayName = deserializeString()
DOMAINJOININFO_DESCRIPTOR.index -> builder.domainJoinInfo = deserializeDomainJoinInfoDocument(deserializer)
ENABLEDEFAULTINTERNETACCESS_DESCRIPTOR.index -> builder.enableDefaultInternetAccess = deserializeBoolean()
FLEETERRORS_DESCRIPTOR.index -> builder.fleetErrors =
deserializer.deserializeList(FLEETERRORS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeFleetErrorDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
FLEETTYPE_DESCRIPTOR.index -> builder.fleetType = deserializeString().let { FleetType.fromValue(it) }
IAMROLEARN_DESCRIPTOR.index -> builder.iamRoleArn = deserializeString()
IDLEDISCONNECTTIMEOUTINSECONDS_DESCRIPTOR.index -> builder.idleDisconnectTimeoutInSeconds = deserializeInt()
IMAGEARN_DESCRIPTOR.index -> builder.imageArn = deserializeString()
IMAGENAME_DESCRIPTOR.index -> builder.imageName = deserializeString()
INSTANCETYPE_DESCRIPTOR.index -> builder.instanceType = deserializeString()
MAXCONCURRENTSESSIONS_DESCRIPTOR.index -> builder.maxConcurrentSessions = deserializeInt()
MAXSESSIONSPERINSTANCE_DESCRIPTOR.index -> builder.maxSessionsPerInstance = deserializeInt()
MAXUSERDURATIONINSECONDS_DESCRIPTOR.index -> builder.maxUserDurationInSeconds = deserializeInt()
NAME_DESCRIPTOR.index -> builder.name = deserializeString()
PLATFORM_DESCRIPTOR.index -> builder.platform = deserializeString().let { PlatformType.fromValue(it) }
SESSIONSCRIPTS3LOCATION_DESCRIPTOR.index -> builder.sessionScriptS3Location = deserializeS3LocationDocument(deserializer)
STATE_DESCRIPTOR.index -> builder.state = deserializeString().let { FleetState.fromValue(it) }
STREAMVIEW_DESCRIPTOR.index -> builder.streamView = deserializeString().let { StreamView.fromValue(it) }
USBDEVICEFILTERSTRINGS_DESCRIPTOR.index -> builder.usbDeviceFilterStrings =
deserializer.deserializeList(USBDEVICEFILTERSTRINGS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
VPCCONFIG_DESCRIPTOR.index -> builder.vpcConfig = deserializeVpcConfigDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy