import { SERVICE_CALLS } from "./service-calls";
import { AbstractService } from "@iotize/tap";
export class SinglePacketService extends AbstractService {
    constructor() {
        super(...arguments);
        this.resources = SERVICE_CALLS;
    }
    /**
     * Get information concerning Single Packet Store Status
     *
     * LWM2M path: /1024//81
     *
     * @tapVersion(">=1.13")
     * @return
     */
    getInfo() {
        return this.serviceCallRunner.execute(this.getInfoCall());
    }
    /**
     *
     *
     * LWM2M path: /1024//81
     *
     * @tapVersion(">=1.13")
     * @return call options
     */
    getInfoCall() {
        const callOptions = Object.assign({}, this.resources.getInfo);
        return callOptions;
    }
    /**
     * Send a complete Small Single Packet to the TAP as bytes. Size of the packet < 120 bytes
     *
     * LWM2M path: /1024//80
     *
     * @tapVersion(">=1.13")
     * @param data input
     * @return
     */
    writeAndExecuteBytes(
    /*
     *
     */
    data) {
        return this.serviceCallRunner.execute(this.writeAndExecuteBytesCall(data));
    }
    /**
     *
     *
     * LWM2M path: /1024//80
     *
     * @tapVersion(">=1.13")
     * @param data input
     * @return call options
     */
    writeAndExecuteBytesCall(
    /*
     *
     */
    data) {
        const callOptions = Object.assign({}, this.resources.writeAndExecuteBytes);
        callOptions.body = data;
        return callOptions;
    }
    /**
     * Send and execute the given Single Packet in one request
     *
     * LWM2M path: /1024//80
     *
     * @tapVersion(">=1.13")
     * @param data input
     * @return
     */
    writeAndExecute(
    /*
     *
     */
    data) {
        return this.serviceCallRunner.execute(this.writeAndExecuteCall(data));
    }
    /**
     *
     *
     * LWM2M path: /1024//80
     *
     * @tapVersion(">=1.13")
     * @param data input
     * @return call options
     */
    writeAndExecuteCall(
    /*
     *
     */
    data) {
        const callOptions = Object.assign({}, this.resources.writeAndExecute);
        callOptions.body = data;
        return callOptions;
    }
    /**
     * Write single packet chunk
     *
     * LWM2M path: /1024//82
     *
     * @tapVersion(">=1.13")
     * @param data input
     * @return
     */
    writeChunk(
    /*
     *
     */
    data) {
        return this.serviceCallRunner.execute(this.writeChunkCall(data));
    }
    /**
     *
     *
     * LWM2M path: /1024//82
     *
     * @tapVersion(">=1.13")
     * @param data input
     * @return call options
     */
    writeChunkCall(
    /*
     *
     */
    data) {
        const callOptions = Object.assign({}, this.resources.writeChunk);
        callOptions.body = data;
        return callOptions;
    }
    /**
     * Execute single packet stored in Tap storage
     *
     * LWM2M path: /1024//83
     *
     * @tapVersion(">=1.13")
     * @param crc input
     * @return
     */
    executeSinglePacketInStore(
    /*
     * CRC of the single packet stored in Tap storage.
     */
    crc) {
        return this.serviceCallRunner.execute(this.executeSinglePacketInStoreCall(crc));
    }
    /**
     *
     *
     * LWM2M path: /1024//83
     *
     * @tapVersion(">=1.13")
     * @param crc input
     * @return call options
     */
    executeSinglePacketInStoreCall(
    /*
     * CRC of the single packet stored in Tap storage.
     */
    crc) {
        const callOptions = Object.assign({}, this.resources.executeSinglePacketInStore);
        callOptions.body = crc;
        return callOptions;
    }
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0Bpb3RpemUvdGFwL3NlcnZpY2UvaW1wbC9zaW5nbGUtcGFja2V0LyIsInNvdXJjZXMiOlsibGliL2dlbmVyYXRlZC9zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlBLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUtoRCxPQUFPLEVBQUUsZUFBZSxFQUFtQixNQUFNLGFBQWEsQ0FBQztBQUUvRCxNQUFNLE9BQU8sbUJBQW9CLFNBQVEsZUFBZTtJQUF4RDs7UUFDUyxjQUFTLEdBQUcsYUFBYSxDQUFDO0lBNkxuQyxDQUFDO0lBM0xDOzs7Ozs7O09BT0c7SUFDSCxPQUFPO1FBQ0wsT0FBTyxJQUFJLENBQUMsaUJBQWlCLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxXQUFXLEVBQUUsQ0FBQyxDQUFDO0lBQzVELENBQUM7S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