"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 VariableService = /** @class */ (function (_super) {
    __extends(VariableService, _super);
    function VariableService(client, apiConfig) {
        var _this = _super.call(this, client, apiConfig) || this;
        _this.resources = {
            'create': {
                path: "/variable/{variableId}/create",
                methodType: "post"
            },
            'getAddress': {
                path: "/variable/{variableId}/address",
                methodType: "get",
                returnTypeConverter: "integer_uint32"
            },
            'getBundleId': {
                path: "/variable/{variableId}/bundle/id",
                methodType: "get",
                returnTypeConverter: "integer_uint16"
            },
            'getBundleValues': {
                path: "/variable/{variableId}/bundle/values",
                methodType: "get",
                returnTypeConverter: "Bytes"
            },
            'getCurrentAccess': {
                path: "/variable/{variableId}/current-access",
                methodType: "get",
                returnTypeConverter: "ReadWriteRights"
            },
            'getFormat': {
                path: "/variable/{variableId}/format",
                methodType: "get",
                returnTypeConverter: "VariableFormat"
            },
            'getNumberOfElements': {
                path: "/variable/{variableId}/number-of-elements",
                methodType: "get",
                returnTypeConverter: "integer_uint8"
            },
            'getValue': {
                path: "/variable/{variableId}/value",
                methodType: "get",
                returnTypeConverter: "Bytes"
            },
            'putAddress': {
                path: "/variable/{variableId}/address",
                methodType: "put",
                bodyEncoder: "integer_uint32"
            },
            'putBundleId': {
                path: "/variable/{variableId}/bundle/id",
                methodType: "put",
                bodyEncoder: "integer_uint32"
            },
            'putFormat': {
                path: "/variable/{variableId}/format",
                methodType: "put",
                bodyEncoder: "VariableFormat"
            },
            'putNumberOfElements': {
                path: "/variable/{variableId}/number-of-elements",
                methodType: "put",
                bodyEncoder: "integer_uint8"
            },
            'putValue': {
                path: "/variable/{variableId}/value",
                methodType: "put",
                bodyEncoder: "Bytes"
            },
            'readProfile': {
                path: "/variable/read-profile",
                methodType: "get",
                returnTypeConverter: "Bytes"
            },
            'setValue': {
                path: "/variable/{variableId}/set-value",
                methodType: "post",
                bodyEncoder: "Bytes"
            },
        };
        return _this;
    }
    /**
    * Write variable bundle id
    * Create a variable
    * LWM2M path: /1029/{variableId}/65535

    * @tapVersion(">=1.0")
    *
    * @param variableId input
    * @return void api call
    */
    VariableService.prototype.create = function (variableId) {
        var callOptions = this.resources.create;
        callOptions.pathParameters = {
            "variableId": variableId,
        };
        return this._call(callOptions);
    };
    /**
    * Get variable address
    *
    * LWM2M path: /1029/{variableId}/0

    * @tapVersion(">=1.0")
    *
    * @param variableId input
    * @return number api call
    */
    VariableService.prototype.getAddress = function (variableId) {
        var callOptions = this.resources.getAddress;
        callOptions.pathParameters = {
            "variableId": variableId,
        };
        return this._call(callOptions);
    };
    /**
    * Get variable bundle id
    * ID du bundle qui contient la variable
    * LWM2M path: /1029/{variableId}/6

    * @tapVersion(">=1.0")
    *
    * @param variableId input
    * @return number api call
    */
    VariableService.prototype.getBundleId = function (variableId) {
        var callOptions = this.resources.getBundleId;
        callOptions.pathParameters = {
            "variableId": variableId,
        };
        return this._call(callOptions);
    };
    /**
    * Get variable bundle values (formated as a TLV)
    *
    * LWM2M path: /1029/{variableId}/7

    * @tapVersion(">=1.0")
    *
    * @param variableId input
    * @return Uint8Array api call
    */
    VariableService.prototype.getBundleValues = function (variableId) {
        var callOptions = this.resources.getBundleValues;
        callOptions.pathParameters = {
            "variableId": variableId,
        };
        return this._call(callOptions);
    };
    /**
    * Get access rights for the variable
    * Get access rights for the variable (read and write)
    * LWM2M path: /1029/{variableId}/3

    * @tapVersion(">=1.0")
    *
    * @param variableId input
    * @return ReadWriteRights api call
    */
    VariableService.prototype.getCurrentAccess = function (variableId) {
        var callOptions = this.resources.getCurrentAccess;
        callOptions.pathParameters = {
            "variableId": variableId,
        };
        return this._call(callOptions);
    };
    /**
    * Get data format for variable
    *
    * LWM2M path: /1029/{variableId}/1

    * @tapVersion(">=1.0")
    *
    * @param variableId input
    * @return VariableFormat api call
    */
    VariableService.prototype.getFormat = function (variableId) {
        var callOptions = this.resources.getFormat;
        callOptions.pathParameters = {
            "variableId": variableId,
        };
        return this._call(callOptions);
    };
    /**
    * Get variable array size
    * Get the number of element of the variable
    * LWM2M path: /1029/{variableId}/2

    * @tapVersion(">=1.0")
    *
    * @param variableId input
    * @return number api call
    */
    VariableService.prototype.getNumberOfElements = function (variableId) {
        var callOptions = this.resources.getNumberOfElements;
        callOptions.pathParameters = {
            "variableId": variableId,
        };
        return this._call(callOptions);
    };
    /**
    * Get variable value
    * Value of array of values. The size depends of variable format
    * LWM2M path: /1029/{variableId}/4

    * @tapVersion(">=1.0")
    *
    * @param variableId input
    * @return Uint8Array api call
    */
    VariableService.prototype.getValue = function (variableId) {
        var callOptions = this.resources.getValue;
        callOptions.pathParameters = {
            "variableId": variableId,
        };
        return this._call(callOptions);
    };
    /**
    * Write variable address
    *
    * LWM2M path: /1029/{variableId}/0
    * Body converter id: "integer_uint32"

    * @tapVersion(">=1.0")
    *
    * @param variableId input

    * @tapVersion(">=1.0")
    *
    * @param address input
    * @return void api call
    */
    VariableService.prototype.putAddress = function (variableId, address) {
        var callOptions = this.resources.putAddress;
        callOptions.body = address;
        callOptions.pathParameters = {
            "variableId": variableId,
        };
        return this._call(callOptions);
    };
    /**
    * Write variable bundle id
    *
    * LWM2M path: /1029/{variableId}/6
    * Body converter id: "integer_uint32"

    * @tapVersion(">=1.0")
    *
    * @param variableId input

    * @tapVersion(">=1.0")
    *
    * @param value input
    * @return void api call
    */
    VariableService.prototype.putBundleId = function (variableId, value) {
        var callOptions = this.resources.putBundleId;
        callOptions.body = value;
        callOptions.pathParameters = {
            "variableId": variableId,
        };
        return this._call(callOptions);
    };
    /**
    * Set data format of the variable
    *
    * LWM2M path: /1029/{variableId}/1
    * Body converter id: "VariableFormat"

    * @tapVersion(">=1.0")
    *
    * @param variableId input

    * @tapVersion(">=1.0")
    *
    * @param value input
    * @return void api call
    */
    VariableService.prototype.putFormat = function (variableId, value) {
        var callOptions = this.resources.putFormat;
        callOptions.body = value;
        callOptions.pathParameters = {
            "variableId": variableId,
        };
        return this._call(callOptions);
    };
    /**
    * Write variable array size
    * Set the number of element of the variable
    * LWM2M path: /1029/{variableId}/2
    * Body converter id: "integer_uint8"

    * @tapVersion(">=1.0")
    *
    * @param variableId input

    * @tapVersion(">=1.0")
    *
    * @param value input
    * @return void api call
    */
    VariableService.prototype.putNumberOfElements = function (variableId, value) {
        var callOptions = this.resources.putNumberOfElements;
        callOptions.body = value;
        callOptions.pathParameters = {
            "variableId": variableId,
        };
        return this._call(callOptions);
    };
    /**
    * Set variable value
    *
    * LWM2M path: /1029/{variableId}/4
    * Body converter id: "Bytes"

    * @tapVersion(">=1.0")
    *
    * @param variableId input

    * @tapVersion(">=1.0")
    *
    * @param value input
    * @return void api call
    */
    VariableService.prototype.putValue = function (variableId, value) {
        var callOptions = this.resources.putValue;
        callOptions.body = value;
        callOptions.pathParameters = {
            "variableId": variableId,
        };
        return this._call(callOptions);
    };
    /**
    * Get all variable values for the current profile
    *
    * LWM2M path: /1029//4
    * @return Uint8Array api call
    */
    VariableService.prototype.readProfile = function () {
        var callOptions = this.resources.readProfile;
        return this._call(callOptions);
    };
    /**
    * Set variable value
    * Difference with put ?
    * LWM2M path: /1029/{variableId}/5
    * Body converter id: "Bytes"

    * @tapVersion(">=1.0")
    *
    * @param variableId input

    * @tapVersion(">=1.0")
    *
    * @param value input
    * @return void api call
    */
    VariableService.prototype.setValue = function (variableId, value) {
        var callOptions = this.resources.setValue;
        callOptions.body = value;
        callOptions.pathParameters = {
            "variableId": variableId,
        };
        return this._call(callOptions);
    };
    return VariableService;
}(abstract_service_1.AbstractService));
exports.VariableService = VariableService;
