"use strict";
/**
 * This file has been generated
 * DO NOT EDIT, IT MAY BE OVERWRITTEN
 */
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var abstract_service_1 = require("../abstract-service");
var ScramService = /** @class */ (function (_super) {
    __extends(ScramService, _super);
    function ScramService(client, apiConfig) {
        var _this = _super.call(this, client, apiConfig) || this;
        _this.resources = {
            'getScramHashIt': {
                path: "/scram/scram/hash-it",
                methodType: "get"
            },
            'getScramUserIteration': {
                path: "/group/{groupId}/scram-user-iteration",
                methodType: "get",
                returnTypeConverter: "integer_uint32"
            },
            'getScramUserSalt': {
                path: "/group/{groupId}/scram-user-salt",
                methodType: "get",
                returnTypeConverter: "integer_uint32"
            },
            'initialize': {
                path: "/scram/initialize",
                methodType: "get",
                returnTypeConverter: "Bytes"
            },
            'login': {
                path: "/scram/login",
                methodType: "get",
                returnTypeConverter: "ScramLoginResponseBody",
                bodyEncoder: "ScramLoginParams"
            },
            'loginProof': {
                path: "/scram/login-proof",
                methodType: "get",
                returnTypeConverter: "Bytes",
                bodyEncoder: "Bytes"
            },
            'putScramUserIteration': {
                path: "/group/{groupId}/scram-user-iteration",
                methodType: "put",
                bodyEncoder: "integer_uint32"
            },
            'putScramUserSalt': {
                path: "/group/{groupId}/scram-user-salt",
                methodType: "put",
                bodyEncoder: "integer_uint32"
            },
            'send': {
                path: "/scram/com-send-receive",
                methodType: "get",
                returnTypeConverter: "Bytes",
                bodyEncoder: "Bytes"
            },
        };
        return _this;
    }
    /**
    * Get scram hash it
    * Scram conf iteration counter (i) to be read by client before starting scram login process
    * LWM2M path: /1024//42
    * @return void api call
    */
    ScramService.prototype.getScramHashIt = function () {
        var callOptions = this.resources.getScramHashIt;
        return this._call(callOptions);
    };
    /**
    * Get scram user iteration
    * SCRAM Hash Iteration: Nombre d&#39;itérations utilisé en SCRAM pour le dernier hashage. Nombre &gt;1000, généré aléatoirement à l&#39;écriture de la conf dans l&#39;IoTize.
    * LWM2M path: /1025/{groupId}/7

    * @tapVersion(">=1.0")
    *
    * @param groupId input
    * @return number api call
    */
    ScramService.prototype.getScramUserIteration = function (groupId) {
        var callOptions = this.resources.getScramUserIteration;
        callOptions.pathParameters = {
            "groupId": groupId,
        };
        return this._call(callOptions);
    };
    /**
    * Get scram user salt
    * User-specific salt utilisé (avec le User Name) pour saller les hashs du password StoredKey et ServerKey. Ecrit par Exec/SetPWD
    * LWM2M path: /1025/{groupId}/16

    * @tapVersion(">=1.0")
    *
    * @param groupId input
    * @return number api call
    */
    ScramService.prototype.getScramUserSalt = function (groupId) {
        var callOptions = this.resources.getScramUserSalt;
        callOptions.pathParameters = {
            "groupId": groupId,
        };
        return this._call(callOptions);
    };
    /**
    * Start scram communication
    * Demande d&#39;une clé aléatoire et initiation d&#39;une session CCOM cryptée utilisant ce RNG comme clé de cryptage. Accessible uniquement en NFC.
    * LWM2M path: /1024//47
    * @return Uint8Array api call
    */
    ScramService.prototype.initialize = function () {
        var callOptions = this.resources.initialize;
        return this._call(callOptions);
    };
    /**
    * First command to initiate scram login, for client to send login and nonce to IoTize, and IoTize to return user salt, user iteration counter (j) and combined nonce
    * First command to initiate scram login, for client to send login and nonce to IoTize, and IoTize to return user salt, user iteration counter (j) and combined nonce
    * LWM2M path: /1024//40
    * Body converter id: "ScramLoginParams"

    * @tapVersion(">=1.0")
    *
    * @param params input
    * @return ScramLoginResponseBody api call
    */
    ScramService.prototype.login = function (params) {
        var callOptions = this.resources.login;
        callOptions.body = params;
        callOptions.pathParameters = {};
        return this._call(callOptions);
    };
    /**
    * Scram login proof
    * Second command to finalize scram login, for client to send ClientProof and combined nonce
    * LWM2M path: /1024//41
    * Body converter id: "Bytes"

    * @tapVersion(">=1.0")
    *
    * @param params input
    * @return Uint8Array api call
    */
    ScramService.prototype.loginProof = function (params) {
        var callOptions = this.resources.loginProof;
        callOptions.body = params;
        callOptions.pathParameters = {};
        return this._call(callOptions);
    };
    /**
    * Write scram user iteration
    *
    * LWM2M path: /1025/{groupId}/7
    * Body converter id: "integer_uint32"

    * @tapVersion(">=1.0")
    *
    * @param groupId input

    * @tapVersion(">=1.0")
    *
    * @param value input
    * @return void api call
    */
    ScramService.prototype.putScramUserIteration = function (groupId, value) {
        var callOptions = this.resources.putScramUserIteration;
        callOptions.body = value;
        callOptions.pathParameters = {
            "groupId": groupId,
        };
        return this._call(callOptions);
    };
    /**
    * Write scram user salt
    *
    * LWM2M path: /1025/{groupId}/16
    * Body converter id: "integer_uint32"

    * @tapVersion(">=1.0")
    *
    * @param groupId input

    * @tapVersion(">=1.0")
    *
    * @param value input
    * @return void api call
    */
    ScramService.prototype.putScramUserSalt = function (groupId, value) {
        var callOptions = this.resources.putScramUserSalt;
        callOptions.body = value;
        callOptions.pathParameters = {
            "groupId": groupId,
        };
        return this._call(callOptions);
    };
    /**
    * Communication channel
    * Crypted communication ressource, for sending/receiving commands/responses after the SCRAM or CCOM session is established.
    * LWM2M path: /1024//48
    * Body converter id: "Bytes"

    * @tapVersion(">=1.11")
    *
    * @param data input
    * @return Uint8Array api call
    */
    ScramService.prototype.send = function (data) {
        var callOptions = this.resources.send;
        callOptions.body = data;
        callOptions.pathParameters = {};
        return this._call(callOptions);
    };
    return ScramService;
}(abstract_service_1.AbstractService));
exports.ScramService = ScramService;
