commonMain.aws.sdk.kotlin.services.licensemanagerusersubscriptions.serde.InstanceUserSummaryDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of licensemanagerusersubscriptions-jvm Show documentation
Show all versions of licensemanagerusersubscriptions-jvm Show documentation
The AWS SDK for Kotlin client for License Manager User Subscriptions
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.licensemanagerusersubscriptions.serde
import aws.sdk.kotlin.services.licensemanagerusersubscriptions.model.InstanceUserSummary
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 deserializeInstanceUserSummaryDocument(deserializer: Deserializer): InstanceUserSummary {
val builder = InstanceUserSummary.Builder()
val ASSOCIATIONDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("AssociationDate"))
val DISASSOCIATIONDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DisassociationDate"))
val DOMAIN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Domain"))
val IDENTITYPROVIDER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("IdentityProvider"))
val INSTANCEID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("InstanceId"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Status"))
val STATUSMESSAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("StatusMessage"))
val USERNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Username"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ASSOCIATIONDATE_DESCRIPTOR)
field(DISASSOCIATIONDATE_DESCRIPTOR)
field(DOMAIN_DESCRIPTOR)
field(IDENTITYPROVIDER_DESCRIPTOR)
field(INSTANCEID_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(STATUSMESSAGE_DESCRIPTOR)
field(USERNAME_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ASSOCIATIONDATE_DESCRIPTOR.index -> builder.associationDate = deserializeString()
DISASSOCIATIONDATE_DESCRIPTOR.index -> builder.disassociationDate = deserializeString()
DOMAIN_DESCRIPTOR.index -> builder.domain = deserializeString()
IDENTITYPROVIDER_DESCRIPTOR.index -> builder.identityProvider = deserializeIdentityProviderDocument(deserializer)
INSTANCEID_DESCRIPTOR.index -> builder.instanceId = deserializeString()
STATUS_DESCRIPTOR.index -> builder.status = deserializeString()
STATUSMESSAGE_DESCRIPTOR.index -> builder.statusMessage = deserializeString()
USERNAME_DESCRIPTOR.index -> builder.username = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}