import { SERVICE_CALLS } from './service-calls';
import { AbstractService } from '@iotize/tap';
export class JvmService extends AbstractService {
    constructor() {
        super(...arguments);
        this.resources = SERVICE_CALLS;
    }
    /**
     * Clear code stored in Tap.
     *
     * LWM2M path: /1024//74
     *
     * @tapVersion(">=1.90")
     * @return
     */
    clearCode() {
        return this.serviceCallRunner.execute(this.clearCodeCall());
    }
    /**
     *
     *
     * LWM2M path: /1024//74
     *
     * @tapVersion(">=1.90")
     * @return call options
     */
    clearCodeCall() {
        const callOptions = Object.assign({}, this.resources.clearCode);
        return callOptions;
    }
    /**
     * Append JVM code. If body length is 0, it will clear code stored in Tap.
     *
     * LWM2M path: /1024//74
     *
     * @tapVersion(">=1.90")
     * @param value input
     * @return
     */
    appendCode(
    /*
     *
     */
    value) {
        return this.serviceCallRunner.execute(this.appendCodeCall(value));
    }
    appendCodeAppendCalls(
    /*
     *
     */
    value, chunkSize) {
        return this.serviceCallRunner.createAppendCalls(this.appendCodeCall(value), chunkSize);
    }
    /**
     *
     *
     * LWM2M path: /1024//74
     *
     * @tapVersion(">=1.90")
     * @param value input
     * @return call options
     */
    appendCodeCall(
    /*
     *
     */
    value) {
        const callOptions = Object.assign({}, this.resources.appendCode);
        callOptions.body = value;
        return callOptions;
    }
    /**
     * Get user id that gives rights to the JVM code
     *
     * LWM2M path: /1024//66
     *
     * @tapVersion(">=")
     * @return
     */
    getProfileId() {
        return this.serviceCallRunner.execute(this.getProfileIdCall());
    }
    /**
     *
     *
     * LWM2M path: /1024//66
     *
     * @tapVersion(">=")
     * @return call options
     */
    getProfileIdCall() {
        const callOptions = Object.assign({}, this.resources.getProfileId);
        return callOptions;
    }
    /**
     * Write user id that gives right to the JVM code
     *
     * LWM2M path: /1024//66
     *
     * @tapVersion(">=")
     * @param key input
     * @return
     */
    putProfileId(
    /*
     *
     */
    key) {
        return this.serviceCallRunner.execute(this.putProfileIdCall(key));
    }
    /**
     *
     *
     * LWM2M path: /1024//66
     *
     * @tapVersion(">=")
     * @param key input
     * @return call options
     */
    putProfileIdCall(
    /*
     *
     */
    key) {
        const callOptions = Object.assign({}, this.resources.putProfileId);
        callOptions.body = key;
        return callOptions;
    }
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NlcnZpY2UvaW1wbC9qdm0vc3JjL2xpYi9nZW5lcmF0ZWQvc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJQSxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFFaEQsT0FBTyxFQUFFLGVBQWUsRUFBbUIsTUFBTSxhQUFhLENBQUM7QUFFL0QsTUFBTSxPQUFPLFVBQVcsU0FBUSxlQUFlO0lBQS9DOztRQUNTLGNBQVMsR0FBRyxhQUFhLENBQUM7SUFrSm5DLENBQUM7SUFoSkM7Ozs7Ozs7T0FPRztJQUNILFNBQVM7UUFDUCxPQUFPLElBQUksQ0FBQyxpQkFBaUIsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLGFBQWEsRUFBRSxDQUFDLENBQUM7SUFDOUQsQ0FBQztJQUVEOzs7Ozs7O09BT0c7SUFDSCxhQUFhO1FBQ1gsTUFBTSxXQUFXLHFCQUFRLElBQUksQ0FBQyxTQUFTLENBQUMsU0FBUyxDQUFFLENBQUM7UUFFcEQsT0FBTyxXQUFXLENBQUM7SUFDckIsQ0FBQztJQUVEOzs7Ozs7OztPQVFHO0lBQ0gsVUFBVTtJQUNSOztPQUVHO0lBQ0gsS0FBaUI7UUFFakIsT0FBTyxJQUFJLENBQUMsaUJBQWlCLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxjQUFjLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQztJQUNwRSxDQUFDO0lBRUQscUJBQXFCO0lBQ25COztPQU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