import { SERVICE_CALLS } from './service-calls';
import { AbstractService } from '@iotize/tap';
export class ScramService extends AbstractService {
    constructor() {
        super(...arguments);
        this.resources = SERVICE_CALLS;
    }
    /**
     * Initiate scram login process
     *
     * LWM2M path: /1024//40
     *
     * @tapVersion(">=1.0")
     * @param params input
     * @return
     */
    login(
    /*
     *
     */
    params) {
        return this.serviceCallRunner.execute(this.loginCall(params));
    }
    /**
     *
     *
     * LWM2M path: /1024//40
     *
     * @tapVersion(">=1.0")
     * @param params input
     * @return call options
     */
    loginCall(
    /*
     *
     */
    params) {
        const callOptions = Object.assign({}, this.resources.login);
        callOptions.body = params;
        return callOptions;
    }
    /**
     * Scram login proof
     *
     * LWM2M path: /1024//41
     *
     * @tapVersion(">=1.0")
     * @param params input
     * @return
     */
    loginProof(
    /*
     *
     */
    params) {
        return this.serviceCallRunner.execute(this.loginProofCall(params));
    }
    /**
     *
     *
     * LWM2M path: /1024//41
     *
     * @tapVersion(">=1.0")
     * @param params input
     * @return call options
     */
    loginProofCall(
    /*
     *
     */
    params) {
        const callOptions = Object.assign({}, this.resources.loginProof);
        callOptions.body = params;
        return callOptions;
    }
    /**
     * Get scram hash iteration counter
     *
     * LWM2M path: /1024//42
     *
     * @tapVersion(">=1.11")
     * @return
     */
    getHashIteration() {
        return this.serviceCallRunner.execute(this.getHashIterationCall());
    }
    /**
     *
     *
     * LWM2M path: /1024//42
     *
     * @tapVersion(">=1.11")
     * @return call options
     */
    getHashIterationCall() {
        const callOptions = Object.assign({}, this.resources.getHashIteration);
        return callOptions;
    }
    /**
     * Set scram hash iteration counter
     *
     * LWM2M path: /1024//42
     *
     * @tapVersion(">=1.11")
     * @param data input
     * @return
     */
    putHashIteration(
    /*
     *
     */
    data) {
        return this.serviceCallRunner.execute(this.putHashIterationCall(data));
    }
    /**
     *
     *
     * LWM2M path: /1024//42
     *
     * @tapVersion(">=1.11")
     * @param data input
     * @return call options
     */
    putHashIterationCall(
    /*
     *
     */
    data) {
        const callOptions = Object.assign({}, this.resources.putHashIteration);
        callOptions.body = data;
        return callOptions;
    }
    /**
     * Start encrypted communication
     *
     * LWM2M path: /1024//47
     *
     * @tapVersion(">=1.11")
     * @return
     */
    initialize() {
        return this.serviceCallRunner.execute(this.initializeCall());
    }
    /**
     *
     *
     * LWM2M path: /1024//47
     *
     * @tapVersion(">=1.11")
     * @return call options
     */
    initializeCall() {
        const callOptions = Object.assign({}, this.resources.initialize);
        return callOptions;
    }
    /**
     * Stop encrypted communication
     *
     * LWM2M path: /1024//46
     *
     * @tapVersion(">=1.11")
     * @return
     */
    stop() {
        return this.serviceCallRunner.execute(this.stopCall());
    }
    /**
     *
     *
     * LWM2M path: /1024//46
     *
     * @tapVersion(">=1.11")
     * @return call options
     */
    stopCall() {
        const callOptions = Object.assign({}, this.resources.stop);
        return callOptions;
    }
    /**
     * Communication channel
     *
     * LWM2M path: /1024//48
     *
     * @tapVersion(">=1.11")
     * @param data input
     * @return
     */
    send(
    /*
     *
     */
    data) {
        return this.serviceCallRunner.execute(this.sendCall(data));
    }
    /**
     *
     *
     * LWM2M path: /1024//48
     *
     * @tapVersion(">=1.11")
     * @param data input
     * @return call options
     */
    sendCall(
    /*
     *
     */
    data) {
        const callOptions = Object.assign({}, this.resources.send);
        callOptions.body = data;
        return callOptions;
    }
    /**
     * Exchange new Initialization Vectors
     *
     * LWM2M path: /1024//45
     *
     * @tapVersion(">=1.85")
     * @param data input
     * @return
     */
    setInitializationVector(
    /*
     * 16 bytes initialization vector
     */
    data) {
        return this.serviceCallRunner.execute(this.setInitializationVectorCall(data));
    }
    /**
     *
     *
     * LWM2M path: /1024//45
     *
     * @tapVersion(">=1.85")
     * @param data input
     * @return call options
     */
    setInitializationVectorCall(
    /*
     * 16 bytes initialization vector
     */
    data) {
        const callOptions = Object.assign({}, this.resources.setInitializationVector);
        callOptions.body = data;
        return callOptions;
    }
    /**
     * Communication channel with encryption initialization vectory
     *
     * LWM2M path: /1024//44
     *
     * @tapVersion(">=1.85")
     * @param data input
     * @return
     */
    sendWithIV(
    /*
     *
     */
    data) {
        return this.serviceCallRunner.execute(this.sendWithIVCall(data));
    }
    /**
     *
     *
     * LWM2M path: /1024//44
     *
     * @tapVersion(">=1.85")
     * @param data input
     * @return call options
     */
    sendWithIVCall(
    /*
     *
     */
    data) {
        const callOptions = Object.assign({}, this.resources.sendWithIV);
        callOptions.body = data;
        return callOptions;
    }
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3NlcnZpY2UvaW1wbC9zY3JhbS9zcmMvbGliL2dlbmVyYXRlZC9zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlBLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQU1oRCxPQUFPLEVBQUUsZUFBZSxFQUFtQixNQUFNLGFBQWEsQ0FBQztBQUUvRCxNQUFNLE9BQU8sWUFBYSxTQUFRLGVBQWU7SUFBakQ7O1FBQ1MsY0FBUyxHQUFHLGFBQWEsQ0FBQztJQWlVbkMsQ0FBQztJQS9UQzs7Ozs7Ozs7T0FRRztJQUNILEtBQUs7SUFDSDs7T0FFRztJQUNILE1BQXdCO1FBRXhCLE9BQU8sSUFBSSxDQUFDLGlCQUFpQixDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7SUFDaEUsQ0FBQztJQUVEOzs7Ozs7OztPQVFHO0lBQ0gsU0FBUztJQUNQOztPQUVHO0lBQ0gsTUFBd0I7UUFFeEIsTUFBTSxXQUFXLHFCQUFRLElBQUksQ0FBQyxTQUFTLENBQUMsS0FBSyxDQUFFLENBQUM7UUFFaEQsV0FBVyxDQUFDLElBQUksR0FBRyxNQUFNLENBQUM7UUFFMUIsT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