import * as tslib_1 from "tslib";
import { tap } from 'rxjs/operators';
import { createLogger } from '../../../logger/logger';
import { createKeyAttributes } from '../../../mapper';
import { WriteRequest } from '../write.request';
var DeleteRequest = /** @class */ (function (_super) {
    tslib_1.__extends(DeleteRequest, _super);
    function DeleteRequest(dynamoRx, modelClazz, partitionKey, sortKey) {
        var _this = _super.call(this, dynamoRx, modelClazz) || this;
        _this.logger = createLogger('dynamo.request.DeleteRequest', modelClazz);
        _this.params.Key = createKeyAttributes(_this.metadata, partitionKey, sortKey);
        return _this;
    }
    DeleteRequest.prototype.execFullResponse = function () {
        var _this = this;
        this.logger.debug('request', this.params);
        return this.dynamoRx.deleteItem(this.params).pipe(tap(function (response) { return _this.logger.debug('response', response); }));
    };
    return DeleteRequest;
}(WriteRequest));
export { DeleteRequest };
//# sourceMappingURL=delete.request.js.map