import { SERVICE_CALLS } from './service-calls';
import { AbstractService } from '@iotize/tap';
export class FileSystemService extends AbstractService {
    constructor() {
        super(...arguments);
        this.resources = SERVICE_CALLS;
    }
    /**
     * select file
     *
     * LWM2M path: /1032//1
     *
     * @tapVersion(">=2.13")
     * @param fileName input
     * @return
     */
    selectFile(
    /*
     * name of the file to select. file name format = DOS  : 8.3    (namemax8.ext) ...
     */
    fileName) {
        return this.serviceCallRunner.execute(this.selectFileCall(fileName));
    }
    /**
     *
     *
     * LWM2M path: /1032//1
     *
     * @tapVersion(">=2.13")
     * @param fileName input
     * @return call options
     */
    selectFileCall(
    /*
     * name of the file to select. file name format = DOS  : 8.3    (namemax8.ext) ...
     */
    fileName) {
        const callOptions = Object.assign({}, this.resources.selectFile);
        callOptions.body = fileName;
        return callOptions;
    }
    /**
     * unselect file
     *
     * LWM2M path: /1032//2
     *
     * @tapVersion(">=2.13")
     * @return
     */
    unselectFile() {
        return this.serviceCallRunner.execute(this.unselectFileCall());
    }
    /**
     *
     *
     * LWM2M path: /1032//2
     *
     * @tapVersion(">=2.13")
     * @return call options
     */
    unselectFileCall() {
        const callOptions = Object.assign({}, this.resources.unselectFile);
        return callOptions;
    }
    /**
     * write data to file
     *
     * LWM2M path: /1032//3
     *
     * @tapVersion(">=2.13")
     * @param data input
     * @return
     */
    writeSelectedFile(
    /*
     * data to write in the file. binary.
     */
    data) {
        return this.serviceCallRunner.execute(this.writeSelectedFileCall(data));
    }
    /**
     *
     *
     * LWM2M path: /1032//3
     *
     * @tapVersion(">=2.13")
     * @param data input
     * @return call options
     */
    writeSelectedFileCall(
    /*
     * data to write in the file. binary.
     */
    data) {
        const callOptions = Object.assign({}, this.resources.writeSelectedFile);
        callOptions.body = data;
        return callOptions;
    }
    /**
     * write bundle id to file
     *
     * LWM2M path: /1032//10
     *
     * @tapVersion(">=2.13")
     * @param bundleId input
     * @return
     */
    setSelectedFileBundleId(
    /*
     * bundle id for the file being written. binary.
     */
    bundleId) {
        return this.serviceCallRunner.execute(this.setSelectedFileBundleIdCall(bundleId));
    }
    /**
     *
     *
     * LWM2M path: /1032//10
     *
     * @tapVersion(">=2.13")
     * @param bundleId input
     * @return call options
     */
    setSelectedFileBundleIdCall(
    /*
     * bundle id for the file being written. binary.
     */
    bundleId) {
        const callOptions = Object.assign({}, this.resources.setSelectedFileBundleId);
        callOptions.body = bundleId;
        return callOptions;
    }
    /**
     * write user id to file
     *
     * LWM2M path: /1032//11
     *
     * @tapVersion(">=2.13")
     * @param userId input
     * @return
     */
    setSelectedFileUserId(
    /*
     * user id for the file being written. binary.
     */
    userId) {
        return this.serviceCallRunner.execute(this.setSelectedFileUserIdCall(userId));
    }
    /**
     *
     *
     * LWM2M path: /1032//11
     *
     * @tapVersion(">=2.13")
     * @param userId input
     * @return call options
     */
    setSelectedFileUserIdCall(
    /*
     * user id for the file being written. binary.
     */
    userId) {
        const callOptions = Object.assign({}, this.resources.setSelectedFileUserId);
        callOptions.body = userId;
        return callOptions;
    }
    /**
     * read data from the selected file
     *
     * LWM2M path: /1032//4
     *
     * @tapVersion(">=2.13")
     * @param options input
     * @return
     */
    readSelectedFile(
    /*
     *
     */
    options) {
        return this.serviceCallRunner.execute(this.readSelectedFileCall(options));
    }
    /**
     *
     *
     * LWM2M path: /1032//4
     *
     * @tapVersion(">=2.13")
     * @param options input
     * @return call options
     */
    readSelectedFileCall(
    /*
     *
     */
    options) {
        const callOptions = Object.assign({}, this.resources.readSelectedFile);
        callOptions.body = options;
        return callOptions;
    }
    /**
     * delete file
     *
     * LWM2M path: /1032//6
     *
     * @tapVersion(">=2.13")
     * @return
     */
    deleteSelectedFile() {
        return this.serviceCallRunner.execute(this.deleteSelectedFileCall());
    }
    /**
     *
     *
     * LWM2M path: /1032//6
     *
     * @tapVersion(">=2.13")
     * @return call options
     */
    deleteSelectedFileCall() {
        const callOptions = Object.assign({}, this.resources.deleteSelectedFile);
        return callOptions;
    }
    /**
     * clear all files
     *
     * LWM2M path: /1032//7
     *
     * @tapVersion(">=2.13")
     * @return
     */
    clearAllFiles() {
        return this.serviceCallRunner.execute(this.clearAllFilesCall());
    }
    /**
     *
     *
     * LWM2M path: /1032//7
     *
     * @tapVersion(">=2.13")
     * @return call options
     */
    clearAllFilesCall() {
        const callOptions = Object.assign({}, this.resources.clearAllFiles);
        return callOptions;
    }
    /**
     * get size of the selected file
     *
     * LWM2M path: /1032//5
     *
     * @tapVersion(">=2.13")
     * @return
     */
    getSelectedFileSize() {
        return this.serviceCallRunner.execute(this.getSelectedFileSizeCall());
    }
    /**
     *
     *
     * LWM2M path: /1032//5
     *
     * @tapVersion(">=2.13")
     * @return call options
     */
    getSelectedFileSizeCall() {
        const callOptions = Object.assign({}, this.resources.getSelectedFileSize);
        return callOptions;
    }
    /**
     * list files
     *
     * LWM2M path: /1032//9
     *
     * @tapVersion(">=2.13")
     * @return
     */
    listFiles() {
        return this.serviceCallRunner.execute(this.listFilesCall());
    }
    /**
     *
     *
     * LWM2M path: /1032//9
     *
     * @tapVersion(">=2.13")
     * @return call options
     */
    listFilesCall() {
        const callOptions = Object.assign({}, this.resources.listFiles);
        return callOptions;
    }
}
//# sourceMappingURL=data:application/json;base64, 