All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.devicefarm.serde.RunDocumentDeserializer.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// 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.DevicePlatform
import aws.sdk.kotlin.services.devicefarm.model.ExecutionResult
import aws.sdk.kotlin.services.devicefarm.model.ExecutionResultCode
import aws.sdk.kotlin.services.devicefarm.model.ExecutionStatus
import aws.sdk.kotlin.services.devicefarm.model.Run
import aws.sdk.kotlin.services.devicefarm.model.TestType
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 deserializeRunDocument(deserializer: Deserializer): Run {
    val builder = Run.Builder()
    val APPUPLOAD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("appUpload"))
    val ARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("arn"))
    val BILLINGMETHOD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("billingMethod"))
    val COMPLETEDJOBS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("completedJobs"))
    val COUNTERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("counters"))
    val CREATED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("created"))
    val CUSTOMERARTIFACTPATHS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("customerArtifactPaths"))
    val DEVICEMINUTES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("deviceMinutes"))
    val DEVICEPOOLARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("devicePoolArn"))
    val DEVICESELECTIONRESULT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("deviceSelectionResult"))
    val EVENTCOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("eventCount"))
    val JOBTIMEOUTMINUTES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("jobTimeoutMinutes"))
    val LOCALE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("locale"))
    val LOCATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("location"))
    val MESSAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("message"))
    val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("name"))
    val NETWORKPROFILE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("networkProfile"))
    val PARSINGRESULTURL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("parsingResultUrl"))
    val PLATFORM_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("platform"))
    val RADIOS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("radios"))
    val RESULT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("result"))
    val RESULTCODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("resultCode"))
    val SEED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("seed"))
    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 TESTSPECARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("testSpecArn"))
    val TOTALJOBS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("totalJobs"))
    val TYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("type"))
    val VPCCONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("vpcConfig"))
    val WEBURL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("webUrl"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(APPUPLOAD_DESCRIPTOR)
        field(ARN_DESCRIPTOR)
        field(BILLINGMETHOD_DESCRIPTOR)
        field(COMPLETEDJOBS_DESCRIPTOR)
        field(COUNTERS_DESCRIPTOR)
        field(CREATED_DESCRIPTOR)
        field(CUSTOMERARTIFACTPATHS_DESCRIPTOR)
        field(DEVICEMINUTES_DESCRIPTOR)
        field(DEVICEPOOLARN_DESCRIPTOR)
        field(DEVICESELECTIONRESULT_DESCRIPTOR)
        field(EVENTCOUNT_DESCRIPTOR)
        field(JOBTIMEOUTMINUTES_DESCRIPTOR)
        field(LOCALE_DESCRIPTOR)
        field(LOCATION_DESCRIPTOR)
        field(MESSAGE_DESCRIPTOR)
        field(NAME_DESCRIPTOR)
        field(NETWORKPROFILE_DESCRIPTOR)
        field(PARSINGRESULTURL_DESCRIPTOR)
        field(PLATFORM_DESCRIPTOR)
        field(RADIOS_DESCRIPTOR)
        field(RESULT_DESCRIPTOR)
        field(RESULTCODE_DESCRIPTOR)
        field(SEED_DESCRIPTOR)
        field(SKIPAPPRESIGN_DESCRIPTOR)
        field(STARTED_DESCRIPTOR)
        field(STATUS_DESCRIPTOR)
        field(STOPPED_DESCRIPTOR)
        field(TESTSPECARN_DESCRIPTOR)
        field(TOTALJOBS_DESCRIPTOR)
        field(TYPE_DESCRIPTOR)
        field(VPCCONFIG_DESCRIPTOR)
        field(WEBURL_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                APPUPLOAD_DESCRIPTOR.index -> builder.appUpload = deserializeString()
                ARN_DESCRIPTOR.index -> builder.arn = deserializeString()
                BILLINGMETHOD_DESCRIPTOR.index -> builder.billingMethod = deserializeString().let { BillingMethod.fromValue(it) }
                COMPLETEDJOBS_DESCRIPTOR.index -> builder.completedJobs = deserializeInt()
                COUNTERS_DESCRIPTOR.index -> builder.counters = deserializeCountersDocument(deserializer)
                CREATED_DESCRIPTOR.index -> builder.created = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
                CUSTOMERARTIFACTPATHS_DESCRIPTOR.index -> builder.customerArtifactPaths = deserializeCustomerArtifactPathsDocument(deserializer)
                DEVICEMINUTES_DESCRIPTOR.index -> builder.deviceMinutes = deserializeDeviceMinutesDocument(deserializer)
                DEVICEPOOLARN_DESCRIPTOR.index -> builder.devicePoolArn = deserializeString()
                DEVICESELECTIONRESULT_DESCRIPTOR.index -> builder.deviceSelectionResult = deserializeDeviceSelectionResultDocument(deserializer)
                EVENTCOUNT_DESCRIPTOR.index -> builder.eventCount = deserializeInt()
                JOBTIMEOUTMINUTES_DESCRIPTOR.index -> builder.jobTimeoutMinutes = deserializeInt()
                LOCALE_DESCRIPTOR.index -> builder.locale = deserializeString()
                LOCATION_DESCRIPTOR.index -> builder.location = deserializeLocationDocument(deserializer)
                MESSAGE_DESCRIPTOR.index -> builder.message = deserializeString()
                NAME_DESCRIPTOR.index -> builder.name = deserializeString()
                NETWORKPROFILE_DESCRIPTOR.index -> builder.networkProfile = deserializeNetworkProfileDocument(deserializer)
                PARSINGRESULTURL_DESCRIPTOR.index -> builder.parsingResultUrl = deserializeString()
                PLATFORM_DESCRIPTOR.index -> builder.platform = deserializeString().let { DevicePlatform.fromValue(it) }
                RADIOS_DESCRIPTOR.index -> builder.radios = deserializeRadiosDocument(deserializer)
                RESULT_DESCRIPTOR.index -> builder.result = deserializeString().let { ExecutionResult.fromValue(it) }
                RESULTCODE_DESCRIPTOR.index -> builder.resultCode = deserializeString().let { ExecutionResultCode.fromValue(it) }
                SEED_DESCRIPTOR.index -> builder.seed = deserializeInt()
                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)
                TESTSPECARN_DESCRIPTOR.index -> builder.testSpecArn = deserializeString()
                TOTALJOBS_DESCRIPTOR.index -> builder.totalJobs = deserializeInt()
                TYPE_DESCRIPTOR.index -> builder.type = deserializeString().let { TestType.fromValue(it) }
                VPCCONFIG_DESCRIPTOR.index -> builder.vpcConfig = deserializeVpcConfigDocument(deserializer)
                WEBURL_DESCRIPTOR.index -> builder.webUrl = deserializeString()
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy