"use strict";
/**
 * This file has been generated
 * DO NOT EDIT, IT MAY BE OVERWRITTEN
 */
var __extends = (this && this.__extends) || (function () {
    var 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 function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var abstract_service_1 = require("../abstract-service");
var FirmwareService = /** @class */ (function (_super) {
    __extends(FirmwareService, _super);
    function FirmwareService(client, apiConfig) {
        var _this = _super.call(this, client, apiConfig) || this;
        _this.resources = {
            'getState': {
                path: "/firmware/state",
                methodType: "GET",
                returnTypeConverter: "FirmwareState"
            },
            'postCrcCheck': {
                path: "/firmware/crc-check",
                methodType: "POST",
                returnTypeConverter: "Bytes",
                bodyEncoder: "CrcCheckBody"
            },
            'postPackage': {
                path: "/firmware/package",
                methodType: "POST"
            },
            'postUpdate': {
                path: "/firmware/update",
                methodType: "POST"
            },
        };
        return _this;
    }
    /**
    * Get state
    *
    * LWM2M path: /5//3
    * @deprecated
    * @tapVersion(">=1.0")
    * @return FirmwareState api call
    */
    FirmwareService.prototype.getState = function () {
        var callOptions = this.getStateCall();
        return this._call(callOptions);
    };
    /**
    * Get state
    *
    * LWM2M path: /5//3
    * @deprecated
    * @tapVersion(">=1.0")
    * @return call options
    */
    FirmwareService.prototype.getStateCall = function () {
        var callOptions = this.resources.getState;
        return callOptions;
    };
    /**
    * Check CRC
    * Compare le CRC attendu au CRC de la zone référencée. Modifie le Update Result (resource /5//5) à 1 si OK ou 5 si NG.
    * LWM2M path: /5//6
    * Body converter id: "CrcCheckBody"
    * @deprecated
    * @tapVersion(">=1.0")
    * @param data input
    * @return Uint8Array api call
    */
    FirmwareService.prototype.postCrcCheck = function (data) {
        var callOptions = this.postCrcCheckCall(data);
        return this._call(callOptions);
    };
    /**
    * Check CRC
    * Compare le CRC attendu au CRC de la zone référencée. Modifie le Update Result (resource /5//5) à 1 si OK ou 5 si NG.
    * LWM2M path: /5//6
    * Body converter id: "CrcCheckBody"
    * @deprecated
    * @tapVersion(">=1.0")
    * @param data input
    * @return call options
    */
    FirmwareService.prototype.postCrcCheckCall = function (data) {
        var callOptions = this.resources.postCrcCheck;
        callOptions.body = data;
        callOptions.pathParameters = {};
        return callOptions;
    };
    /**
    * Firmware package
    * Firmware package : actif uniquement en mode update. Permet de transférer les données à programmer en flash pour l&#39;update firmware.
    * LWM2M path: /5//0
    * @deprecated
    * @tapVersion(">=1.0")
    * @return void api call
    */
    FirmwareService.prototype.postPackage = function () {
        var callOptions = this.postPackageCall();
        return this._call(callOptions);
    };
    /**
    * Firmware package
    * Firmware package : actif uniquement en mode update. Permet de transférer les données à programmer en flash pour l&#39;update firmware.
    * LWM2M path: /5//0
    * @deprecated
    * @tapVersion(">=1.0")
    * @return call options
    */
    FirmwareService.prototype.postPackageCall = function () {
        var callOptions = this.resources.postPackage;
        return callOptions;
    };
    /**
    * Update
    * Contrôle de l&#39;update: passage en mode update/updater/normal. Param: état futur souhaité. Actif uniquement si loggé en admin. (plus autres contraintes à définir: CRC check fait, etc.) Peut nécessiter un Reset du module
    * LWM2M path: /5//2
    * @deprecated
    * @tapVersion(">=1.0")
    * @return void api call
    */
    FirmwareService.prototype.postUpdate = function () {
        var callOptions = this.postUpdateCall();
        return this._call(callOptions);
    };
    /**
    * Update
    * Contrôle de l&#39;update: passage en mode update/updater/normal. Param: état futur souhaité. Actif uniquement si loggé en admin. (plus autres contraintes à définir: CRC check fait, etc.) Peut nécessiter un Reset du module
    * LWM2M path: /5//2
    * @deprecated
    * @tapVersion(">=1.0")
    * @return call options
    */
    FirmwareService.prototype.postUpdateCall = function () {
        var callOptions = this.resources.postUpdate;
        return callOptions;
    };
    return FirmwareService;
}(abstract_service_1.AbstractService));
exports.FirmwareService = FirmwareService;
