commonMain.aws.sdk.kotlin.services.lexmodelbuildingservice.serde.BotAliasMetadataDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lexmodelbuildingservice.serde
import aws.sdk.kotlin.services.lexmodelbuildingservice.model.BotAliasMetadata
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
internal fun deserializeBotAliasMetadataDocument(deserializer: Deserializer): BotAliasMetadata {
val builder = BotAliasMetadata.Builder()
val BOTNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("botName"))
val BOTVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("botVersion"))
val CHECKSUM_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("checksum"))
val CONVERSATIONLOGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("conversationLogs"))
val CREATEDDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("createdDate"))
val DESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("description"))
val LASTUPDATEDDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("lastUpdatedDate"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("name"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(BOTNAME_DESCRIPTOR)
field(BOTVERSION_DESCRIPTOR)
field(CHECKSUM_DESCRIPTOR)
field(CONVERSATIONLOGS_DESCRIPTOR)
field(CREATEDDATE_DESCRIPTOR)
field(DESCRIPTION_DESCRIPTOR)
field(LASTUPDATEDDATE_DESCRIPTOR)
field(NAME_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
BOTNAME_DESCRIPTOR.index -> builder.botName = deserializeString()
BOTVERSION_DESCRIPTOR.index -> builder.botVersion = deserializeString()
CHECKSUM_DESCRIPTOR.index -> builder.checksum = deserializeString()
CONVERSATIONLOGS_DESCRIPTOR.index -> builder.conversationLogs = deserializeConversationLogsResponseDocument(deserializer)
CREATEDDATE_DESCRIPTOR.index -> builder.createdDate = deserializeString().let { Instant.fromEpochSeconds(it) }
DESCRIPTION_DESCRIPTOR.index -> builder.description = deserializeString()
LASTUPDATEDDATE_DESCRIPTOR.index -> builder.lastUpdatedDate = deserializeString().let { Instant.fromEpochSeconds(it) }
NAME_DESCRIPTOR.index -> builder.name = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy