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

commonMain.aws.sdk.kotlin.services.datasync.serde.MaxP95PerformanceDocumentDeserializer.kt Maven / Gradle / Ivy

There is a newer version: 1.4.1
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.datasync.serde

import aws.sdk.kotlin.services.datasync.model.MaxP95Performance
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

internal fun deserializeMaxP95PerformanceDocument(deserializer: Deserializer): MaxP95Performance {
    val builder = MaxP95Performance.Builder()
    val IOPSOTHER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Double, JsonSerialName("IopsOther"))
    val IOPSREAD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Double, JsonSerialName("IopsRead"))
    val IOPSTOTAL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Double, JsonSerialName("IopsTotal"))
    val IOPSWRITE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Double, JsonSerialName("IopsWrite"))
    val LATENCYOTHER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Double, JsonSerialName("LatencyOther"))
    val LATENCYREAD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Double, JsonSerialName("LatencyRead"))
    val LATENCYWRITE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Double, JsonSerialName("LatencyWrite"))
    val THROUGHPUTOTHER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Double, JsonSerialName("ThroughputOther"))
    val THROUGHPUTREAD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Double, JsonSerialName("ThroughputRead"))
    val THROUGHPUTTOTAL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Double, JsonSerialName("ThroughputTotal"))
    val THROUGHPUTWRITE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Double, JsonSerialName("ThroughputWrite"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(IOPSOTHER_DESCRIPTOR)
        field(IOPSREAD_DESCRIPTOR)
        field(IOPSTOTAL_DESCRIPTOR)
        field(IOPSWRITE_DESCRIPTOR)
        field(LATENCYOTHER_DESCRIPTOR)
        field(LATENCYREAD_DESCRIPTOR)
        field(LATENCYWRITE_DESCRIPTOR)
        field(THROUGHPUTOTHER_DESCRIPTOR)
        field(THROUGHPUTREAD_DESCRIPTOR)
        field(THROUGHPUTTOTAL_DESCRIPTOR)
        field(THROUGHPUTWRITE_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                IOPSOTHER_DESCRIPTOR.index -> builder.iopsOther = deserializeDouble()
                IOPSREAD_DESCRIPTOR.index -> builder.iopsRead = deserializeDouble()
                IOPSTOTAL_DESCRIPTOR.index -> builder.iopsTotal = deserializeDouble()
                IOPSWRITE_DESCRIPTOR.index -> builder.iopsWrite = deserializeDouble()
                LATENCYOTHER_DESCRIPTOR.index -> builder.latencyOther = deserializeDouble()
                LATENCYREAD_DESCRIPTOR.index -> builder.latencyRead = deserializeDouble()
                LATENCYWRITE_DESCRIPTOR.index -> builder.latencyWrite = deserializeDouble()
                THROUGHPUTOTHER_DESCRIPTOR.index -> builder.throughputOther = deserializeDouble()
                THROUGHPUTREAD_DESCRIPTOR.index -> builder.throughputRead = deserializeDouble()
                THROUGHPUTTOTAL_DESCRIPTOR.index -> builder.throughputTotal = deserializeDouble()
                THROUGHPUTWRITE_DESCRIPTOR.index -> builder.throughputWrite = deserializeDouble()
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy