commonMain.aws.sdk.kotlin.services.finspacedata.serde.UserDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of finspacedata-jvm Show documentation
Show all versions of finspacedata-jvm Show documentation
The AWS SDK for Kotlin client for finspace data
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.finspacedata.serde
import aws.sdk.kotlin.services.finspacedata.model.ApiAccess
import aws.sdk.kotlin.services.finspacedata.model.User
import aws.sdk.kotlin.services.finspacedata.model.UserStatus
import aws.sdk.kotlin.services.finspacedata.model.UserType
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 deserializeUserDocument(deserializer: Deserializer): User {
val builder = User.Builder()
val APIACCESS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("apiAccess"))
val APIACCESSPRINCIPALARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("apiAccessPrincipalArn"))
val CREATETIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("createTime"))
val EMAILADDRESS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("emailAddress"))
val FIRSTNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("firstName"))
val LASTDISABLEDTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("lastDisabledTime"))
val LASTENABLEDTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("lastEnabledTime"))
val LASTLOGINTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("lastLoginTime"))
val LASTMODIFIEDTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("lastModifiedTime"))
val LASTNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("lastName"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("status"))
val TYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("type"))
val USERID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("userId"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(APIACCESS_DESCRIPTOR)
field(APIACCESSPRINCIPALARN_DESCRIPTOR)
field(CREATETIME_DESCRIPTOR)
field(EMAILADDRESS_DESCRIPTOR)
field(FIRSTNAME_DESCRIPTOR)
field(LASTDISABLEDTIME_DESCRIPTOR)
field(LASTENABLEDTIME_DESCRIPTOR)
field(LASTLOGINTIME_DESCRIPTOR)
field(LASTMODIFIEDTIME_DESCRIPTOR)
field(LASTNAME_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(TYPE_DESCRIPTOR)
field(USERID_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
APIACCESS_DESCRIPTOR.index -> builder.apiAccess = deserializeString().let { ApiAccess.fromValue(it) }
APIACCESSPRINCIPALARN_DESCRIPTOR.index -> builder.apiAccessPrincipalArn = deserializeString()
CREATETIME_DESCRIPTOR.index -> builder.createTime = deserializeLong()
EMAILADDRESS_DESCRIPTOR.index -> builder.emailAddress = deserializeString()
FIRSTNAME_DESCRIPTOR.index -> builder.firstName = deserializeString()
LASTDISABLEDTIME_DESCRIPTOR.index -> builder.lastDisabledTime = deserializeLong()
LASTENABLEDTIME_DESCRIPTOR.index -> builder.lastEnabledTime = deserializeLong()
LASTLOGINTIME_DESCRIPTOR.index -> builder.lastLoginTime = deserializeLong()
LASTMODIFIEDTIME_DESCRIPTOR.index -> builder.lastModifiedTime = deserializeLong()
LASTNAME_DESCRIPTOR.index -> builder.lastName = deserializeString()
STATUS_DESCRIPTOR.index -> builder.status = deserializeString().let { UserStatus.fromValue(it) }
TYPE_DESCRIPTOR.index -> builder.type = deserializeString().let { UserType.fromValue(it) }
USERID_DESCRIPTOR.index -> builder.userId = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy