commonMain.aws.sdk.kotlin.services.devicefarm.serde.RemoteAccessSessionDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of devicefarm-jvm Show documentation
Show all versions of devicefarm-jvm Show documentation
The AWS SDK for Kotlin client for Device Farm
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.devicefarm.serde
import aws.sdk.kotlin.services.devicefarm.model.BillingMethod
import aws.sdk.kotlin.services.devicefarm.model.ExecutionResult
import aws.sdk.kotlin.services.devicefarm.model.ExecutionStatus
import aws.sdk.kotlin.services.devicefarm.model.InteractionMode
import aws.sdk.kotlin.services.devicefarm.model.RemoteAccessSession
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
internal fun deserializeRemoteAccessSessionDocument(deserializer: Deserializer): RemoteAccessSession {
val builder = RemoteAccessSession.Builder()
val ARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("arn"))
val BILLINGMETHOD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("billingMethod"))
val CLIENTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("clientId"))
val CREATED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("created"))
val DEVICE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("device"))
val DEVICEMINUTES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("deviceMinutes"))
val DEVICEUDID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("deviceUdid"))
val ENDPOINT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("endpoint"))
val HOSTADDRESS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("hostAddress"))
val INSTANCEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("instanceArn"))
val INTERACTIONMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("interactionMode"))
val MESSAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("message"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("name"))
val REMOTEDEBUGENABLED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("remoteDebugEnabled"))
val REMOTERECORDAPPARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("remoteRecordAppArn"))
val REMOTERECORDENABLED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("remoteRecordEnabled"))
val RESULT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("result"))
val SKIPAPPRESIGN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("skipAppResign"))
val STARTED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("started"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("status"))
val STOPPED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("stopped"))
val VPCCONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("vpcConfig"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ARN_DESCRIPTOR)
field(BILLINGMETHOD_DESCRIPTOR)
field(CLIENTID_DESCRIPTOR)
field(CREATED_DESCRIPTOR)
field(DEVICE_DESCRIPTOR)
field(DEVICEMINUTES_DESCRIPTOR)
field(DEVICEUDID_DESCRIPTOR)
field(ENDPOINT_DESCRIPTOR)
field(HOSTADDRESS_DESCRIPTOR)
field(INSTANCEARN_DESCRIPTOR)
field(INTERACTIONMODE_DESCRIPTOR)
field(MESSAGE_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(REMOTEDEBUGENABLED_DESCRIPTOR)
field(REMOTERECORDAPPARN_DESCRIPTOR)
field(REMOTERECORDENABLED_DESCRIPTOR)
field(RESULT_DESCRIPTOR)
field(SKIPAPPRESIGN_DESCRIPTOR)
field(STARTED_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(STOPPED_DESCRIPTOR)
field(VPCCONFIG_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ARN_DESCRIPTOR.index -> builder.arn = deserializeString()
BILLINGMETHOD_DESCRIPTOR.index -> builder.billingMethod = deserializeString().let { BillingMethod.fromValue(it) }
CLIENTID_DESCRIPTOR.index -> builder.clientId = deserializeString()
CREATED_DESCRIPTOR.index -> builder.created = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
DEVICE_DESCRIPTOR.index -> builder.device = deserializeDeviceDocument(deserializer)
DEVICEMINUTES_DESCRIPTOR.index -> builder.deviceMinutes = deserializeDeviceMinutesDocument(deserializer)
DEVICEUDID_DESCRIPTOR.index -> builder.deviceUdid = deserializeString()
ENDPOINT_DESCRIPTOR.index -> builder.endpoint = deserializeString()
HOSTADDRESS_DESCRIPTOR.index -> builder.hostAddress = deserializeString()
INSTANCEARN_DESCRIPTOR.index -> builder.instanceArn = deserializeString()
INTERACTIONMODE_DESCRIPTOR.index -> builder.interactionMode = deserializeString().let { InteractionMode.fromValue(it) }
MESSAGE_DESCRIPTOR.index -> builder.message = deserializeString()
NAME_DESCRIPTOR.index -> builder.name = deserializeString()
REMOTEDEBUGENABLED_DESCRIPTOR.index -> builder.remoteDebugEnabled = deserializeBoolean()
REMOTERECORDAPPARN_DESCRIPTOR.index -> builder.remoteRecordAppArn = deserializeString()
REMOTERECORDENABLED_DESCRIPTOR.index -> builder.remoteRecordEnabled = deserializeBoolean()
RESULT_DESCRIPTOR.index -> builder.result = deserializeString().let { ExecutionResult.fromValue(it) }
SKIPAPPRESIGN_DESCRIPTOR.index -> builder.skipAppResign = deserializeBoolean()
STARTED_DESCRIPTOR.index -> builder.started = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
STATUS_DESCRIPTOR.index -> builder.status = deserializeString().let { ExecutionStatus.fromValue(it) }
STOPPED_DESCRIPTOR.index -> builder.stopped = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
VPCCONFIG_DESCRIPTOR.index -> builder.vpcConfig = deserializeVpcConfigDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}