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
 */
const allConverters = Object.assign(Object.assign({}, converters), serviceConverters);
const SERVICE_CALLS = {
    getEnabled: {
        method: TapRequestFrame.MethodType.GET,
        pathAlias: '/lte/enabled',
        path: '/1024//131',
        responseBodyDecoder: allConverters.boolean,
    },
    putEnabled: {
        method: TapRequestFrame.MethodType.PUT,
        pathAlias: '/lte/enabled',
        path: '/1024//131',
        bodyEncoder: allConverters.boolean,
    },
    getApplicationData: {
        method: TapRequestFrame.MethodType.GET,
        pathAlias: '/lte/application-data',
        path: '/1024//122',
        responseBodyDecoder: allConverters.int8,
    },
    putApplicationData: {
        method: TapRequestFrame.MethodType.PUT,
        pathAlias: '/lte/application-data',
        path: '/1024//122',
    },
};

class LteService extends AbstractService {
    constructor() {
        super(...arguments);
        this.resources = SERVICE_CALLS;
    }
    /**
     * Get LTE enable status
     *
     * LWM2M path: /1024//131
     *
     * @tapVersion(">=2.13")
     * @return
     */
    getEnabled() {
        return this.serviceCallRunner.execute(this.getEnabledCall());
    }
    /**
     *
     *
     * LWM2M path: /1024//131
     *
     * @tapVersion(">=2.13")
     * @return call options
     */
    getEnabledCall() {
        const callOptions = Object.assign({}, this.resources.getEnabled);
        return callOptions;
    }
    /**
     * Write LTE enable status
     *
     * LWM2M path: /1024//131
     *
     * @tapVersion(">=2.13")
     * @param isEnabled input
     * @return
     */
    putEnabled(
    /*
     *
     */
    isEnabled) {
        return this.serviceCallRunner.execute(this.putEnabledCall(isEnabled));
    }
    /**
     *
     *
     * LWM2M path: /1024//131
     *
     * @tapVersion(">=2.13")
     * @param isEnabled input
     * @return call options
     */
    putEnabledCall(
    /*
     *
     */
    isEnabled) {
        const callOptions = Object.assign({}, this.resources.putEnabled);
        callOptions.body = isEnabled;
        return callOptions;
    }
    /**
     * Get application data for LTE
     *
     * LWM2M path: /1024//122
     *
     * @tapVersion(">=2.11")
     * @return
     */
    getApplicationData() {
        return this.serviceCallRunner.execute(this.getApplicationDataCall());
    }
    /**
     *
     *
     * LWM2M path: /1024//122
     *
     * @tapVersion(">=2.11")
     * @return call options
     */
    getApplicationDataCall() {
        const callOptions = Object.assign({}, this.resources.getApplicationData);
        return callOptions;
    }
    /**
     * Set application data for LTE
     *
     * LWM2M path: /1024//122
     *
     * @tapVersion(">=2.11")
     * @param value input
     * @return
     */
    putApplicationData(
    /*
     *
     */
    value) {
        return this.serviceCallRunner.execute(this.putApplicationDataCall(value));
    }
    /**
     *
     *
     * LWM2M path: /1024//122
     *
     * @tapVersion(">=2.11")
     * @param value input
     * @return call options
     */
    putApplicationDataCall(
    /*
     *
     */
    value) {
        const callOptions = Object.assign({}, this.resources.putApplicationData);
        callOptions.body = value;
        return callOptions;
    }
}

const _TAP_SERVICE_EXTENSION_LTE_ = extendServiceContainer('lte', LteService);

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

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

/**
 *   Generated file. Do not edit
 */
const ResourceMetaData = {
    '/lte/enabled': {
        put: {
            minApiVersion: 2.13,
            configModeRequired: false,
            schema: {
                type: 'boolean',
            },
        },
    },
    '/lte/application-data': {
        put: {
            minApiVersion: 2.11,
            configModeRequired: false,
            schema: {
                $ref: './definitions.yaml#/Bytes',
            },
        },
    },
};

// import './lib/custom/extension';

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

export { SERVICE_CALLS as LTE_SERVICE_CALLS, ResourceMetaData as LteResourceMetaData, LteService, _TAP_SERVICE_EXTENSION_LTE_, serviceConverters as lteConverters };
//# sourceMappingURL=iotize-tap-service-impl-lte.js.map
