commonMain.aws.sdk.kotlin.hll.dynamodbmapper.pipeline.DeserializeInput.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.items.ItemSchema
import aws.sdk.kotlin.hll.dynamodbmapper.pipeline.internal.DeserializeInputImpl
import aws.smithy.kotlin.runtime.ExperimentalApi
import aws.sdk.kotlin.services.dynamodb.model.GetItemResponse as LowLevelGetItemResponse
/**
* Defines input to the deserialization step of the pipeline
* @param T The type of objects being converted to/from DynamoDB items
* @param LRes The type of low-level response object (e.g., [LowLevelGetItemResponse])
*/
@ExperimentalApi
public interface DeserializeInput {
/**
* The low-level response which is to be deserialized into a high-level response object
*/
public val lowLevelResponse: LRes
/**
* The [ItemSchema] to use for deserializing items into objects
*/
public val deserializeSchema: ItemSchema
}
/**
* Creates a new [DeserializeInput]
* @param T The type of objects being converted to/from DynamoDB items
* @param LRes The type of low-level response object (e.g., [LowLevelGetItemResponse])
* @param lowLevelResponse The low-level response which is to be deserialized into a high-level response object
* @param deserializeSchema The [ItemSchema] to use for deserializing items into objects
*/
@ExperimentalApi
public fun DeserializeInput(
lowLevelResponse: LRes,
deserializeSchema: ItemSchema,
): DeserializeInput = DeserializeInputImpl(lowLevelResponse, deserializeSchema)