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

commonMain.aws.sdk.kotlin.services.appflow.serde.RedshiftConnectorProfilePropertiesDocumentDeserializer.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.appflow.serde

import aws.sdk.kotlin.services.appflow.model.RedshiftConnectorProfileProperties
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 deserializeRedshiftConnectorProfilePropertiesDocument(deserializer: Deserializer): RedshiftConnectorProfileProperties {
    val builder = RedshiftConnectorProfileProperties.Builder()
    val BUCKETNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("bucketName"))
    val BUCKETPREFIX_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("bucketPrefix"))
    val CLUSTERIDENTIFIER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("clusterIdentifier"))
    val DATAAPIROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("dataApiRoleArn"))
    val DATABASENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("databaseName"))
    val DATABASEURL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("databaseUrl"))
    val ISREDSHIFTSERVERLESS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("isRedshiftServerless"))
    val ROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("roleArn"))
    val WORKGROUPNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("workgroupName"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(BUCKETNAME_DESCRIPTOR)
        field(BUCKETPREFIX_DESCRIPTOR)
        field(CLUSTERIDENTIFIER_DESCRIPTOR)
        field(DATAAPIROLEARN_DESCRIPTOR)
        field(DATABASENAME_DESCRIPTOR)
        field(DATABASEURL_DESCRIPTOR)
        field(ISREDSHIFTSERVERLESS_DESCRIPTOR)
        field(ROLEARN_DESCRIPTOR)
        field(WORKGROUPNAME_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                BUCKETNAME_DESCRIPTOR.index -> builder.bucketName = deserializeString()
                BUCKETPREFIX_DESCRIPTOR.index -> builder.bucketPrefix = deserializeString()
                CLUSTERIDENTIFIER_DESCRIPTOR.index -> builder.clusterIdentifier = deserializeString()
                DATAAPIROLEARN_DESCRIPTOR.index -> builder.dataApiRoleArn = deserializeString()
                DATABASENAME_DESCRIPTOR.index -> builder.databaseName = deserializeString()
                DATABASEURL_DESCRIPTOR.index -> builder.databaseUrl = deserializeString()
                ISREDSHIFTSERVERLESS_DESCRIPTOR.index -> builder.isRedshiftServerless = deserializeBoolean()
                ROLEARN_DESCRIPTOR.index -> builder.roleArn = deserializeString()
                WORKGROUPNAME_DESCRIPTOR.index -> builder.workgroupName = deserializeString()
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy