commonMain.aws.sdk.kotlin.hll.dynamodbmapper.values.collections.MapConverter.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dynamodb-mapper-jvm Show documentation
Show all versions of dynamodb-mapper-jvm Show documentation
High level DynamoDbMapper client
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
package aws.sdk.kotlin.hll.dynamodbmapper.values.collections
import aws.sdk.kotlin.hll.dynamodbmapper.values.ValueConverter
import aws.sdk.kotlin.hll.mapping.core.converters.Converter
import aws.sdk.kotlin.hll.mapping.core.converters.collections.mapFrom
import aws.sdk.kotlin.hll.mapping.core.converters.collections.mapKeysFrom
import aws.sdk.kotlin.hll.mapping.core.converters.collections.mapValuesFrom
import aws.sdk.kotlin.services.dynamodb.model.AttributeValue
import aws.smithy.kotlin.runtime.ExperimentalApi
/**
* Converts between [Map] and
* [DynamoDB `M` values](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes.Document.Map).
* Note that the maps must contain [String] keys and already-converted [AttributeValue] values. This converter is
* typically chained with another converter which handles converting values to [AttributeValue] either by using the
* factory function [MapConverter] or by using the [mapFrom]/[mapValuesFrom]/[mapKeysFrom] extension methods.
*
* ```kotlin
* val instantMapConv = MapConverter(InstantConverter.Default) // ValueConverter
© 2015 - 2024 Weber Informatics LLC | Privacy Policy