import { SERVICE_CALLS } from './service-calls';
import { AbstractService } from '@iotize/tap';
export class FirmwareService extends AbstractService {
    constructor() {
        super(...arguments);
        this.resources = SERVICE_CALLS;
    }
    /**
     * Firmware update data
     *
     * LWM2M path: /5//0
     *
     * @tapVersion(">=1.0")
     * @return
     */
    postPackage() {
        return this.serviceCallRunner.execute(this.postPackageCall());
    }
    /**
     *
     *
     * LWM2M path: /5//0
     *
     * @tapVersion(">=1.0")
     * @return call options
     */
    postPackageCall() {
        const callOptions = Object.assign({}, this.resources.postPackage);
        return callOptions;
    }
    /**
     * firmware Update mode
     *
     * LWM2M path: /5//2
     *
     * @tapVersion(">=1.0")
     * @return
     */
    postUpdate() {
        return this.serviceCallRunner.execute(this.postUpdateCall());
    }
    /**
     *
     *
     * LWM2M path: /5//2
     *
     * @tapVersion(">=1.0")
     * @return call options
     */
    postUpdateCall() {
        const callOptions = Object.assign({}, this.resources.postUpdate);
        return callOptions;
    }
    /**
     * Get state
     *
     * LWM2M path: /5//3
     *
     * @tapVersion(">=1.0")
     * @return
     */
    getState() {
        return this.serviceCallRunner.execute(this.getStateCall());
    }
    /**
     *
     *
     * LWM2M path: /5//3
     *
     * @tapVersion(">=1.0")
     * @return call options
     */
    getStateCall() {
        const callOptions = Object.assign({}, this.resources.getState);
        return callOptions;
    }
    /**
     * Get firmware update result
     *
     * LWM2M path: /5//5
     *
     * @tapVersion(">=1.0")
     * @return
     */
    getUpdateResult() {
        return this.serviceCallRunner.execute(this.getUpdateResultCall());
    }
    /**
     *
     *
     * LWM2M path: /5//5
     *
     * @tapVersion(">=1.0")
     * @return call options
     */
    getUpdateResultCall() {
        const callOptions = Object.assign({}, this.resources.getUpdateResult);
        return callOptions;
    }
    /**
     * Check CRC
     *
     * LWM2M path: /5//6
     *
     * @tapVersion(">=1.0")
     * @param data input
     * @return
     */
    postCrcCheck(
    /*
     *
     */
    data) {
        return this.serviceCallRunner.execute(this.postCrcCheckCall(data));
    }
    /**
     *
     *
     * LWM2M path: /5//6
     *
     * @tapVersion(">=1.0")
     * @param data input
     * @return call options
     */
    postCrcCheckCall(
    /*
     *
     */
    data) {
        const callOptions = Object.assign({}, this.resources.postCrcCheck);
        callOptions.body = data;
        return callOptions;
    }
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NlcnZpY2UvaW1wbC9maXJtd2FyZS9zcmMvbGliL2dlbmVyYXRlZC9zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlBLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUtoRCxPQUFPLEVBQUUsZUFBZSxFQUFtQixNQUFNLGFBQWEsQ0FBQztBQUUvRCxNQUFNLE9BQU8sZUFBZ0IsU0FBUSxlQUFlO0lBQXBEOztRQUNTLGNBQVMsR0FBRyxhQUFhLENBQUM7SUFpSm5DLENBQUM7SUEvSUM7Ozs7Ozs7T0FPRztJQUNILFdBQVc7UUFDVCxPQUFPLElBQUksQ0FBQyxpQkFBaUIsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLGVBQWUsRUFBRSxDQUFDLENBQUM7SUFDaEUsQ0FBQztJQUVEOzs7Ozs7O09BT0c7SUFDSCxlQUFlO1FBQ2IsTUFBTSxXQUFXLHFCQUFRLElBQUksQ0FBQyxTQUFTLENBQUMsV0FBVyxDQUFFLENBQUM7UUFFdEQsT0FBTyxXQUFXLENBQUM7SUFDckIsQ0FBQztJQUVEOzs7Ozs7O09BT0c7SUFDSCxVQUFVO1FBQ1IsT0FBTyxJQUFJLENBQUMsaUJBQWlCLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxjQUFjLEVBQUUsQ0FBQyxDQUFDO0lBQy9ELENBQUM7SUFFRDs7Ozs7OztPQU9HO0lBQ0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