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 TimeService = /** @class */ (function (_super) {
    __extends(TimeService, _super);
    function TimeService() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.resources = SERVICE_CALLS;
        return _this;
    }
    /**
     * Get NTP server name
     *
     * LWM2M path: /1024//77
     *
     * @tapVersion(">=1.107")
     * @return
     */
    TimeService.prototype.getNtpServer = function () {
        return this.serviceCallRunner.execute(this.getNtpServerCall());
    };
    /**
     *
     *
     * LWM2M path: /1024//77
     *
     * @tapVersion(">=1.107")
     * @return call options
     */
    TimeService.prototype.getNtpServerCall = function () {
        var callOptions = __assign({}, this.resources.getNtpServer);
        return callOptions;
    };
    /**
     * Put NTP server name
     *
     * LWM2M path: /1024//77
     *
     * @tapVersion(">=1.107")
     * @param serverName input
     * @return
     */
    TimeService.prototype.putNtpServer = function (
    /*
     *
     */
    serverName) {
        return this.serviceCallRunner.execute(this.putNtpServerCall(serverName));
    };
    /**
     *
     *
     * LWM2M path: /1024//77
     *
     * @tapVersion(">=1.107")
     * @param serverName input
     * @return call options
     */
    TimeService.prototype.putNtpServerCall = function (
    /*
     *
     */
    serverName) {
        var callOptions = __assign({}, this.resources.putNtpServer);
        callOptions.body = serverName;
        return callOptions;
    };
    /**
     * Get Tap time zone
     *
     * LWM2M path: /1024//78
     *
     * @tapVersion(">=1.107")
     * @return
     */
    TimeService.prototype.getTimeZone = function () {
        return this.serviceCallRunner.execute(this.getTimeZoneCall());
    };
    /**
     *
     *
     * LWM2M path: /1024//78
     *
     * @tapVersion(">=1.107")
     * @return call options
     */
    TimeService.prototype.getTimeZoneCall = function () {
        var callOptions = __assign({}, this.resources.getTimeZone);
        return callOptions;
    };
    /**
     * Put Tap time zone
     *
     * LWM2M path: /1024//78
     *
     * @tapVersion(">=1.107")
     * @param serverName input
     * @return
     */
    TimeService.prototype.putTimeZone = function (
    /*
     *
     */
    serverName) {
        return this.serviceCallRunner.execute(this.putTimeZoneCall(serverName));
    };
    /**
     *
     *
     * LWM2M path: /1024//78
     *
     * @tapVersion(">=1.107")
     * @param serverName input
     * @return call options
     */
    TimeService.prototype.putTimeZoneCall = function (
    /*
     *
     */
    serverName) {
        var callOptions = __assign({}, this.resources.putTimeZone);
        callOptions.body = serverName;
        return callOptions;
    };
    /**
     * Get Tap local time
     *
     * LWM2M path: /1024//79
     *
     * @tapVersion(">=1.107")
     * @return
     */
    TimeService.prototype.getLocalTime = function () {
        return this.serviceCallRunner.execute(this.getLocalTimeCall());
    };
    /**
     *
     *
     * LWM2M path: /1024//79
     *
     * @tapVersion(">=1.107")
     * @return call options
     */
    TimeService.prototype.getLocalTimeCall = function () {
        var callOptions = __assign({}, this.resources.getLocalTime);
        return callOptions;
    };
    return TimeService;
}(AbstractService));
export { TimeService };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0Bpb3RpemUvdGFwL3NlcnZpY2UvaW1wbC90aW1lLyIsInNvdXJjZXMiOlsibGliL2dlbmVyYXRlZC9zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7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