commonMain.aws.sdk.kotlin.services.gamelift.serde.FleetAttributesDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gamelift-jvm Show documentation
Show all versions of gamelift-jvm Show documentation
The AWS SDK for Kotlin client for GameLift
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.gamelift.serde
import aws.sdk.kotlin.services.gamelift.model.ComputeType
import aws.sdk.kotlin.services.gamelift.model.Ec2InstanceType
import aws.sdk.kotlin.services.gamelift.model.FleetAction
import aws.sdk.kotlin.services.gamelift.model.FleetAttributes
import aws.sdk.kotlin.services.gamelift.model.FleetStatus
import aws.sdk.kotlin.services.gamelift.model.FleetType
import aws.sdk.kotlin.services.gamelift.model.InstanceRoleCredentialsProvider
import aws.sdk.kotlin.services.gamelift.model.OperatingSystem
import aws.sdk.kotlin.services.gamelift.model.ProtectionPolicy
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 deserializeFleetAttributesDocument(deserializer: Deserializer): FleetAttributes {
val builder = FleetAttributes.Builder()
val ANYWHERECONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("AnywhereConfiguration"))
val BUILDARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("BuildArn"))
val BUILDID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("BuildId"))
val CERTIFICATECONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("CertificateConfiguration"))
val COMPUTETYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ComputeType"))
val CREATIONTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("CreationTime"))
val DESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Description"))
val FLEETARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("FleetArn"))
val FLEETID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("FleetId"))
val FLEETTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("FleetType"))
val INSTANCEROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("InstanceRoleArn"))
val INSTANCEROLECREDENTIALSPROVIDER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("InstanceRoleCredentialsProvider"))
val INSTANCETYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("InstanceType"))
val LOGPATHS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("LogPaths"))
val METRICGROUPS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("MetricGroups"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Name"))
val NEWGAMESESSIONPROTECTIONPOLICY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("NewGameSessionProtectionPolicy"))
val OPERATINGSYSTEM_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("OperatingSystem"))
val RESOURCECREATIONLIMITPOLICY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ResourceCreationLimitPolicy"))
val SCRIPTARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ScriptArn"))
val SCRIPTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ScriptId"))
val SERVERLAUNCHPARAMETERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ServerLaunchParameters"))
val SERVERLAUNCHPATH_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ServerLaunchPath"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Status"))
val STOPPEDACTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("StoppedActions"))
val TERMINATIONTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("TerminationTime"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ANYWHERECONFIGURATION_DESCRIPTOR)
field(BUILDARN_DESCRIPTOR)
field(BUILDID_DESCRIPTOR)
field(CERTIFICATECONFIGURATION_DESCRIPTOR)
field(COMPUTETYPE_DESCRIPTOR)
field(CREATIONTIME_DESCRIPTOR)
field(DESCRIPTION_DESCRIPTOR)
field(FLEETARN_DESCRIPTOR)
field(FLEETID_DESCRIPTOR)
field(FLEETTYPE_DESCRIPTOR)
field(INSTANCEROLEARN_DESCRIPTOR)
field(INSTANCEROLECREDENTIALSPROVIDER_DESCRIPTOR)
field(INSTANCETYPE_DESCRIPTOR)
field(LOGPATHS_DESCRIPTOR)
field(METRICGROUPS_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(NEWGAMESESSIONPROTECTIONPOLICY_DESCRIPTOR)
field(OPERATINGSYSTEM_DESCRIPTOR)
field(RESOURCECREATIONLIMITPOLICY_DESCRIPTOR)
field(SCRIPTARN_DESCRIPTOR)
field(SCRIPTID_DESCRIPTOR)
field(SERVERLAUNCHPARAMETERS_DESCRIPTOR)
field(SERVERLAUNCHPATH_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(STOPPEDACTIONS_DESCRIPTOR)
field(TERMINATIONTIME_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ANYWHERECONFIGURATION_DESCRIPTOR.index -> builder.anywhereConfiguration = deserializeAnywhereConfigurationDocument(deserializer)
BUILDARN_DESCRIPTOR.index -> builder.buildArn = deserializeString()
BUILDID_DESCRIPTOR.index -> builder.buildId = deserializeString()
CERTIFICATECONFIGURATION_DESCRIPTOR.index -> builder.certificateConfiguration = deserializeCertificateConfigurationDocument(deserializer)
COMPUTETYPE_DESCRIPTOR.index -> builder.computeType = deserializeString().let { ComputeType.fromValue(it) }
CREATIONTIME_DESCRIPTOR.index -> builder.creationTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
DESCRIPTION_DESCRIPTOR.index -> builder.description = deserializeString()
FLEETARN_DESCRIPTOR.index -> builder.fleetArn = deserializeString()
FLEETID_DESCRIPTOR.index -> builder.fleetId = deserializeString()
FLEETTYPE_DESCRIPTOR.index -> builder.fleetType = deserializeString().let { FleetType.fromValue(it) }
INSTANCEROLEARN_DESCRIPTOR.index -> builder.instanceRoleArn = deserializeString()
INSTANCEROLECREDENTIALSPROVIDER_DESCRIPTOR.index -> builder.instanceRoleCredentialsProvider = deserializeString().let { InstanceRoleCredentialsProvider.fromValue(it) }
INSTANCETYPE_DESCRIPTOR.index -> builder.instanceType = deserializeString().let { Ec2InstanceType.fromValue(it) }
LOGPATHS_DESCRIPTOR.index -> builder.logPaths =
deserializer.deserializeList(LOGPATHS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
METRICGROUPS_DESCRIPTOR.index -> builder.metricGroups =
deserializer.deserializeList(METRICGROUPS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
NAME_DESCRIPTOR.index -> builder.name = deserializeString()
NEWGAMESESSIONPROTECTIONPOLICY_DESCRIPTOR.index -> builder.newGameSessionProtectionPolicy = deserializeString().let { ProtectionPolicy.fromValue(it) }
OPERATINGSYSTEM_DESCRIPTOR.index -> builder.operatingSystem = deserializeString().let { OperatingSystem.fromValue(it) }
RESOURCECREATIONLIMITPOLICY_DESCRIPTOR.index -> builder.resourceCreationLimitPolicy = deserializeResourceCreationLimitPolicyDocument(deserializer)
SCRIPTARN_DESCRIPTOR.index -> builder.scriptArn = deserializeString()
SCRIPTID_DESCRIPTOR.index -> builder.scriptId = deserializeString()
SERVERLAUNCHPARAMETERS_DESCRIPTOR.index -> builder.serverLaunchParameters = deserializeString()
SERVERLAUNCHPATH_DESCRIPTOR.index -> builder.serverLaunchPath = deserializeString()
STATUS_DESCRIPTOR.index -> builder.status = deserializeString().let { FleetStatus.fromValue(it) }
STOPPEDACTIONS_DESCRIPTOR.index -> builder.stoppedActions =
deserializer.deserializeList(STOPPEDACTIONS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString().let { FleetAction.fromValue(it) } } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
TERMINATIONTIME_DESCRIPTOR.index -> builder.terminationTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy