commonMain.aws.sdk.kotlin.services.datasync.serde.NetAppOntapClusterDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of datasync-jvm Show documentation
Show all versions of datasync-jvm Show documentation
The AWS SDK for Kotlin client for DataSync
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.datasync.serde
import aws.sdk.kotlin.services.datasync.model.NetAppOntapCluster
import aws.sdk.kotlin.services.datasync.model.Recommendation
import aws.sdk.kotlin.services.datasync.model.RecommendationStatus
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 kotlin.collections.mutableListOf
internal fun deserializeNetAppOntapClusterDocument(deserializer: Deserializer): NetAppOntapCluster {
val builder = NetAppOntapCluster.Builder()
val CIFSSHARECOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("CifsShareCount"))
val CLUSTERBLOCKSTORAGELOGICALUSED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("ClusterBlockStorageLogicalUsed"))
val CLUSTERBLOCKSTORAGESIZE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("ClusterBlockStorageSize"))
val CLUSTERBLOCKSTORAGEUSED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("ClusterBlockStorageUsed"))
val CLUSTERCLOUDSTORAGEUSED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("ClusterCloudStorageUsed"))
val CLUSTERNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ClusterName"))
val LUNCOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("LunCount"))
val MAXP95PERFORMANCE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("MaxP95Performance"))
val NFSEXPORTEDVOLUMES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("NfsExportedVolumes"))
val RECOMMENDATIONSTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("RecommendationStatus"))
val RECOMMENDATIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("Recommendations"))
val RESOURCEID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ResourceId"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CIFSSHARECOUNT_DESCRIPTOR)
field(CLUSTERBLOCKSTORAGELOGICALUSED_DESCRIPTOR)
field(CLUSTERBLOCKSTORAGESIZE_DESCRIPTOR)
field(CLUSTERBLOCKSTORAGEUSED_DESCRIPTOR)
field(CLUSTERCLOUDSTORAGEUSED_DESCRIPTOR)
field(CLUSTERNAME_DESCRIPTOR)
field(LUNCOUNT_DESCRIPTOR)
field(MAXP95PERFORMANCE_DESCRIPTOR)
field(NFSEXPORTEDVOLUMES_DESCRIPTOR)
field(RECOMMENDATIONSTATUS_DESCRIPTOR)
field(RECOMMENDATIONS_DESCRIPTOR)
field(RESOURCEID_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CIFSSHARECOUNT_DESCRIPTOR.index -> builder.cifsShareCount = deserializeLong()
CLUSTERBLOCKSTORAGELOGICALUSED_DESCRIPTOR.index -> builder.clusterBlockStorageLogicalUsed = deserializeLong()
CLUSTERBLOCKSTORAGESIZE_DESCRIPTOR.index -> builder.clusterBlockStorageSize = deserializeLong()
CLUSTERBLOCKSTORAGEUSED_DESCRIPTOR.index -> builder.clusterBlockStorageUsed = deserializeLong()
CLUSTERCLOUDSTORAGEUSED_DESCRIPTOR.index -> builder.clusterCloudStorageUsed = deserializeLong()
CLUSTERNAME_DESCRIPTOR.index -> builder.clusterName = deserializeString()
LUNCOUNT_DESCRIPTOR.index -> builder.lunCount = deserializeLong()
MAXP95PERFORMANCE_DESCRIPTOR.index -> builder.maxP95Performance = deserializeMaxP95PerformanceDocument(deserializer)
NFSEXPORTEDVOLUMES_DESCRIPTOR.index -> builder.nfsExportedVolumes = deserializeLong()
RECOMMENDATIONSTATUS_DESCRIPTOR.index -> builder.recommendationStatus = deserializeString().let { RecommendationStatus.fromValue(it) }
RECOMMENDATIONS_DESCRIPTOR.index -> builder.recommendations =
deserializer.deserializeList(RECOMMENDATIONS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeRecommendationDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
RESOURCEID_DESCRIPTOR.index -> builder.resourceId = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy