import { SERVICE_CALLS } from './service-calls';
import { AbstractService } from '@iotize/tap';
export class DeviceService extends AbstractService {
    constructor() {
        super(...arguments);
        this.resources = SERVICE_CALLS;
    }
    /**
     * Get manufacturer name
     *
     * LWM2M path: /3//0
     *
     * @tapVersion(">=")
     * @return
     */
    getManufacturer() {
        return this.serviceCallRunner.execute(this.getManufacturerCall());
    }
    /**
     *
     *
     * LWM2M path: /3//0
     *
     * @tapVersion(">=")
     * @return call options
     */
    getManufacturerCall() {
        const callOptions = Object.assign({}, this.resources.getManufacturer);
        return callOptions;
    }
    /**
     * Get device firmware flavor name
     *
     * LWM2M path: /3//1
     *
     * @tapVersion(">=")
     * @return
     */
    getFirmwareFlavor() {
        return this.serviceCallRunner.execute(this.getFirmwareFlavorCall());
    }
    /**
     *
     *
     * LWM2M path: /3//1
     *
     * @tapVersion(">=")
     * @return call options
     */
    getFirmwareFlavorCall() {
        const callOptions = Object.assign({}, this.resources.getFirmwareFlavor);
        return callOptions;
    }
    /**
     * Get device serial number
     *
     * LWM2M path: /3//2
     *
     * @tapVersion(">=")
     * @return
     */
    getSerialNumber() {
        return this.serviceCallRunner.execute(this.getSerialNumberCall());
    }
    /**
     *
     *
     * LWM2M path: /3//2
     *
     * @tapVersion(">=")
     * @return call options
     */
    getSerialNumberCall() {
        const callOptions = Object.assign({}, this.resources.getSerialNumber);
        return callOptions;
    }
    /**
     * Get device firmware version
     *
     * LWM2M path: /3//3
     *
     * @tapVersion(">=")
     * @return
     */
    getFirmwareVersion() {
        return this.serviceCallRunner.execute(this.getFirmwareVersionCall());
    }
    /**
     *
     *
     * LWM2M path: /3//3
     *
     * @tapVersion(">=")
     * @return call options
     */
    getFirmwareVersionCall() {
        const callOptions = Object.assign({}, this.resources.getFirmwareVersion);
        return callOptions;
    }
    /**
     * Reboot device
     *
     * LWM2M path: /3//4
     *
     * @tapVersion(">=")
     * @return
     */
    reboot() {
        return this.serviceCallRunner.execute(this.rebootCall());
    }
    /**
     *
     *
     * LWM2M path: /3//4
     *
     * @tapVersion(">=")
     * @return call options
     */
    rebootCall() {
        const callOptions = Object.assign({}, this.resources.reboot);
        return callOptions;
    }
    /**
     * Factory reset
     *
     * LWM2M path: /3//5
     *
     * @tapVersion(">=")
     * @return
     */
    factoryReset() {
        return this.serviceCallRunner.execute(this.factoryResetCall());
    }
    /**
     *
     *
     * LWM2M path: /3//5
     *
     * @tapVersion(">=")
     * @return call options
     */
    factoryResetCall() {
        const callOptions = Object.assign({}, this.resources.factoryReset);
        return callOptions;
    }
    /**
     * Get available power sources
     *
     * LWM2M path: /3//6
     *
     * @tapVersion(">=")
     * @return
     */
    getAvailablePowerSource() {
        return this.serviceCallRunner.execute(this.getAvailablePowerSourceCall());
    }
    /**
     *
     *
     * LWM2M path: /3//6
     *
     * @tapVersion(">=")
     * @return call options
     */
    getAvailablePowerSourceCall() {
        const callOptions = Object.assign({}, this.resources.getAvailablePowerSource);
        return callOptions;
    }
    /**
     * Get power source voltage
     *
     * LWM2M path: /3//7
     *
     * @tapVersion(">=")
     * @return
     */
    getPowerSourceVoltage() {
        return this.serviceCallRunner.execute(this.getPowerSourceVoltageCall());
    }
    /**
     *
     *
     * LWM2M path: /3//7
     *
     * @tapVersion(">=")
     * @return call options
     */
    getPowerSourceVoltageCall() {
        const callOptions = Object.assign({}, this.resources.getPowerSourceVoltage);
        return callOptions;
    }
    /**
     * Get device memory free
     *
     * LWM2M path: /3//10
     *
     * @tapVersion(">=")
     * @return
     */
    getMemoryFree() {
        return this.serviceCallRunner.execute(this.getMemoryFreeCall());
    }
    /**
     *
     *
     * LWM2M path: /3//10
     *
     * @tapVersion(">=")
     * @return call options
     */
    getMemoryFreeCall() {
        const callOptions = Object.assign({}, this.resources.getMemoryFree);
        return callOptions;
    }
    /**
     * Get device last error code
     *
     * LWM2M path: /3//11
     *
     * @tapVersion(">=")
     * @return
     */
    getLastErrorCode() {
        return this.serviceCallRunner.execute(this.getLastErrorCodeCall());
    }
    /**
     *
     *
     * LWM2M path: /3//11
     *
     * @tapVersion(">=")
     * @return call options
     */
    getLastErrorCodeCall() {
        const callOptions = Object.assign({}, this.resources.getLastErrorCode);
        return callOptions;
    }
    /**
     * ???
     *
     * LWM2M path: /3//11
     *
     * @tapVersion(">=")
     * @return
     */
    postLastErrorCode() {
        return this.serviceCallRunner.execute(this.postLastErrorCodeCall());
    }
    /**
     *
     *
     * LWM2M path: /3//11
     *
     * @tapVersion(">=")
     * @return call options
     */
    postLastErrorCodeCall() {
        const callOptions = Object.assign({}, this.resources.postLastErrorCode);
        return callOptions;
    }
    /**
     * Reset device last error code
     *
     * LWM2M path: /3//12
     *
     * @tapVersion(">=")
     * @return
     */
    resetLastErrorCode() {
        return this.serviceCallRunner.execute(this.resetLastErrorCodeCall());
    }
    /**
     *
     *
     * LWM2M path: /3//12
     *
     * @tapVersion(">=")
     * @return call options
     */
    resetLastErrorCodeCall() {
        const callOptions = Object.assign({}, this.resources.resetLastErrorCode);
        return callOptions;
    }
    /**
     * Get device current time
     *
     * LWM2M path: /3//13
     *
     * @tapVersion(">=")
     * @return
     */
    getCurrentTime() {
        return this.serviceCallRunner.execute(this.getCurrentTimeCall());
    }
    /**
     *
     *
     * LWM2M path: /3//13
     *
     * @tapVersion(">=")
     * @return call options
     */
    getCurrentTimeCall() {
        const callOptions = Object.assign({}, this.resources.getCurrentTime);
        return callOptions;
    }
    /**
     * Set device current time
     *
     * LWM2M path: /3//13
     *
     * @tapVersion(">=")
     * @param time input
     * @return
     */
    putCurrentTime(
    /*
     *
     */
    time) {
        return this.serviceCallRunner.execute(this.putCurrentTimeCall(time));
    }
    /**
     *
     *
     * LWM2M path: /3//13
     *
     * @tapVersion(">=")
     * @param time input
     * @return call options
     */
    putCurrentTimeCall(
    /*
     *
     */
    time) {
        const callOptions = Object.assign({}, this.resources.putCurrentTime);
        callOptions.body = time;
        return callOptions;
    }
}
//# sourceMappingURL=data:application/json;base64, 