commonMain.aws.sdk.kotlin.hll.dynamodbmapper.pipeline.internal.HReqContextImpl.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.internal
import aws.sdk.kotlin.hll.dynamodbmapper.items.ItemSchema
import aws.sdk.kotlin.hll.dynamodbmapper.pipeline.HReqContext
import aws.sdk.kotlin.hll.dynamodbmapper.pipeline.MapperContext
import aws.sdk.kotlin.hll.dynamodbmapper.pipeline.SerializeInput
internal data class HReqContextImpl(
override val highLevelRequest: HReq,
override val serializeSchema: ItemSchema,
override val mapperContext: MapperContext,
override val error: Throwable? = null,
) : HReqContext,
ErrorCombinable>,
Combinable, SerializeInput> {
override fun plus(e: Throwable?) = copy(error = e.suppressing(error))
override fun plus(value: SerializeInput) = copy(
highLevelRequest = value.highLevelRequest,
serializeSchema = value.serializeSchema,
)
}
internal operator fun HReqContext.plus(lowLevelRequest: LReq) =
LReqContextImpl(highLevelRequest, serializeSchema, mapperContext, lowLevelRequest, error)
© 2015 - 2024 Weber Informatics LLC | Privacy Policy