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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0Bpb3RpemUvdGFwL3NlcnZpY2UvaW1wbC9qdm0vIiwic291cmNlcyI6WyJsaWIvZ2VuZXJhdGVkL3NlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSUEsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBRWhELE9BQU8sRUFBRSxlQUFlLEVBQW1CLE1BQU0sYUFBYSxDQUFDO0FBRS9ELE1BQU0sT0FBTyxVQUFXLFNBQVEsZUFBZTtJQUEvQzs7UUFDUyxjQUFTLEdBQUcsYUFBYSxDQUFDO0lBa0puQyxDQUFDO0lBaEpDOzs7Ozs7O09BT0c7SUFDSCxTQUFTO1FBQ1AsT0FBTyxJQUFJLENBQUMsaUJBQWlCLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxhQUFhLEVBQUUsQ0FBQyxDQUFDO0lBQzlELENBQUM7SUFFRDs7Ozs7OztPQU9HO0lBQ0gsYUFBYTtRQUNYLE1BQU0sV0FBVyxxQkFBUSxJQUFJLENBQUMsU0FBUyxDQUFDLFNBQVMsQ0FBRSxDQUFDO1FBRXBELE9BQU8sV0FBVyxDQUFDO0lBQ3JCLENBQUM7SUFFRDs7Ozs7Ozs7T0FRRztJQUNILFVBQVU7SUFDUjs7T0FFRztJQUNILEtBQWlCO1FBRWpCLE9BQU8sSUFBSSxDQUFDLGlCQUFpQixDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsY0FBYyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUM7SUFDcEUsQ0FBQztJQUVELHFCQUFxQjtJQUNuQjs7T0FFRztJQUNILEtBQ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