
commonMain.aws.sdk.kotlin.services.route53resolver.serde.ResolverQueryLogConfigAssociationDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.route53resolver.serde
import aws.sdk.kotlin.services.route53resolver.model.ResolverQueryLogConfigAssociation
import aws.sdk.kotlin.services.route53resolver.model.ResolverQueryLogConfigAssociationError
import aws.sdk.kotlin.services.route53resolver.model.ResolverQueryLogConfigAssociationStatus
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 deserializeResolverQueryLogConfigAssociationDocument(deserializer: Deserializer): ResolverQueryLogConfigAssociation {
val builder = ResolverQueryLogConfigAssociation.Builder()
val CREATIONTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CreationTime"))
val ERROR_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Error"))
val ERRORMESSAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ErrorMessage"))
val ID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Id"))
val RESOLVERQUERYLOGCONFIGID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ResolverQueryLogConfigId"))
val RESOURCEID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ResourceId"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Status"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CREATIONTIME_DESCRIPTOR)
field(ERROR_DESCRIPTOR)
field(ERRORMESSAGE_DESCRIPTOR)
field(ID_DESCRIPTOR)
field(RESOLVERQUERYLOGCONFIGID_DESCRIPTOR)
field(RESOURCEID_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CREATIONTIME_DESCRIPTOR.index -> builder.creationTime = deserializeString()
ERROR_DESCRIPTOR.index -> builder.error = deserializeString().let { ResolverQueryLogConfigAssociationError.fromValue(it) }
ERRORMESSAGE_DESCRIPTOR.index -> builder.errorMessage = deserializeString()
ID_DESCRIPTOR.index -> builder.id = deserializeString()
RESOLVERQUERYLOGCONFIGID_DESCRIPTOR.index -> builder.resolverQueryLogConfigId = deserializeString()
RESOURCEID_DESCRIPTOR.index -> builder.resourceId = deserializeString()
STATUS_DESCRIPTOR.index -> builder.status = deserializeString().let { ResolverQueryLogConfigAssociationStatus.fromValue(it) }
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy