commonMain.aws.sdk.kotlin.services.amplifybackend.serde.BackendApiResourceConfigDocumentSerializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of amplifybackend-jvm Show documentation
Show all versions of amplifybackend-jvm Show documentation
The AWS SDK for Kotlin client for AmplifyBackend
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.amplifybackend.serde
import aws.sdk.kotlin.services.amplifybackend.model.BackendApiResourceConfig
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 serializeBackendApiResourceConfigDocument(serializer: Serializer, input: BackendApiResourceConfig) {
val ADDITIONALAUTHTYPES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("additionalAuthTypes"))
val APINAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("apiName"))
val CONFLICTRESOLUTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("conflictResolution"))
val DEFAULTAUTHTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("defaultAuthType"))
val SERVICE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("service"))
val TRANSFORMSCHEMA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("transformSchema"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ADDITIONALAUTHTYPES_DESCRIPTOR)
field(APINAME_DESCRIPTOR)
field(CONFLICTRESOLUTION_DESCRIPTOR)
field(DEFAULTAUTHTYPE_DESCRIPTOR)
field(SERVICE_DESCRIPTOR)
field(TRANSFORMSCHEMA_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
if (input.additionalAuthTypes != null) {
listField(ADDITIONALAUTHTYPES_DESCRIPTOR) {
for (el0 in input.additionalAuthTypes) {
serializeSdkSerializable(asSdkSerializable(el0, ::serializeBackendApiAuthTypeDocument))
}
}
}
input.apiName?.let { field(APINAME_DESCRIPTOR, it) }
input.conflictResolution?.let { field(CONFLICTRESOLUTION_DESCRIPTOR, it, ::serializeBackendApiConflictResolutionDocument) }
input.defaultAuthType?.let { field(DEFAULTAUTHTYPE_DESCRIPTOR, it, ::serializeBackendApiAuthTypeDocument) }
input.service?.let { field(SERVICE_DESCRIPTOR, it) }
input.transformSchema?.let { field(TRANSFORMSCHEMA_DESCRIPTOR, it) }
}
}