import { SERVICE_CALLS } from './service-calls';
import { AbstractService } from '@iotize/tap';
export class JvmService extends AbstractService {
    constructor() {
        super(...arguments);
        this.resources = SERVICE_CALLS;
    }
    /**
     * Get JVM reserved code size
     *
     * LWM2M path: /1024//73
     *
     * @tapVersion(">=1.90")
     * @return
     */
    getCodeSize() {
        return this.serviceCallRunner.execute(this.getCodeSizeCall());
    }
    /**
     *
     *
     * LWM2M path: /1024//73
     *
     * @tapVersion(">=1.90")
     * @return call options
     */
    getCodeSizeCall() {
        const callOptions = Object.assign({}, this.resources.getCodeSize);
        return callOptions;
    }
    /**
     * Write JVM reserved code size
     *
     * LWM2M path: /1024//73
     *
     * @tapVersion(">=1.90")
     * @param value input
     * @return
     */
    putCodeSize(
    /*
     *
     */
    value) {
        return this.serviceCallRunner.execute(this.putCodeSizeCall(value));
    }
    /**
     *
     *
     * LWM2M path: /1024//73
     *
     * @tapVersion(">=1.90")
     * @param value input
     * @return call options
     */
    putCodeSizeCall(
    /*
     *
     */
    value) {
        const callOptions = Object.assign({}, this.resources.putCodeSize);
        callOptions.body = value;
        return callOptions;
    }
    /**
     * 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NlcnZpY2UvaW1wbC9qdm0vc3JjL2xpYi9nZW5lcmF0ZWQvc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJQSxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFFaEQsT0FBTyxFQUFFLGVBQWUsRUFBbUIsTUFBTSxhQUFhLENBQUM7QUFFL0QsTUFBTSxPQUFPLFVBQVcsU0FBUSxlQUFlO0lBQS9DOztRQUNTLGNBQVMsR0FBRyxhQUFhLENBQUM7SUFvTm5DLENBQUM7SUFsTkM7Ozs7Ozs7T0FPRztJQUNIL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