(function (global, factory) {
    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@iotize/tap'), require('@iotize/tap/client/api'), require('@iotize/tap/service/core')) :
    typeof define === 'function' && define.amd ? define('@iotize/tap/service/impl/gpio', ['exports', '@iotize/tap', '@iotize/tap/client/api', '@iotize/tap/service/core'], factory) :
    (global = global || self, factory((global.iotize = global.iotize || {}, global.iotize.tap = global.iotize.tap || {}, global.iotize.tap.service = global.iotize.tap.service || {}, global.iotize.tap.service.impl = global.iotize.tap.service.impl || {}, global.iotize.tap.service.impl.gpio = {}), global.iotize.tap, global.iotize.tap.client.api, global.iotize.tap.service.core));
}(this, (function (exports, tap, api, core) { 'use strict';

    /* tslint:disable */
    /**
     * This file was automatically generated by json-schema-to-typescript.
     * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
     * and run json-schema-to-typescript to regenerate this file.
     */

    (function (GPIOMode) {
        GPIOMode[GPIOMode["INPUT_FLOATING"] = 0] = "INPUT_FLOATING";
        GPIOMode[GPIOMode["OUTPUT_OPEN_DRAIN"] = 1] = "OUTPUT_OPEN_DRAIN";
        GPIOMode[GPIOMode["OUTPUT_PUSH_PULL"] = 3] = "OUTPUT_PUSH_PULL";
        GPIOMode[GPIOMode["INPUT_PULL_UP"] = 4] = "INPUT_PULL_UP";
        GPIOMode[GPIOMode["OUTPUT_OPEN_DRAIN_PULL_UP"] = 5] = "OUTPUT_OPEN_DRAIN_PULL_UP";
        GPIOMode[GPIOMode["INPUT_PULL_DOWN"] = 8] = "INPUT_PULL_DOWN";
    })(exports.GPIOMode || (exports.GPIOMode = {}));

    /**
     *   Generated file. Do not edit
     */
    var gPIOMode = core.createEnumConverter(exports.GPIOMode, 1);
    var gPIOModeArray = core.createEnumArrayConverter(exports.GPIOMode, 1);

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

    /**
     *   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({}, core.converters), serviceConverters);
    var SERVICE_CALLS = {
        getGpioMode: {
            method: api.TapRequestFrame.MethodType.GET,
            pathAlias: "/variable/{variableId}/gpio-mode",
            path: "/1029/{variableId}/4",
            responseBodyDecoder: allConverters.gPIOMode
        }
    };

    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 GpioService = /** @class */ (function (_super) {
        __extends(GpioService, _super);
        function GpioService() {
            var _this = _super !== null && _super.apply(this, arguments) || this;
            _this.resources = SERVICE_CALLS;
            return _this;
        }
        /**
         * Get GPIO variable mode
         *
         * LWM2M path: /1029/{variableId}/4
         *
         * @tapVersion(">=")
         * @param variableId input
         * @return
         */
        GpioService.prototype.getGpioMode = function (
        /*
         * ID of the variable
         */
        variableId) {
            return this.serviceCallRunner.execute(this.getGpioModeCall(variableId));
        };
        /**
         *
         *
         * LWM2M path: /1029/{variableId}/4
         *
         * @tapVersion(">=")
         * @param variableId input
         * @return call options
         */
        GpioService.prototype.getGpioModeCall = function (
        /*
         * ID of the variable
         */
        variableId) {
            var callOptions = __assign$1({}, this.resources.getGpioMode);
            callOptions.pathParameters = {
                variableId: variableId
            };
            return callOptions;
        };
        return GpioService;
    }(tap.AbstractService));

    var _TAP_SERVICE_EXTENSION_GPIO_ = tap.extendServiceContainer("gpio", GpioService);

    exports.GPIO_SERVICE_CALLS = SERVICE_CALLS;
    exports.GpioService = GpioService;
    exports._TAP_SERVICE_EXTENSION_GPIO_ = _TAP_SERVICE_EXTENSION_GPIO_;
    exports.gpioConverters = serviceConverters;

    Object.defineProperty(exports, '__esModule', { value: true });

})));
//# sourceMappingURL=iotize-tap-service-impl-gpio.umd.js.map
