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

commonMain.aws.sdk.kotlin.hll.dynamodbmapper.pipeline.DeserializeInput.kt Maven / Gradle / Ivy

There is a newer version: 1.3.99-beta
Show newest version
/*
 * 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)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy