commonMain.aws.sdk.kotlin.services.appflow.serde.ConnectorProfileDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of appflow-jvm Show documentation
Show all versions of appflow-jvm Show documentation
The AWS SDK for Kotlin client for Appflow
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.ConnectionMode
import aws.sdk.kotlin.services.appflow.model.ConnectorProfile
import aws.sdk.kotlin.services.appflow.model.ConnectorType
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
import aws.smithy.kotlin.runtime.time.TimestampFormat
internal fun deserializeConnectorProfileDocument(deserializer: Deserializer): ConnectorProfile {
val builder = ConnectorProfile.Builder()
val CONNECTIONMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("connectionMode"))
val CONNECTORLABEL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("connectorLabel"))
val CONNECTORPROFILEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("connectorProfileArn"))
val CONNECTORPROFILENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("connectorProfileName"))
val CONNECTORPROFILEPROPERTIES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("connectorProfileProperties"))
val CONNECTORTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("connectorType"))
val CREATEDAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("createdAt"))
val CREDENTIALSARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("credentialsArn"))
val LASTUPDATEDAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("lastUpdatedAt"))
val PRIVATECONNECTIONPROVISIONINGSTATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("privateConnectionProvisioningState"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CONNECTIONMODE_DESCRIPTOR)
field(CONNECTORLABEL_DESCRIPTOR)
field(CONNECTORPROFILEARN_DESCRIPTOR)
field(CONNECTORPROFILENAME_DESCRIPTOR)
field(CONNECTORPROFILEPROPERTIES_DESCRIPTOR)
field(CONNECTORTYPE_DESCRIPTOR)
field(CREATEDAT_DESCRIPTOR)
field(CREDENTIALSARN_DESCRIPTOR)
field(LASTUPDATEDAT_DESCRIPTOR)
field(PRIVATECONNECTIONPROVISIONINGSTATE_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CONNECTIONMODE_DESCRIPTOR.index -> builder.connectionMode = deserializeString().let { ConnectionMode.fromValue(it) }
CONNECTORLABEL_DESCRIPTOR.index -> builder.connectorLabel = deserializeString()
CONNECTORPROFILEARN_DESCRIPTOR.index -> builder.connectorProfileArn = deserializeString()
CONNECTORPROFILENAME_DESCRIPTOR.index -> builder.connectorProfileName = deserializeString()
CONNECTORPROFILEPROPERTIES_DESCRIPTOR.index -> builder.connectorProfileProperties = deserializeConnectorProfilePropertiesDocument(deserializer)
CONNECTORTYPE_DESCRIPTOR.index -> builder.connectorType = deserializeString().let { ConnectorType.fromValue(it) }
CREATEDAT_DESCRIPTOR.index -> builder.createdAt = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
CREDENTIALSARN_DESCRIPTOR.index -> builder.credentialsArn = deserializeString()
LASTUPDATEDAT_DESCRIPTOR.index -> builder.lastUpdatedAt = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
PRIVATECONNECTIONPROVISIONINGSTATE_DESCRIPTOR.index -> builder.privateConnectionProvisioningState = deserializePrivateConnectionProvisioningStateDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}