var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
import { SERVICE_CALLS } from "./service-calls";
import { AbstractService } from "@iotize/tap";
var FirmwareService = /** @class */ (function (_super) {
    __extends(FirmwareService, _super);
    function FirmwareService() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.resources = SERVICE_CALLS;
        return _this;
    }
    /**
     * Firmware package
     *
     * LWM2M path: /5//0
     *
     * @deprecated
     * @tapVersion(">=")
     * @return
     */
    FirmwareService.prototype.postPackage = function () {
        return this.serviceCallRunner.execute(this.postPackageCall());
    };
    /**
     *
     *
     * LWM2M path: /5//0
     *
     * @deprecated
     * @tapVersion(">=")
     * @return call options
     */
    FirmwareService.prototype.postPackageCall = function () {
        var callOptions = __assign({}, this.resources.postPackage);
        return callOptions;
    };
    /**
     * Update
     *
     * LWM2M path: /5//2
     *
     * @deprecated
     * @tapVersion(">=")
     * @return
     */
    FirmwareService.prototype.postUpdate = function () {
        return this.serviceCallRunner.execute(this.postUpdateCall());
    };
    /**
     *
     *
     * LWM2M path: /5//2
     *
     * @deprecated
     * @tapVersion(">=")
     * @return call options
     */
    FirmwareService.prototype.postUpdateCall = function () {
        var callOptions = __assign({}, this.resources.postUpdate);
        return callOptions;
    };
    /**
     * Get state
     *
     * LWM2M path: /5//3
     *
     * @deprecated
     * @tapVersion(">=")
     * @return
     */
    FirmwareService.prototype.getState = function () {
        return this.serviceCallRunner.execute(this.getStateCall());
    };
    /**
     *
     *
     * LWM2M path: /5//3
     *
     * @deprecated
     * @tapVersion(">=")
     * @return call options
     */
    FirmwareService.prototype.getStateCall = function () {
        var callOptions = __assign({}, this.resources.getState);
        return callOptions;
    };
    /**
     * Check CRC
     *
     * LWM2M path: /5//6
     *
     * @deprecated
     * @tapVersion(">=")
     * @param data input
     * @return
     */
    FirmwareService.prototype.postCrcCheck = function (
    /*
     *
     */
    data) {
        return this.serviceCallRunner.execute(this.postCrcCheckCall(data));
    };
    /**
     *
     *
     * LWM2M path: /5//6
     *
     * @deprecated
     * @tapVersion(">=")
     * @param data input
     * @return call options
     */
    FirmwareService.prototype.postCrcCheckCall = function (
    /*
     *
     */
    data) {
        var callOptions = __assign({}, this.resources.postCrcCheck);
        callOptions.body = data;
        return callOptions;
    };
    return FirmwareService;
}(AbstractService));
export { FirmwareService };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0Bpb3RpemUvdGFwL3NlcnZpY2UvaW1wbC9maXJtd2FyZS8iLCJzb3VyY2VzIjpbImxpYi9nZW5lcmF0ZWQvc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFJQSxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFJaEQsT0FBTyxFQUFFLGVBQWUsRUFBbUIsTUFBTSxhQUFhLENBQUM7QUFFL0Q7SUFBcUMsbUNBQWU7SUFBcEQ7UUFBQSxxRUFnSUM7UUEvSFEsZUFBUyxHQUFHLGFBQWEsQ0FBQzs7SUErSG5DLENBQUM7SUE3SEM7Ozs7Ozs7O09BUUc7SUFDSCxxQ0FBVyxHQUFYO1FBQ0UsT0FBTyx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