commonMain.aws.sdk.kotlin.services.appflow.serde.CustomConnectorProfileCredentialsDocumentSerializer.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.CustomConnectorProfileCredentials
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.Serializer
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 serializeCustomConnectorProfileCredentialsDocument(serializer: Serializer, input: CustomConnectorProfileCredentials) {
val APIKEY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("apiKey"))
val AUTHENTICATIONTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("authenticationType"))
val BASIC_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("basic"))
val CUSTOM_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("custom"))
val OAUTH2_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("oauth2"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(APIKEY_DESCRIPTOR)
field(AUTHENTICATIONTYPE_DESCRIPTOR)
field(BASIC_DESCRIPTOR)
field(CUSTOM_DESCRIPTOR)
field(OAUTH2_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
field(AUTHENTICATIONTYPE_DESCRIPTOR, input.authenticationType.value)
input.basic?.let { field(BASIC_DESCRIPTOR, it, ::serializeBasicAuthCredentialsDocument) }
input.oauth2?.let { field(OAUTH2_DESCRIPTOR, it, ::serializeOAuth2CredentialsDocument) }
input.apiKey?.let { field(APIKEY_DESCRIPTOR, it, ::serializeApiKeyCredentialsDocument) }
input.custom?.let { field(CUSTOM_DESCRIPTOR, it, ::serializeCustomAuthCredentialsDocument) }
}
}