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

commonMain.aws.sdk.kotlin.services.databasemigrationservice.serde.MongoDbSettingsDocumentSerializer.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.databasemigrationservice.serde

import aws.sdk.kotlin.services.databasemigrationservice.model.MongoDbSettings
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 serializeMongoDbSettingsDocument(serializer: Serializer, input: MongoDbSettings) {
    val AUTHMECHANISM_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("AuthMechanism"))
    val AUTHSOURCE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("AuthSource"))
    val AUTHTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("AuthType"))
    val DATABASENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DatabaseName"))
    val DOCSTOINVESTIGATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DocsToInvestigate"))
    val EXTRACTDOCID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ExtractDocId"))
    val KMSKEYID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("KmsKeyId"))
    val NESTINGLEVEL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("NestingLevel"))
    val PASSWORD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Password"))
    val PORT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("Port"))
    val REPLICATESHARDCOLLECTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("ReplicateShardCollections"))
    val SECRETSMANAGERACCESSROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SecretsManagerAccessRoleArn"))
    val SECRETSMANAGERSECRETID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SecretsManagerSecretId"))
    val SERVERNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ServerName"))
    val USEUPDATELOOKUP_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("UseUpdateLookUp"))
    val USERNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Username"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(AUTHMECHANISM_DESCRIPTOR)
        field(AUTHSOURCE_DESCRIPTOR)
        field(AUTHTYPE_DESCRIPTOR)
        field(DATABASENAME_DESCRIPTOR)
        field(DOCSTOINVESTIGATE_DESCRIPTOR)
        field(EXTRACTDOCID_DESCRIPTOR)
        field(KMSKEYID_DESCRIPTOR)
        field(NESTINGLEVEL_DESCRIPTOR)
        field(PASSWORD_DESCRIPTOR)
        field(PORT_DESCRIPTOR)
        field(REPLICATESHARDCOLLECTIONS_DESCRIPTOR)
        field(SECRETSMANAGERACCESSROLEARN_DESCRIPTOR)
        field(SECRETSMANAGERSECRETID_DESCRIPTOR)
        field(SERVERNAME_DESCRIPTOR)
        field(USEUPDATELOOKUP_DESCRIPTOR)
        field(USERNAME_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        input.username?.let { field(USERNAME_DESCRIPTOR, it) }
        input.password?.let { field(PASSWORD_DESCRIPTOR, it) }
        input.serverName?.let { field(SERVERNAME_DESCRIPTOR, it) }
        input.port?.let { field(PORT_DESCRIPTOR, it) }
        input.databaseName?.let { field(DATABASENAME_DESCRIPTOR, it) }
        input.authType?.let { field(AUTHTYPE_DESCRIPTOR, it.value) }
        input.authMechanism?.let { field(AUTHMECHANISM_DESCRIPTOR, it.value) }
        input.nestingLevel?.let { field(NESTINGLEVEL_DESCRIPTOR, it.value) }
        input.extractDocId?.let { field(EXTRACTDOCID_DESCRIPTOR, it) }
        input.docsToInvestigate?.let { field(DOCSTOINVESTIGATE_DESCRIPTOR, it) }
        input.authSource?.let { field(AUTHSOURCE_DESCRIPTOR, it) }
        input.kmsKeyId?.let { field(KMSKEYID_DESCRIPTOR, it) }
        input.secretsManagerAccessRoleArn?.let { field(SECRETSMANAGERACCESSROLEARN_DESCRIPTOR, it) }
        input.secretsManagerSecretId?.let { field(SECRETSMANAGERSECRETID_DESCRIPTOR, it) }
        input.useUpdateLookUp?.let { field(USEUPDATELOOKUP_DESCRIPTOR, it) }
        input.replicateShardCollections?.let { field(REPLICATESHARDCOLLECTIONS_DESCRIPTOR, it) }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy