All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.athena.serde.WorkGroupConfigurationDocumentDeserializer.kt Maven / Gradle / Ivy

The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.athena.serde

import aws.sdk.kotlin.services.athena.model.WorkGroupConfiguration
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 deserializeWorkGroupConfigurationDocument(deserializer: Deserializer): WorkGroupConfiguration {
    val builder = WorkGroupConfiguration.Builder()
    val ADDITIONALCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("AdditionalConfiguration"))
    val BYTESSCANNEDCUTOFFPERQUERY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("BytesScannedCutoffPerQuery"))
    val CUSTOMERCONTENTENCRYPTIONCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("CustomerContentEncryptionConfiguration"))
    val ENABLEMINIMUMENCRYPTIONCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("EnableMinimumEncryptionConfiguration"))
    val ENFORCEWORKGROUPCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("EnforceWorkGroupConfiguration"))
    val ENGINEVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("EngineVersion"))
    val EXECUTIONROLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ExecutionRole"))
    val IDENTITYCENTERCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("IdentityCenterConfiguration"))
    val PUBLISHCLOUDWATCHMETRICSENABLED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("PublishCloudWatchMetricsEnabled"))
    val QUERYRESULTSS3ACCESSGRANTSCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("QueryResultsS3AccessGrantsConfiguration"))
    val REQUESTERPAYSENABLED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("RequesterPaysEnabled"))
    val RESULTCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ResultConfiguration"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(ADDITIONALCONFIGURATION_DESCRIPTOR)
        field(BYTESSCANNEDCUTOFFPERQUERY_DESCRIPTOR)
        field(CUSTOMERCONTENTENCRYPTIONCONFIGURATION_DESCRIPTOR)
        field(ENABLEMINIMUMENCRYPTIONCONFIGURATION_DESCRIPTOR)
        field(ENFORCEWORKGROUPCONFIGURATION_DESCRIPTOR)
        field(ENGINEVERSION_DESCRIPTOR)
        field(EXECUTIONROLE_DESCRIPTOR)
        field(IDENTITYCENTERCONFIGURATION_DESCRIPTOR)
        field(PUBLISHCLOUDWATCHMETRICSENABLED_DESCRIPTOR)
        field(QUERYRESULTSS3ACCESSGRANTSCONFIGURATION_DESCRIPTOR)
        field(REQUESTERPAYSENABLED_DESCRIPTOR)
        field(RESULTCONFIGURATION_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                ADDITIONALCONFIGURATION_DESCRIPTOR.index -> builder.additionalConfiguration = deserializeString()
                BYTESSCANNEDCUTOFFPERQUERY_DESCRIPTOR.index -> builder.bytesScannedCutoffPerQuery = deserializeLong()
                CUSTOMERCONTENTENCRYPTIONCONFIGURATION_DESCRIPTOR.index -> builder.customerContentEncryptionConfiguration = deserializeCustomerContentEncryptionConfigurationDocument(deserializer)
                ENABLEMINIMUMENCRYPTIONCONFIGURATION_DESCRIPTOR.index -> builder.enableMinimumEncryptionConfiguration = deserializeBoolean()
                ENFORCEWORKGROUPCONFIGURATION_DESCRIPTOR.index -> builder.enforceWorkGroupConfiguration = deserializeBoolean()
                ENGINEVERSION_DESCRIPTOR.index -> builder.engineVersion = deserializeEngineVersionDocument(deserializer)
                EXECUTIONROLE_DESCRIPTOR.index -> builder.executionRole = deserializeString()
                IDENTITYCENTERCONFIGURATION_DESCRIPTOR.index -> builder.identityCenterConfiguration = deserializeIdentityCenterConfigurationDocument(deserializer)
                PUBLISHCLOUDWATCHMETRICSENABLED_DESCRIPTOR.index -> builder.publishCloudWatchMetricsEnabled = deserializeBoolean()
                QUERYRESULTSS3ACCESSGRANTSCONFIGURATION_DESCRIPTOR.index -> builder.queryResultsS3AccessGrantsConfiguration = deserializeQueryResultsS3AccessGrantsConfigurationDocument(deserializer)
                REQUESTERPAYSENABLED_DESCRIPTOR.index -> builder.requesterPaysEnabled = deserializeBoolean()
                RESULTCONFIGURATION_DESCRIPTOR.index -> builder.resultConfiguration = deserializeResultConfigurationDocument(deserializer)
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy