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