commonMain.aws.sdk.kotlin.services.glue.serde.ConnectionInputDocumentSerializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glue-jvm Show documentation
Show all versions of glue-jvm Show documentation
The AWS SDK for Kotlin client for Glue
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.serde
import aws.sdk.kotlin.services.glue.model.ConnectionInput
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 serializeConnectionInputDocument(serializer: Serializer, input: ConnectionInput) {
val AUTHENTICATIONCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("AuthenticationConfiguration"))
val CONNECTIONPROPERTIES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("ConnectionProperties"))
val CONNECTIONTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ConnectionType"))
val DESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Description"))
val MATCHCRITERIA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("MatchCriteria"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Name"))
val PHYSICALCONNECTIONREQUIREMENTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("PhysicalConnectionRequirements"))
val VALIDATECREDENTIALS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("ValidateCredentials"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(AUTHENTICATIONCONFIGURATION_DESCRIPTOR)
field(CONNECTIONPROPERTIES_DESCRIPTOR)
field(CONNECTIONTYPE_DESCRIPTOR)
field(DESCRIPTION_DESCRIPTOR)
field(MATCHCRITERIA_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(PHYSICALCONNECTIONREQUIREMENTS_DESCRIPTOR)
field(VALIDATECREDENTIALS_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
field(NAME_DESCRIPTOR, input.name)
input.description?.let { field(DESCRIPTION_DESCRIPTOR, it) }
field(CONNECTIONTYPE_DESCRIPTOR, input.connectionType.value)
if (input.matchCriteria != null) {
listField(MATCHCRITERIA_DESCRIPTOR) {
for (el0 in input.matchCriteria) {
serializeString(el0)
}
}
}
mapField(CONNECTIONPROPERTIES_DESCRIPTOR) {
input.connectionProperties.forEach { (key, value) ->
entry(key.value, value)
}
}
input.physicalConnectionRequirements?.let { field(PHYSICALCONNECTIONREQUIREMENTS_DESCRIPTOR, it, ::serializePhysicalConnectionRequirementsDocument) }
input.authenticationConfiguration?.let { field(AUTHENTICATIONCONFIGURATION_DESCRIPTOR, it, ::serializeAuthenticationConfigurationInputDocument) }
if (input.validateCredentials != false) field(VALIDATECREDENTIALS_DESCRIPTOR, input.validateCredentials)
}
}