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 DataLogService = /** @class */ (function (_super) {
    __extends(DataLogService, _super);
    function DataLogService() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.resources = SERVICE_CALLS;
        return _this;
    }
    /**
     * Get the maximum number of packet
     *
     * LWM2M path: /1024//23
     *
     * @tapVersion(">=")
     * @return
     */
    DataLogService.prototype.getMaxPacketCount = function () {
        return this.serviceCallRunner.execute(this.getMaxPacketCountCall());
    };
    /**
     *
     *
     * LWM2M path: /1024//23
     *
     * @tapVersion(">=")
     * @return call options
     */
    DataLogService.prototype.getMaxPacketCountCall = function () {
        var callOptions = __assign({}, this.resources.getMaxPacketCount);
        return callOptions;
    };
    /**
     * Returns true is data log acquisition is running
     *
     * LWM2M path: /1031//0
     *
     * @tapVersion(">=")
     * @return
     */
    DataLogService.prototype.isRunning = function () {
        return this.serviceCallRunner.execute(this.isRunningCall());
    };
    /**
     *
     *
     * LWM2M path: /1031//0
     *
     * @tapVersion(">=")
     * @return call options
     */
    DataLogService.prototype.isRunningCall = function () {
        var callOptions = __assign({}, this.resources.isRunning);
        return callOptions;
    };
    /**
     * Run data-log acquisition
     *
     * LWM2M path: /1031//0
     *
     * @tapVersion(">=")
     * @return
     */
    DataLogService.prototype.run = function () {
        return this.serviceCallRunner.execute(this.runCall());
    };
    /**
     *
     *
     * LWM2M path: /1031//0
     *
     * @tapVersion(">=")
     * @return call options
     */
    DataLogService.prototype.runCall = function () {
        var callOptions = __assign({}, this.resources.run);
        return callOptions;
    };
    /**
     * Stop data-log acquisition
     *
     * LWM2M path: /1031//1
     *
     * @tapVersion(">=")
     * @return
     */
    DataLogService.prototype.stop = function () {
        return this.serviceCallRunner.execute(this.stopCall());
    };
    /**
     *
     *
     * LWM2M path: /1031//1
     *
     * @tapVersion(">=")
     * @return call options
     */
    DataLogService.prototype.stopCall = function () {
        var callOptions = __assign({}, this.resources.stop);
        return callOptions;
    };
    /**
     * Get data log options
     *
     * LWM2M path: /1031//2
     *
     * @tapVersion(">=")
     * @return
     */
    DataLogService.prototype.getOptions = function () {
        return this.serviceCallRunner.execute(this.getOptionsCall());
    };
    /**
     *
     *
     * LWM2M path: /1031//2
     *
     * @tapVersion(">=")
     * @return call options
     */
    DataLogService.prototype.getOptionsCall = function () {
        var callOptions = __assign({}, this.resources.getOptions);
        return callOptions;
    };
    /**
     * Write data log option
     *
     * LWM2M path: /1031//2
     *
     * @tapVersion(">=")
     * @param value input
     * @return
     */
    DataLogService.prototype.putOptions = function (
    /*
     *
     */
    value) {
        return this.serviceCallRunner.execute(this.putOptionsCall(value));
    };
    /**
     *
     *
     * LWM2M path: /1031//2
     *
     * @tapVersion(">=")
     * @param value input
     * @return call options
     */
    DataLogService.prototype.putOptionsCall = function (
    /*
     *
     */
    value) {
        var callOptions = __assign({}, this.resources.putOptions);
        callOptions.body = value;
        return callOptions;
    };
    /**
     * Write data log crypto key
     *
     * LWM2M path: /1031//3
     *
     * @tapVersion(">=")
     * @param value input
     * @return
     */
    DataLogService.prototype.putCryptoKey = function (
    /*
     *
     */
    value) {
        return this.serviceCallRunner.execute(this.putCryptoKeyCall(value));
    };
    /**
     *
     *
     * LWM2M path: /1031//3
     *
     * @tapVersion(">=")
     * @param value input
     * @return call options
     */
    DataLogService.prototype.putCryptoKeyCall = function (
    /*
     *
     */
    value) {
        var callOptions = __assign({}, this.resources.putCryptoKey);
        callOptions.body = value;
        return callOptions;
    };
    /**
     * Flush data log packets
     *
     * LWM2M path: /1031//4
     *
     * @tapVersion(">=")
     * @return
     */
    DataLogService.prototype.flush = function () {
        return this.serviceCallRunner.execute(this.flushCall());
    };
    /**
     *
     *
     * LWM2M path: /1031//4
     *
     * @tapVersion(">=")
     * @return call options
     */
    DataLogService.prototype.flushCall = function () {
        var callOptions = __assign({}, this.resources.flush);
        return callOptions;
    };
    /**
     * Get number of pending data-log packet
     *
     * LWM2M path: /1031//10
     *
     * @tapVersion(">=")
     * @return
     */
    DataLogService.prototype.getPacketCount = function () {
        return this.serviceCallRunner.execute(this.getPacketCountCall());
    };
    /**
     *
     *
     * LWM2M path: /1031//10
     *
     * @tapVersion(">=")
     * @return call options
     */
    DataLogService.prototype.getPacketCountCall = function () {
        var callOptions = __assign({}, this.resources.getPacketCount);
        return callOptions;
    };
    /**
     * Dequeue one packet
     *
     * LWM2M path: /1031//11
     *
     * @tapVersion(">=")
     * @return
     */
    DataLogService.prototype.dequeueOnePacket = function () {
        return this.serviceCallRunner.execute(this.dequeueOnePacketCall());
    };
    /**
     *
     *
     * LWM2M path: /1031//11
     *
     * @tapVersion(">=")
     * @return call options
     */
    DataLogService.prototype.dequeueOnePacketCall = function () {
        var callOptions = __assign({}, this.resources.dequeueOnePacket);
        return callOptions;
    };
    return DataLogService;
}(AbstractService));
export { DataLogService };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0Bpb3RpemUvdGFwL3NlcnZpY2UvaW1wbC9kYXRhLWxvZy8iLCJzb3VyY2VzIjpbImxpYi9nZW5lcmF0ZWQvc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs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