import { AbstractService, extendServiceContainer } from '@iotize/tap';
import { TapRequestFrame } from '@iotize/tap/client/api';
import { converters } from '@iotize/tap/service/core';

/**
 *   Generated file. Do not edit
 */

var serviceConverters = /*#__PURE__*/Object.freeze({
    __proto__: null
});

/**
 *   Generated file. Do not edit
 */
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);
};
var allConverters = __assign(__assign({}, converters), serviceConverters);
var SERVICE_CALLS = {
    getAddress: {
        method: TapRequestFrame.MethodType.GET,
        pathAlias: "/ble/address",
        path: "/1024//22",
        responseBodyDecoder: allConverters.stringMacaddress
    }
};

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$1 = (this && this.__assign) || function () {
    __assign$1 = 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$1.apply(this, arguments);
};
var BleService = /** @class */ (function (_super) {
    __extends(BleService, _super);
    function BleService() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.resources = SERVICE_CALLS;
        return _this;
    }
    /**
     * Get BLE MAC address
     *
     * LWM2M path: /1024//22
     *
     * @tapVersion(">=")
     * @return
     */
    BleService.prototype.getAddress = function () {
        return this.serviceCallRunner.execute(this.getAddressCall());
    };
    /**
     *
     *
     * LWM2M path: /1024//22
     *
     * @tapVersion(">=")
     * @return call options
     */
    BleService.prototype.getAddressCall = function () {
        var callOptions = __assign$1({}, this.resources.getAddress);
        return callOptions;
    };
    return BleService;
}(AbstractService));

var _TAP_SERVICE_EXTENSION_BLE_ = extendServiceContainer("ble", BleService);

/**
 * Generated bundle index. Do not edit.
 */

export { SERVICE_CALLS as BLE_SERVICE_CALLS, BleService, _TAP_SERVICE_EXTENSION_BLE_, serviceConverters as bleConverters };
//# sourceMappingURL=iotize-tap-service-impl-ble.js.map
