commonMain.aws.sdk.kotlin.services.amplifybackend.serde.UpdateBackendAuthOAuthConfigDocumentSerializer.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.UpdateBackendAuthOAuthConfig
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 serializeUpdateBackendAuthOAuthConfigDocument(serializer: Serializer, input: UpdateBackendAuthOAuthConfig) {
val DOMAINPREFIX_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("domainPrefix"))
val OAUTHGRANTTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("oAuthGrantType"))
val OAUTHSCOPES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("oAuthScopes"))
val REDIRECTSIGNINURIS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("redirectSignInURIs"))
val REDIRECTSIGNOUTURIS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("redirectSignOutURIs"))
val SOCIALPROVIDERSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("socialProviderSettings"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(DOMAINPREFIX_DESCRIPTOR)
field(OAUTHGRANTTYPE_DESCRIPTOR)
field(OAUTHSCOPES_DESCRIPTOR)
field(REDIRECTSIGNINURIS_DESCRIPTOR)
field(REDIRECTSIGNOUTURIS_DESCRIPTOR)
field(SOCIALPROVIDERSETTINGS_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.domainPrefix?.let { field(DOMAINPREFIX_DESCRIPTOR, it) }
input.oAuthGrantType?.let { field(OAUTHGRANTTYPE_DESCRIPTOR, it.value) }
if (input.oAuthScopes != null) {
listField(OAUTHSCOPES_DESCRIPTOR) {
for (el0 in input.oAuthScopes) {
serializeString(el0.value)
}
}
}
if (input.redirectSignInUris != null) {
listField(REDIRECTSIGNINURIS_DESCRIPTOR) {
for (el0 in input.redirectSignInUris) {
serializeString(el0)
}
}
}
if (input.redirectSignOutUris != null) {
listField(REDIRECTSIGNOUTURIS_DESCRIPTOR) {
for (el0 in input.redirectSignOutUris) {
serializeString(el0)
}
}
}
input.socialProviderSettings?.let { field(SOCIALPROVIDERSETTINGS_DESCRIPTOR, it, ::serializeSocialProviderSettingsDocument) }
}
}