All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.elasticloadbalancingv2.serde.AuthenticateCognitoActionConfigDocumentSerializer.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.elasticloadbalancingv2.serde

import aws.sdk.kotlin.services.elasticloadbalancingv2.model.AuthenticateCognitoActionConfig
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.formurl.FormUrlSerialName
import aws.smithy.kotlin.runtime.serde.serializeList
import aws.smithy.kotlin.runtime.serde.serializeMap
import aws.smithy.kotlin.runtime.serde.serializeStruct

internal fun serializeAuthenticateCognitoActionConfigDocument(serializer: Serializer, input: AuthenticateCognitoActionConfig) {
    val AUTHENTICATIONREQUESTEXTRAPARAMS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, FormUrlSerialName("AuthenticationRequestExtraParams"))
    val ONUNAUTHENTICATEDREQUEST_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, FormUrlSerialName("OnUnauthenticatedRequest"))
    val SCOPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, FormUrlSerialName("Scope"))
    val SESSIONCOOKIENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, FormUrlSerialName("SessionCookieName"))
    val SESSIONTIMEOUT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, FormUrlSerialName("SessionTimeout"))
    val USERPOOLARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, FormUrlSerialName("UserPoolArn"))
    val USERPOOLCLIENTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, FormUrlSerialName("UserPoolClientId"))
    val USERPOOLDOMAIN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, FormUrlSerialName("UserPoolDomain"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        trait(FormUrlSerialName("AuthenticateCognitoActionConfig"))
        field(AUTHENTICATIONREQUESTEXTRAPARAMS_DESCRIPTOR)
        field(ONUNAUTHENTICATEDREQUEST_DESCRIPTOR)
        field(SCOPE_DESCRIPTOR)
        field(SESSIONCOOKIENAME_DESCRIPTOR)
        field(SESSIONTIMEOUT_DESCRIPTOR)
        field(USERPOOLARN_DESCRIPTOR)
        field(USERPOOLCLIENTID_DESCRIPTOR)
        field(USERPOOLDOMAIN_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        input.userPoolArn?.let { field(USERPOOLARN_DESCRIPTOR, it) }
        input.userPoolClientId?.let { field(USERPOOLCLIENTID_DESCRIPTOR, it) }
        input.userPoolDomain?.let { field(USERPOOLDOMAIN_DESCRIPTOR, it) }
        input.sessionCookieName?.let { field(SESSIONCOOKIENAME_DESCRIPTOR, it) }
        input.scope?.let { field(SCOPE_DESCRIPTOR, it) }
        input.sessionTimeout?.let { field(SESSIONTIMEOUT_DESCRIPTOR, it) }
        if (input.authenticationRequestExtraParams != null) {
            mapField(AUTHENTICATIONREQUESTEXTRAPARAMS_DESCRIPTOR) {
                input.authenticationRequestExtraParams.forEach { (key, value) ->
                    entry(key, value)
                }
            }
        }
        input.onUnauthenticatedRequest?.let { field(ONUNAUTHENTICATEDREQUEST_DESCRIPTOR, it.value) }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy