commonMain.aws.sdk.kotlin.services.bedrockagent.serde.DataSourceConfigurationDocumentSerializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.bedrockagent.serde
import aws.sdk.kotlin.services.bedrockagent.model.DataSourceConfiguration
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 serializeDataSourceConfigurationDocument(serializer: Serializer, input: DataSourceConfiguration) {
val CONFLUENCECONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("confluenceConfiguration"))
val S3CONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("s3Configuration"))
val SALESFORCECONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("salesforceConfiguration"))
val SHAREPOINTCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("sharePointConfiguration"))
val TYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("type"))
val WEBCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("webConfiguration"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CONFLUENCECONFIGURATION_DESCRIPTOR)
field(S3CONFIGURATION_DESCRIPTOR)
field(SALESFORCECONFIGURATION_DESCRIPTOR)
field(SHAREPOINTCONFIGURATION_DESCRIPTOR)
field(TYPE_DESCRIPTOR)
field(WEBCONFIGURATION_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
field(TYPE_DESCRIPTOR, input.type.value)
input.s3Configuration?.let { field(S3CONFIGURATION_DESCRIPTOR, it, ::serializeS3DataSourceConfigurationDocument) }
input.webConfiguration?.let { field(WEBCONFIGURATION_DESCRIPTOR, it, ::serializeWebDataSourceConfigurationDocument) }
input.confluenceConfiguration?.let { field(CONFLUENCECONFIGURATION_DESCRIPTOR, it, ::serializeConfluenceDataSourceConfigurationDocument) }
input.salesforceConfiguration?.let { field(SALESFORCECONFIGURATION_DESCRIPTOR, it, ::serializeSalesforceDataSourceConfigurationDocument) }
input.sharePointConfiguration?.let { field(SHAREPOINTCONFIGURATION_DESCRIPTOR, it, ::serializeSharePointDataSourceConfigurationDocument) }
}
}