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

commonMain.aws.sdk.kotlin.services.elasticloadbalancingv2.serde.MutualAuthenticationAttributesDocumentDeserializer.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.MutualAuthenticationAttributes
import aws.smithy.kotlin.runtime.serde.getOrDeserializeErr
import aws.smithy.kotlin.runtime.serde.parseBoolean
import aws.smithy.kotlin.runtime.serde.xml.XmlTagReader
import aws.smithy.kotlin.runtime.serde.xml.tryData

internal fun deserializeMutualAuthenticationAttributesDocument(reader: XmlTagReader): MutualAuthenticationAttributes {
    val builder = MutualAuthenticationAttributes.Builder()

    loop@while (true) {
        val curr = reader.nextTag() ?: break@loop
        when (curr.tagName) {
            // Mode com.amazonaws.elasticloadbalancingv2#MutualAuthenticationAttributes$Mode
            "Mode" -> builder.mode = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.elasticloadbalancingv2#Mode`)" }
            // TrustStoreArn com.amazonaws.elasticloadbalancingv2#MutualAuthenticationAttributes$TrustStoreArn
            "TrustStoreArn" -> builder.trustStoreArn = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.elasticloadbalancingv2#TrustStoreArn`)" }
            // IgnoreClientCertificateExpiry com.amazonaws.elasticloadbalancingv2#MutualAuthenticationAttributes$IgnoreClientCertificateExpiry
            "IgnoreClientCertificateExpiry" -> builder.ignoreClientCertificateExpiry = curr.tryData()
                .parseBoolean()
                .getOrDeserializeErr { "expected (boolean: `com.amazonaws.elasticloadbalancingv2#IgnoreClientCertificateExpiry`)" }
            else -> {}
        }
        curr.drop()
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy