commonMain.aws.sdk.kotlin.services.amplifybackend.serde.CreateBackendAuthUserPoolConfigDocumentSerializer.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.CreateBackendAuthUserPoolConfig
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 serializeCreateBackendAuthUserPoolConfigDocument(serializer: Serializer, input: CreateBackendAuthUserPoolConfig) {
val FORGOTPASSWORD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("forgotPassword"))
val MFA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("mfa"))
val OAUTH_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("oAuth"))
val PASSWORDPOLICY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("passwordPolicy"))
val REQUIREDSIGNUPATTRIBUTES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("requiredSignUpAttributes"))
val SIGNINMETHOD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("signInMethod"))
val USERPOOLNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("userPoolName"))
val VERIFICATIONMESSAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("verificationMessage"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(FORGOTPASSWORD_DESCRIPTOR)
field(MFA_DESCRIPTOR)
field(OAUTH_DESCRIPTOR)
field(PASSWORDPOLICY_DESCRIPTOR)
field(REQUIREDSIGNUPATTRIBUTES_DESCRIPTOR)
field(SIGNINMETHOD_DESCRIPTOR)
field(USERPOOLNAME_DESCRIPTOR)
field(VERIFICATIONMESSAGE_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.forgotPassword?.let { field(FORGOTPASSWORD_DESCRIPTOR, it, ::serializeCreateBackendAuthForgotPasswordConfigDocument) }
input.mfa?.let { field(MFA_DESCRIPTOR, it, ::serializeCreateBackendAuthMfaConfigDocument) }
input.oAuth?.let { field(OAUTH_DESCRIPTOR, it, ::serializeCreateBackendAuthOAuthConfigDocument) }
input.passwordPolicy?.let { field(PASSWORDPOLICY_DESCRIPTOR, it, ::serializeCreateBackendAuthPasswordPolicyConfigDocument) }
if (input.requiredSignUpAttributes != null) {
listField(REQUIREDSIGNUPATTRIBUTES_DESCRIPTOR) {
for (el0 in input.requiredSignUpAttributes) {
serializeString(el0.value)
}
}
}
input.signInMethod?.let { field(SIGNINMETHOD_DESCRIPTOR, it.value) }
input.userPoolName?.let { field(USERPOOLNAME_DESCRIPTOR, it) }
input.verificationMessage?.let { field(VERIFICATIONMESSAGE_DESCRIPTOR, it, ::serializeCreateBackendAuthVerificationMessageConfigDocument) }
}
}