commonMain.aws.sdk.kotlin.hll.dynamodbmapper.pipeline.MapperContext.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.pipeline
import aws.sdk.kotlin.hll.dynamodbmapper.model.PersistenceSpec
import aws.sdk.kotlin.hll.dynamodbmapper.pipeline.internal.MapperContextImpl
import aws.smithy.kotlin.runtime.ExperimentalApi
/**
* Holds generalized context which may be useful to interceptors
* @param T The type of objects being converted to/from DynamoDB items
*/
@ExperimentalApi
public interface MapperContext {
// TODO what other fields would be useful in here?
/**
* The metadata about an operation invocation
*/
public val persistenceSpec: PersistenceSpec
/**
* The name of the high-level operation being invoked
*/
public val operation: String
}
/**
* Create a new [MapperContext]
* @param T The type of objects being converted to/from DynamoDB items
* @param persistenceSpec The metadata about an operation invocation
* @param operation The name of the high-level operation being invoked
*/
@ExperimentalApi
public fun MapperContext(persistenceSpec: PersistenceSpec, operation: String): MapperContext =
MapperContextImpl(persistenceSpec, operation)
© 2015 - 2024 Weber Informatics LLC | Privacy Policy