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 VariableService = /** @class */ (function (_super) {
    __extends(VariableService, _super);
    function VariableService() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.resources = SERVICE_CALLS;
        return _this;
    }
    /**
     * Get variable address
     *
     * LWM2M path: /1029/{variableId}/0
     *
     * @tapVersion(">=")
     * @param variableId input
     * @return
     */
    VariableService.prototype.getVariableAddress = function (
    /*
     * ID of the variable
     */
    variableId) {
        return this.serviceCallRunner.execute(this.getVariableAddressCall(variableId));
    };
    /**
     *
     *
     * LWM2M path: /1029/{variableId}/0
     *
     * @tapVersion(">=")
     * @param variableId input
     * @return call options
     */
    VariableService.prototype.getVariableAddressCall = function (
    /*
     * ID of the variable
     */
    variableId) {
        var callOptions = __assign({}, this.resources.getVariableAddress);
        callOptions.pathParameters = {
            variableId: variableId
        };
        return callOptions;
    };
    /**
     * Write variable address
     *
     * LWM2M path: /1029/{variableId}/0
     *
     * @tapVersion(">=")
     * @param variableId input
     * @param address input
     * @return
     */
    VariableService.prototype.putVariableAddress = function (
    /*
     * ID of the variable
     */
    variableId, 
    /*
     * New address of the variable
     */
    address) {
        return this.serviceCallRunner.execute(this.putVariableAddressCall(variableId, address));
    };
    /**
     *
     *
     * LWM2M path: /1029/{variableId}/0
     *
     * @tapVersion(">=")
     * @param variableId input
     * @param address input
     * @return call options
     */
    VariableService.prototype.putVariableAddressCall = function (
    /*
     * ID of the variable
     */
    variableId, 
    /*
     * New address of the variable
     */
    address) {
        var callOptions = __assign({}, this.resources.putVariableAddress);
        callOptions.body = address;
        callOptions.pathParameters = {
            variableId: variableId
        };
        return callOptions;
    };
    /**
     * Write modbus variable address
     *
     * LWM2M path: /1029/{variableId}/0
     *
     * @tapVersion(">=")
     * @param variableId input
     * @param address input
     * @return
     */
    VariableService.prototype.putModbusVariableAddress = function (
    /*
     * ID of the variable
     */
    variableId, 
    /*
     * New address of the variable
     */
    address) {
        return this.serviceCallRunner.execute(this.putModbusVariableAddressCall(variableId, address));
    };
    /**
     *
     *
     * LWM2M path: /1029/{variableId}/0
     *
     * @tapVersion(">=")
     * @param variableId input
     * @param address input
     * @return call options
     */
    VariableService.prototype.putModbusVariableAddressCall = function (
    /*
     * ID of the variable
     */
    variableId, 
    /*
     * New address of the variable
     */
    address) {
        var callOptions = __assign({}, this.resources.putModbusVariableAddress);
        callOptions.body = address;
        callOptions.pathParameters = {
            variableId: variableId
        };
        return callOptions;
    };
    /**
     * Get data type for variable
     *
     * LWM2M path: /1029/{variableId}/1
     *
     * @tapVersion(">=")
     * @param variableId input
     * @return
     */
    VariableService.prototype.getType = function (
    /*
     * ID of the variable
     */
    variableId) {
        return this.serviceCallRunner.execute(this.getTypeCall(variableId));
    };
    /**
     *
     *
     * LWM2M path: /1029/{variableId}/1
     *
     * @tapVersion(">=")
     * @param variableId input
     * @return call options
     */
    VariableService.prototype.getTypeCall = function (
    /*
     * ID of the variable
     */
    variableId) {
        var callOptions = __assign({}, this.resources.getType);
        callOptions.pathParameters = {
            variableId: variableId
        };
        return callOptions;
    };
    /**
     * Get data type for variable
     *
     * LWM2M path: /1029/{variableId}/1
     *
     * @tapVersion(">=")
     * @param variableId input
     * @param type input
     * @return
     */
    VariableService.prototype.putType = function (
    /*
     * ID of the variable
     */
    variableId, 
    /*
     * variable type
     */
    type) {
        return this.serviceCallRunner.execute(this.putTypeCall(variableId, type));
    };
    /**
     *
     *
     * LWM2M path: /1029/{variableId}/1
     *
     * @tapVersion(">=")
     * @param variableId input
     * @param type input
     * @return call options
     */
    VariableService.prototype.putTypeCall = function (
    /*
     * ID of the variable
     */
    variableId, 
    /*
     * variable type
     */
    type) {
        var callOptions = __assign({}, this.resources.putType);
        callOptions.body = type;
        callOptions.pathParameters = {
            variableId: variableId
        };
        return callOptions;
    };
    /**
     * Get variable meta
     *
     * LWM2M path: /1029/{variableId}/8
     *
     * @tapVersion(">=1.73")
     * @param variableId input
     * @return
     */
    VariableService.prototype.getRawMeta = function (
    /*
     * ID of the variable
     */
    variableId) {
        return this.serviceCallRunner.execute(this.getRawMetaCall(variableId));
    };
    /**
     *
     *
     * LWM2M path: /1029/{variableId}/8
     *
     * @tapVersion(">=1.73")
     * @param variableId input
     * @return call options
     */
    VariableService.prototype.getRawMetaCall = function (
    /*
     * ID of the variable
     */
    variableId) {
        var callOptions = __assign({}, this.resources.getRawMeta);
        callOptions.pathParameters = {
            variableId: variableId
        };
        return callOptions;
    };
    /**
     * Write variable meta
     *
     * LWM2M path: /1029/{variableId}/8
     *
     * @tapVersion(">=1.73")
     * @param variableId input
     * @param meta input
     * @return
     */
    VariableService.prototype.putRawMeta = function (
    /*
     * ID of the variable
     */
    variableId, 
    /*
     * Variable meta
     */
    meta) {
        return this.serviceCallRunner.execute(this.putRawMetaCall(variableId, meta));
    };
    /**
     *
     *
     * LWM2M path: /1029/{variableId}/8
     *
     * @tapVersion(">=1.73")
     * @param variableId input
     * @param meta input
     * @return call options
     */
    VariableService.prototype.putRawMetaCall = function (
    /*
     * ID of the variable
     */
    variableId, 
    /*
     * Variable meta
     */
    meta) {
        var callOptions = __assign({}, this.resources.putRawMeta);
        callOptions.body = meta;
        callOptions.pathParameters = {
            variableId: variableId
        };
        return callOptions;
    };
    /**
     * Get variable meta
     *
     * LWM2M path: /1029/{variableId}/8
     *
     * @tapVersion(">=1.73")
     * @param variableId input
     * @return
     */
    VariableService.prototype.getMeta = function (
    /*
     * ID of the variable
     */
    variableId) {
        return this.serviceCallRunner.execute(this.getMetaCall(variableId));
    };
    /**
     *
     *
     * LWM2M path: /1029/{variableId}/8
     *
     * @tapVersion(">=1.73")
     * @param variableId input
     * @return call options
     */
    VariableService.prototype.getMetaCall = function (
    /*
     * ID of the variable
     */
    variableId) {
        var callOptions = __assign({}, this.resources.getMeta);
        callOptions.pathParameters = {
            variableId: variableId
        };
        return callOptions;
    };
    /**
     * Write variable meta
     *
     * LWM2M path: /1029/{variableId}/8
     *
     * @tapVersion(">=1.73")
     * @param variableId input
     * @param meta input
     * @return
     */
    VariableService.prototype.putMeta = function (
    /*
     * ID of the variable
     */
    variableId, 
    /*
     * Variable meta
     */
    meta) {
        return this.serviceCallRunner.execute(this.putMetaCall(variableId, meta));
    };
    /**
     *
     *
     * LWM2M path: /1029/{variableId}/8
     *
     * @tapVersion(">=1.73")
     * @param variableId input
     * @param meta input
     * @return call options
     */
    VariableService.prototype.putMetaCall = function (
    /*
     * ID of the variable
     */
    variableId, 
    /*
     * Variable meta
     */
    meta) {
        var callOptions = __assign({}, this.resources.putMeta);
        callOptions.body = meta;
        callOptions.pathParameters = {
            variableId: variableId
        };
        return callOptions;
    };
    /**
     * Get variable unit
     *
     * LWM2M path: /1029/{variableId}/9
     *
     * @deprecated
     * @tapVersion(">=1.60")
     * @param variableId input
     * @return
     */
    VariableService.prototype.getUnit = function (
    /*
     * Variable id
     */
    variableId) {
        return this.serviceCallRunner.execute(this.getUnitCall(variableId));
    };
    /**
     *
     *
     * LWM2M path: /1029/{variableId}/9
     *
     * @deprecated
     * @tapVersion(">=1.60")
     * @param variableId input
     * @return call options
     */
    VariableService.prototype.getUnitCall = function (
    /*
     * Variable id
     */
    variableId) {
        var callOptions = __assign({}, this.resources.getUnit);
        callOptions.pathParameters = {
            variableId: variableId
        };
        return callOptions;
    };
    /**
     * Write variable unit
     *
     * LWM2M path: /1029/{variableId}/9
     *
     * @deprecated
     * @tapVersion(">=1.60")
     * @param variableId input
     * @param address input
     * @return
     */
    VariableService.prototype.putUnit = function (
    /*
     * ID of the variable
     */
    variableId, 
    /*
     * Variable unit
     */
    address) {
        return this.serviceCallRunner.execute(this.putUnitCall(variableId, address));
    };
    /**
     *
     *
     * LWM2M path: /1029/{variableId}/9
     *
     * @deprecated
     * @tapVersion(">=1.60")
     * @param variableId input
     * @param address input
     * @return call options
     */
    VariableService.prototype.putUnitCall = function (
    /*
     * ID of the variable
     */
    variableId, 
    /*
     * Variable unit
     */
    address) {
        var callOptions = __assign({}, this.resources.putUnit);
        callOptions.body = address;
        callOptions.pathParameters = {
            variableId: variableId
        };
        return callOptions;
    };
    /**
     * Get variable array size
     *
     * LWM2M path: /1029/{variableId}/2
     *
     * @tapVersion(">=")
     * @param variableId input
     * @return
     */
    VariableService.prototype.getNumberOfElements = function (
    /*
     * ID of the variable
     */
    variableId) {
        return this.serviceCallRunner.execute(this.getNumberOfElementsCall(variableId));
    };
    /**
     *
     *
     * LWM2M path: /1029/{variableId}/2
     *
     * @tapVersion(">=")
     * @param variableId input
     * @return call options
     */
    VariableService.prototype.getNumberOfElementsCall = function (
    /*
     * ID of the variable
     */
    variableId) {
        var callOptions = __assign({}, this.resources.getNumberOfElements);
        callOptions.pathParameters = {
            variableId: variableId
        };
        return callOptions;
    };
    /**
     * Write variable array size
     *
     * LWM2M path: /1029/{variableId}/2
     *
     * @tapVersion(">=")
     * @param variableId input
     * @param value input
     * @return
     */
    VariableService.prototype.putNumberOfElements = function (
    /*
     * ID of the variable
     */
    variableId, 
    /*
     * New number of element for this variable
     */
    value) {
        return this.serviceCallRunner.execute(this.putNumberOfElementsCall(variableId, value));
    };
    /**
     *
     *
     * LWM2M path: /1029/{variableId}/2
     *
     * @tapVersion(">=")
     * @param variableId input
     * @param value input
     * @return call options
     */
    VariableService.prototype.putNumberOfElementsCall = function (
    /*
     * ID of the variable
     */
    variableId, 
    /*
     * New number of element for this variable
     */
    value) {
        var callOptions = __assign({}, this.resources.putNumberOfElements);
        callOptions.body = value;
        callOptions.pathParameters = {
            variableId: variableId
        };
        return callOptions;
    };
    /**
     * Get access rights for the variable
     *
     * LWM2M path: /1029/{variableId}/3
     *
     * @tapVersion(">=")
     * @param variableId input
     * @return
     */
    VariableService.prototype.getCurrentAccess = function (
    /*
     * ID of the variable
     */
    variableId) {
        return this.serviceCallRunner.execute(this.getCurrentAccessCall(variableId));
    };
    /**
     *
     *
     * LWM2M path: /1029/{variableId}/3
     *
     * @tapVersion(">=")
     * @param variableId input
     * @return call options
     */
    VariableService.prototype.getCurrentAccessCall = function (
    /*
     * ID of the variable
     */
    variableId) {
        var callOptions = __assign({}, this.resources.getCurrentAccess);
        callOptions.pathParameters = {
            variableId: variableId
        };
        return callOptions;
    };
    /**
     * Get all variable values for the current profile
     *
     * LWM2M path: /1029//4
     *
     * @tapVersion(">=")
     * @return
     */
    VariableService.prototype.readProfile = function () {
        return this.serviceCallRunner.execute(this.readProfileCall());
    };
    /**
     *
     *
     * LWM2M path: /1029//4
     *
     * @tapVersion(">=")
     * @return call options
     */
    VariableService.prototype.readProfileCall = function () {
        var callOptions = __assign({}, this.resources.readProfile);
        return callOptions;
    };
    /**
     * Get variable value
     *
     * LWM2M path: /1029/{variableId}/4
     *
     * @tapVersion(">=")
     * @param variableId input
     * @return
     */
    VariableService.prototype.getValue = function (
    /*
     * ID of the variable
     */
    variableId) {
        return this.serviceCallRunner.execute(this.getValueCall(variableId));
    };
    /**
     *
     *
     * LWM2M path: /1029/{variableId}/4
     *
     * @tapVersion(">=")
     * @param variableId input
     * @return call options
     */
    VariableService.prototype.getValueCall = function (
    /*
     * ID of the variable
     */
    variableId) {
        var callOptions = __assign({}, this.resources.getValue);
        callOptions.pathParameters = {
            variableId: variableId
        };
        return callOptions;
    };
    /**
     * Set variable value
     *
     * LWM2M path: /1029/{variableId}/5
     *
     * @tapVersion(">=")
     * @param variableId input
     * @param value input
     * @return
     */
    VariableService.prototype.setValue = function (
    /*
     * ID of the variable
     */
    variableId, 
    /*
     *
     */
    value) {
        return this.serviceCallRunner.execute(this.setValueCall(variableId, value));
    };
    /**
     *
     *
     * LWM2M path: /1029/{variableId}/5
     *
     * @tapVersion(">=")
     * @param variableId input
     * @param value input
     * @return call options
     */
    VariableService.prototype.setValueCall = function (
    /*
     * ID of the variable
     */
    variableId, 
    /*
     *
     */
    value) {
        var callOptions = __assign({}, this.resources.setValue);
        callOptions.body = value;
        callOptions.pathParameters = {
            variableId: variableId
        };
        return callOptions;
    };
    /**
     * Set variable value
     *
     * LWM2M path: /1029/{variableId}/4
     *
     * @tapVersion(">=")
     * @param variableId input
     * @param value input
     * @return
     */
    VariableService.prototype.putValue = function (
    /*
     * ID of the variable
     */
    variableId, 
    /*
     *
     */
    value) {
        return this.serviceCallRunner.execute(this.putValueCall(variableId, value));
    };
    /**
     *
     *
     * LWM2M path: /1029/{variableId}/4
     *
     * @tapVersion(">=")
     * @param variableId input
     * @param value input
     * @return call options
     */
    VariableService.prototype.putValueCall = function (
    /*
     * ID of the variable
     */
    variableId, 
    /*
     *
     */
    value) {
        var callOptions = __assign({}, this.resources.putValue);
        callOptions.body = value;
        callOptions.pathParameters = {
            variableId: variableId
        };
        return callOptions;
    };
    /**
     * Get variable bundle id
     *
     * LWM2M path: /1029/{variableId}/6
     *
     * @tapVersion(">=")
     * @param variableId input
     * @return
     */
    VariableService.prototype.getBundleId = function (
    /*
     *
     */
    variableId) {
        return this.serviceCallRunner.execute(this.getBundleIdCall(variableId));
    };
    /**
     *
     *
     * LWM2M path: /1029/{variableId}/6
     *
     * @tapVersion(">=")
     * @param variableId input
     * @return call options
     */
    VariableService.prototype.getBundleIdCall = function (
    /*
     *
     */
    variableId) {
        var callOptions = __assign({}, this.resources.getBundleId);
        callOptions.pathParameters = {
            variableId: variableId
        };
        return callOptions;
    };
    /**
     * Write variable bundle id
     *
     * LWM2M path: /1029/{variableId}/6
     *
     * @tapVersion(">=")
     * @param variableId input
     * @param value input
     * @return
     */
    VariableService.prototype.putBundleId = function (
    /*
     *
     */
    variableId, 
    /*
     *
     */
    value) {
        return this.serviceCallRunner.execute(this.putBundleIdCall(variableId, value));
    };
    /**
     *
     *
     * LWM2M path: /1029/{variableId}/6
     *
     * @tapVersion(">=")
     * @param variableId input
     * @param value input
     * @return call options
     */
    VariableService.prototype.putBundleIdCall = function (
    /*
     *
     */
    variableId, 
    /*
     *
     */
    value) {
        var callOptions = __assign({}, this.resources.putBundleId);
        callOptions.body = value;
        callOptions.pathParameters = {
            variableId: variableId
        };
        return callOptions;
    };
    /**
     * Get variable bundle values (formated as a TLV)
     *
     * LWM2M path: /1029/{variableId}/7
     *
     * @tapVersion(">=")
     * @param variableId input
     * @return
     */
    VariableService.prototype.getBundleValues = function (
    /*
     *
     */
    variableId) {
        return this.serviceCallRunner.execute(this.getBundleValuesCall(variableId));
    };
    /**
     *
     *
     * LWM2M path: /1029/{variableId}/7
     *
     * @tapVersion(">=")
     * @param variableId input
     * @return call options
     */
    VariableService.prototype.getBundleValuesCall = function (
    /*
     *
     */
    variableId) {
        var callOptions = __assign({}, this.resources.getBundleValues);
        callOptions.pathParameters = {
            variableId: variableId
        };
        return callOptions;
    };
    /**
     * Write variable bundle id
     *
     * LWM2M path: /1029/{variableId}/65535
     *
     * @tapVersion(">=")
     * @param variableId input
     * @param extraSize input
     * @return
     */
    VariableService.prototype.create = function (
    /*
     *
     */
    variableId, 
    /*
     * extra data size in bytes
     */
    extraSize) {
        return this.serviceCallRunner.execute(this.createCall(variableId, extraSize));
    };
    /**
     *
     *
     * LWM2M path: /1029/{variableId}/65535
     *
     * @tapVersion(">=")
     * @param variableId input
     * @param extraSize input
     * @return call options
     */
    VariableService.prototype.createCall = function (
    /*
     *
     */
    variableId, 
    /*
     * extra data size in bytes
     */
    extraSize) {
        var callOptions = __assign({}, this.resources.create);
        callOptions.body = extraSize;
        callOptions.pathParameters = {
            variableId: variableId
        };
        return callOptions;
    };
    return VariableService;
}(AbstractService));
export { VariableService };
//# sourceMappingURL=data:application/json;base64, 