import { toDb } from '../../mapper';
import { createIfNotExistsCondition } from '../expression/create-if-not-exists-condition.function';
import { TransactBaseOperation } from './transact-base-operation';
export class TransactPut extends TransactBaseOperation {
    constructor(modelClazz, item) {
        super(modelClazz);
        this.params.Item = toDb(item, this.modelClazz);
    }
    ifNotExists(predicate = true) {
        if (predicate) {
            this.onlyIf(...createIfNotExistsCondition(this.metadata));
        }
        return this;
    }
    get transactItem() {
        return {
            Put: Object.assign({}, this.params),
        };
    }
}
//# sourceMappingURL=transact-put.js.map