@p7m/ldap-backend 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,238 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _LdapAccount = _interopRequireDefault(require("../model/LdapAccount"));
9
+ var _ListWrapperLdapAccount = _interopRequireDefault(require("../model/ListWrapperLdapAccount"));
10
+ var _NewLdapAccount = _interopRequireDefault(require("../model/NewLdapAccount"));
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
12
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
13
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
15
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
18
+ * WiFi Account Backend
19
+ * Manage WiFi accounts via LDAP directory
20
+ *
21
+ * The version of the OpenAPI document: 0.1.0
22
+ * Contact: tech@p7m.de
23
+ *
24
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
+ * https://openapi-generator.tech
26
+ * Do not edit the class manually.
27
+ *
28
+ */
29
+ /**
30
+ * Account service.
31
+ * @module api/AccountApi
32
+ * @version 0.1.0
33
+ */
34
+ var AccountApi = exports["default"] = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new AccountApi.
37
+ * @alias module:api/AccountApi
38
+ * @class
39
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
40
+ * default to {@link module:ApiClient#instance} if unspecified.
41
+ */
42
+ function AccountApi(apiClient) {
43
+ _classCallCheck(this, AccountApi);
44
+ this.apiClient = apiClient || _ApiClient["default"].instance;
45
+ }
46
+
47
+ /**
48
+ * Delete a single LDAP/WiFi account by its ID
49
+ * @param {String} accountId ID of the LDAP/WiFi accuont
50
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
51
+ */
52
+ return _createClass(AccountApi, [{
53
+ key: "deleteAccountsAccountIdWithHttpInfo",
54
+ value: function deleteAccountsAccountIdWithHttpInfo(accountId) {
55
+ var postBody = null;
56
+ // verify the required parameter 'accountId' is set
57
+ if (accountId === undefined || accountId === null) {
58
+ throw new Error("Missing the required parameter 'accountId' when calling deleteAccountsAccountId");
59
+ }
60
+ var pathParams = {
61
+ 'account_id': accountId
62
+ };
63
+ var queryParams = {};
64
+ var headerParams = {};
65
+ var formParams = {};
66
+ var authNames = ['oauth'];
67
+ var contentTypes = [];
68
+ var accepts = [];
69
+ var returnType = null;
70
+ return this.apiClient.callApi('/accounts/{account_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
71
+ }
72
+
73
+ /**
74
+ * Delete a single LDAP/WiFi account by its ID
75
+ * @param {String} accountId ID of the LDAP/WiFi accuont
76
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}
77
+ */
78
+ }, {
79
+ key: "deleteAccountsAccountId",
80
+ value: function deleteAccountsAccountId(accountId) {
81
+ return this.deleteAccountsAccountIdWithHttpInfo(accountId).then(function (response_and_data) {
82
+ return response_and_data.data;
83
+ });
84
+ }
85
+
86
+ /**
87
+ * Get the list of all LDAP/WiFi accounts
88
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListWrapperLdapAccount} and HTTP response
89
+ */
90
+ }, {
91
+ key: "getAccountsWithHttpInfo",
92
+ value: function getAccountsWithHttpInfo() {
93
+ var postBody = null;
94
+ var pathParams = {};
95
+ var queryParams = {};
96
+ var headerParams = {};
97
+ var formParams = {};
98
+ var authNames = ['oauth'];
99
+ var contentTypes = [];
100
+ var accepts = ['application/json'];
101
+ var returnType = _ListWrapperLdapAccount["default"];
102
+ return this.apiClient.callApi('/accounts', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
103
+ }
104
+
105
+ /**
106
+ * Get the list of all LDAP/WiFi accounts
107
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListWrapperLdapAccount}
108
+ */
109
+ }, {
110
+ key: "getAccounts",
111
+ value: function getAccounts() {
112
+ return this.getAccountsWithHttpInfo().then(function (response_and_data) {
113
+ return response_and_data.data;
114
+ });
115
+ }
116
+
117
+ /**
118
+ * Get a single LDAP/WiFi account by its ID
119
+ * @param {String} accountId ID of the account
120
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/LdapAccount} and HTTP response
121
+ */
122
+ }, {
123
+ key: "getAccountsAccountIdWithHttpInfo",
124
+ value: function getAccountsAccountIdWithHttpInfo(accountId) {
125
+ var postBody = null;
126
+ // verify the required parameter 'accountId' is set
127
+ if (accountId === undefined || accountId === null) {
128
+ throw new Error("Missing the required parameter 'accountId' when calling getAccountsAccountId");
129
+ }
130
+ var pathParams = {
131
+ 'account_id': accountId
132
+ };
133
+ var queryParams = {};
134
+ var headerParams = {};
135
+ var formParams = {};
136
+ var authNames = ['oauth'];
137
+ var contentTypes = [];
138
+ var accepts = ['application/json'];
139
+ var returnType = _LdapAccount["default"];
140
+ return this.apiClient.callApi('/accounts/{account_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
141
+ }
142
+
143
+ /**
144
+ * Get a single LDAP/WiFi account by its ID
145
+ * @param {String} accountId ID of the account
146
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/LdapAccount}
147
+ */
148
+ }, {
149
+ key: "getAccountsAccountId",
150
+ value: function getAccountsAccountId(accountId) {
151
+ return this.getAccountsAccountIdWithHttpInfo(accountId).then(function (response_and_data) {
152
+ return response_and_data.data;
153
+ });
154
+ }
155
+
156
+ /**
157
+ * Create a new LDAP/WiFi account
158
+ * @param {module:model/NewLdapAccount} newLdapAccount The LDAP/WiFi account to be created
159
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/LdapAccount} and HTTP response
160
+ */
161
+ }, {
162
+ key: "postAccountsWithHttpInfo",
163
+ value: function postAccountsWithHttpInfo(newLdapAccount) {
164
+ var postBody = newLdapAccount;
165
+ // verify the required parameter 'newLdapAccount' is set
166
+ if (newLdapAccount === undefined || newLdapAccount === null) {
167
+ throw new Error("Missing the required parameter 'newLdapAccount' when calling postAccounts");
168
+ }
169
+ var pathParams = {};
170
+ var queryParams = {};
171
+ var headerParams = {};
172
+ var formParams = {};
173
+ var authNames = ['oauth'];
174
+ var contentTypes = ['application/json'];
175
+ var accepts = ['application/json'];
176
+ var returnType = _LdapAccount["default"];
177
+ return this.apiClient.callApi('/accounts', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
178
+ }
179
+
180
+ /**
181
+ * Create a new LDAP/WiFi account
182
+ * @param {module:model/NewLdapAccount} newLdapAccount The LDAP/WiFi account to be created
183
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/LdapAccount}
184
+ */
185
+ }, {
186
+ key: "postAccounts",
187
+ value: function postAccounts(newLdapAccount) {
188
+ return this.postAccountsWithHttpInfo(newLdapAccount).then(function (response_and_data) {
189
+ return response_and_data.data;
190
+ });
191
+ }
192
+
193
+ /**
194
+ * Update an existing LDAP/WiFi account
195
+ * @param {String} accountId ID of the LDAP/WiFi account
196
+ * @param {module:model/LdapAccount} ldapAccount The updated LDAP/WiFi account
197
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/LdapAccount} and HTTP response
198
+ */
199
+ }, {
200
+ key: "putAccountsAccountIdWithHttpInfo",
201
+ value: function putAccountsAccountIdWithHttpInfo(accountId, ldapAccount) {
202
+ var postBody = ldapAccount;
203
+ // verify the required parameter 'accountId' is set
204
+ if (accountId === undefined || accountId === null) {
205
+ throw new Error("Missing the required parameter 'accountId' when calling putAccountsAccountId");
206
+ }
207
+ // verify the required parameter 'ldapAccount' is set
208
+ if (ldapAccount === undefined || ldapAccount === null) {
209
+ throw new Error("Missing the required parameter 'ldapAccount' when calling putAccountsAccountId");
210
+ }
211
+ var pathParams = {
212
+ 'account_id': accountId
213
+ };
214
+ var queryParams = {};
215
+ var headerParams = {};
216
+ var formParams = {};
217
+ var authNames = ['oauth'];
218
+ var contentTypes = ['application/json'];
219
+ var accepts = ['application/json'];
220
+ var returnType = _LdapAccount["default"];
221
+ return this.apiClient.callApi('/accounts/{account_id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
222
+ }
223
+
224
+ /**
225
+ * Update an existing LDAP/WiFi account
226
+ * @param {String} accountId ID of the LDAP/WiFi account
227
+ * @param {module:model/LdapAccount} ldapAccount The updated LDAP/WiFi account
228
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/LdapAccount}
229
+ */
230
+ }, {
231
+ key: "putAccountsAccountId",
232
+ value: function putAccountsAccountId(accountId, ldapAccount) {
233
+ return this.putAccountsAccountIdWithHttpInfo(accountId, ldapAccount).then(function (response_and_data) {
234
+ return response_and_data.data;
235
+ });
236
+ }
237
+ }]);
238
+ }();
package/dist/index.js ADDED
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "AccountApi", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _AccountApi["default"];
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "ApiClient", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _ApiClient["default"];
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "LdapAccount", {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return _LdapAccount["default"];
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "ListWrapperLdapAccount", {
25
+ enumerable: true,
26
+ get: function get() {
27
+ return _ListWrapperLdapAccount["default"];
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "ListWrapperLdapAccountDataInner", {
31
+ enumerable: true,
32
+ get: function get() {
33
+ return _ListWrapperLdapAccountDataInner["default"];
34
+ }
35
+ });
36
+ Object.defineProperty(exports, "NewLdapAccount", {
37
+ enumerable: true,
38
+ get: function get() {
39
+ return _NewLdapAccount["default"];
40
+ }
41
+ });
42
+ var _ApiClient = _interopRequireDefault(require("./ApiClient"));
43
+ var _LdapAccount = _interopRequireDefault(require("./model/LdapAccount"));
44
+ var _ListWrapperLdapAccount = _interopRequireDefault(require("./model/ListWrapperLdapAccount"));
45
+ var _ListWrapperLdapAccountDataInner = _interopRequireDefault(require("./model/ListWrapperLdapAccountDataInner"));
46
+ var _NewLdapAccount = _interopRequireDefault(require("./model/NewLdapAccount"));
47
+ var _AccountApi = _interopRequireDefault(require("./api/AccountApi"));
48
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
@@ -0,0 +1,184 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
11
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
12
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
13
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
15
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
18
+ * WiFi Account Backend
19
+ * Manage WiFi accounts via LDAP directory
20
+ *
21
+ * The version of the OpenAPI document: 0.1.0
22
+ * Contact: tech@p7m.de
23
+ *
24
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
+ * https://openapi-generator.tech
26
+ * Do not edit the class manually.
27
+ *
28
+ */
29
+ /**
30
+ * The LdapAccount model module.
31
+ * @module model/LdapAccount
32
+ * @version 0.1.0
33
+ */
34
+ var LdapAccount = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>LdapAccount</code>.
37
+ * @alias module:model/LdapAccount
38
+ * @param ldapAccountId {String}
39
+ * @param tenantId {String}
40
+ * @param loginUser {String}
41
+ * @param loginPassword {String}
42
+ * @param validityStart {Date}
43
+ * @param validityEnd {Date}
44
+ * @param lastChange {Date}
45
+ */
46
+ function LdapAccount(ldapAccountId, tenantId, loginUser, loginPassword, validityStart, validityEnd, lastChange) {
47
+ _classCallCheck(this, LdapAccount);
48
+ LdapAccount.initialize(this, ldapAccountId, tenantId, loginUser, loginPassword, validityStart, validityEnd, lastChange);
49
+ }
50
+
51
+ /**
52
+ * Initializes the fields of this object.
53
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
54
+ * Only for internal use.
55
+ */
56
+ return _createClass(LdapAccount, null, [{
57
+ key: "initialize",
58
+ value: function initialize(obj, ldapAccountId, tenantId, loginUser, loginPassword, validityStart, validityEnd, lastChange) {
59
+ obj['ldapAccountId'] = ldapAccountId;
60
+ obj['tenantId'] = tenantId;
61
+ obj['loginUser'] = loginUser;
62
+ obj['loginPassword'] = loginPassword;
63
+ obj['validityStart'] = validityStart;
64
+ obj['validityEnd'] = validityEnd;
65
+ obj['lastChange'] = lastChange;
66
+ }
67
+
68
+ /**
69
+ * Constructs a <code>LdapAccount</code> from a plain JavaScript object, optionally creating a new instance.
70
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
71
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
72
+ * @param {module:model/LdapAccount} obj Optional instance to populate.
73
+ * @return {module:model/LdapAccount} The populated <code>LdapAccount</code> instance.
74
+ */
75
+ }, {
76
+ key: "constructFromObject",
77
+ value: function constructFromObject(data, obj) {
78
+ if (data) {
79
+ obj = obj || new LdapAccount();
80
+ if (data.hasOwnProperty('ldapAccountId')) {
81
+ obj['ldapAccountId'] = _ApiClient["default"].convertToType(data['ldapAccountId'], 'String');
82
+ }
83
+ if (data.hasOwnProperty('tenantId')) {
84
+ obj['tenantId'] = _ApiClient["default"].convertToType(data['tenantId'], 'String');
85
+ }
86
+ if (data.hasOwnProperty('loginUser')) {
87
+ obj['loginUser'] = _ApiClient["default"].convertToType(data['loginUser'], 'String');
88
+ }
89
+ if (data.hasOwnProperty('loginPassword')) {
90
+ obj['loginPassword'] = _ApiClient["default"].convertToType(data['loginPassword'], 'String');
91
+ }
92
+ if (data.hasOwnProperty('validityStart')) {
93
+ obj['validityStart'] = _ApiClient["default"].convertToType(data['validityStart'], 'Date');
94
+ }
95
+ if (data.hasOwnProperty('validityEnd')) {
96
+ obj['validityEnd'] = _ApiClient["default"].convertToType(data['validityEnd'], 'Date');
97
+ }
98
+ if (data.hasOwnProperty('lastChange')) {
99
+ obj['lastChange'] = _ApiClient["default"].convertToType(data['lastChange'], 'Date');
100
+ }
101
+ }
102
+ return obj;
103
+ }
104
+
105
+ /**
106
+ * Validates the JSON data with respect to <code>LdapAccount</code>.
107
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
108
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>LdapAccount</code>.
109
+ */
110
+ }, {
111
+ key: "validateJSON",
112
+ value: function validateJSON(data) {
113
+ // check to make sure all required properties are present in the JSON string
114
+ var _iterator = _createForOfIteratorHelper(LdapAccount.RequiredProperties),
115
+ _step;
116
+ try {
117
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
118
+ var property = _step.value;
119
+ if (!data.hasOwnProperty(property)) {
120
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
121
+ }
122
+ }
123
+ // ensure the json data is a string
124
+ } catch (err) {
125
+ _iterator.e(err);
126
+ } finally {
127
+ _iterator.f();
128
+ }
129
+ if (data['ldapAccountId'] && !(typeof data['ldapAccountId'] === 'string' || data['ldapAccountId'] instanceof String)) {
130
+ throw new Error("Expected the field `ldapAccountId` to be a primitive type in the JSON string but got " + data['ldapAccountId']);
131
+ }
132
+ // ensure the json data is a string
133
+ if (data['tenantId'] && !(typeof data['tenantId'] === 'string' || data['tenantId'] instanceof String)) {
134
+ throw new Error("Expected the field `tenantId` to be a primitive type in the JSON string but got " + data['tenantId']);
135
+ }
136
+ // ensure the json data is a string
137
+ if (data['loginUser'] && !(typeof data['loginUser'] === 'string' || data['loginUser'] instanceof String)) {
138
+ throw new Error("Expected the field `loginUser` to be a primitive type in the JSON string but got " + data['loginUser']);
139
+ }
140
+ // ensure the json data is a string
141
+ if (data['loginPassword'] && !(typeof data['loginPassword'] === 'string' || data['loginPassword'] instanceof String)) {
142
+ throw new Error("Expected the field `loginPassword` to be a primitive type in the JSON string but got " + data['loginPassword']);
143
+ }
144
+ return true;
145
+ }
146
+ }]);
147
+ }();
148
+ LdapAccount.RequiredProperties = ["ldapAccountId", "tenantId", "loginUser", "loginPassword", "validityStart", "validityEnd", "lastChange"];
149
+
150
+ /**
151
+ * @member {String} ldapAccountId
152
+ */
153
+ LdapAccount.prototype['ldapAccountId'] = undefined;
154
+
155
+ /**
156
+ * @member {String} tenantId
157
+ */
158
+ LdapAccount.prototype['tenantId'] = undefined;
159
+
160
+ /**
161
+ * @member {String} loginUser
162
+ */
163
+ LdapAccount.prototype['loginUser'] = undefined;
164
+
165
+ /**
166
+ * @member {String} loginPassword
167
+ */
168
+ LdapAccount.prototype['loginPassword'] = undefined;
169
+
170
+ /**
171
+ * @member {Date} validityStart
172
+ */
173
+ LdapAccount.prototype['validityStart'] = undefined;
174
+
175
+ /**
176
+ * @member {Date} validityEnd
177
+ */
178
+ LdapAccount.prototype['validityEnd'] = undefined;
179
+
180
+ /**
181
+ * @member {Date} lastChange
182
+ */
183
+ LdapAccount.prototype['lastChange'] = undefined;
184
+ var _default = exports["default"] = LdapAccount;
@@ -0,0 +1,130 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _ListWrapperLdapAccountDataInner = _interopRequireDefault(require("./ListWrapperLdapAccountDataInner"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
11
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
12
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
13
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
14
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
16
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
19
+ * WiFi Account Backend
20
+ * Manage WiFi accounts via LDAP directory
21
+ *
22
+ * The version of the OpenAPI document: 0.1.0
23
+ * Contact: tech@p7m.de
24
+ *
25
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
+ * https://openapi-generator.tech
27
+ * Do not edit the class manually.
28
+ *
29
+ */
30
+ /**
31
+ * The ListWrapperLdapAccount model module.
32
+ * @module model/ListWrapperLdapAccount
33
+ * @version 0.1.0
34
+ */
35
+ var ListWrapperLdapAccount = /*#__PURE__*/function () {
36
+ /**
37
+ * Constructs a new <code>ListWrapperLdapAccount</code>.
38
+ * @alias module:model/ListWrapperLdapAccount
39
+ * @param data {Array.<module:model/ListWrapperLdapAccountDataInner>}
40
+ */
41
+ function ListWrapperLdapAccount(data) {
42
+ _classCallCheck(this, ListWrapperLdapAccount);
43
+ ListWrapperLdapAccount.initialize(this, data);
44
+ }
45
+
46
+ /**
47
+ * Initializes the fields of this object.
48
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
49
+ * Only for internal use.
50
+ */
51
+ return _createClass(ListWrapperLdapAccount, null, [{
52
+ key: "initialize",
53
+ value: function initialize(obj, data) {
54
+ obj['data'] = data;
55
+ }
56
+
57
+ /**
58
+ * Constructs a <code>ListWrapperLdapAccount</code> from a plain JavaScript object, optionally creating a new instance.
59
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
60
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
61
+ * @param {module:model/ListWrapperLdapAccount} obj Optional instance to populate.
62
+ * @return {module:model/ListWrapperLdapAccount} The populated <code>ListWrapperLdapAccount</code> instance.
63
+ */
64
+ }, {
65
+ key: "constructFromObject",
66
+ value: function constructFromObject(data, obj) {
67
+ if (data) {
68
+ obj = obj || new ListWrapperLdapAccount();
69
+ if (data.hasOwnProperty('data')) {
70
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_ListWrapperLdapAccountDataInner["default"]]);
71
+ }
72
+ }
73
+ return obj;
74
+ }
75
+
76
+ /**
77
+ * Validates the JSON data with respect to <code>ListWrapperLdapAccount</code>.
78
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
79
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListWrapperLdapAccount</code>.
80
+ */
81
+ }, {
82
+ key: "validateJSON",
83
+ value: function validateJSON(data) {
84
+ // check to make sure all required properties are present in the JSON string
85
+ var _iterator = _createForOfIteratorHelper(ListWrapperLdapAccount.RequiredProperties),
86
+ _step;
87
+ try {
88
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
89
+ var property = _step.value;
90
+ if (!data.hasOwnProperty(property)) {
91
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
92
+ }
93
+ }
94
+ } catch (err) {
95
+ _iterator.e(err);
96
+ } finally {
97
+ _iterator.f();
98
+ }
99
+ if (data['data']) {
100
+ // data not null
101
+ // ensure the json data is an array
102
+ if (!Array.isArray(data['data'])) {
103
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
104
+ }
105
+ // validate the optional field `data` (array)
106
+ var _iterator2 = _createForOfIteratorHelper(data['data']),
107
+ _step2;
108
+ try {
109
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
110
+ var item = _step2.value;
111
+ _ListWrapperLdapAccountDataInner["default"].validateJSON(item);
112
+ }
113
+ } catch (err) {
114
+ _iterator2.e(err);
115
+ } finally {
116
+ _iterator2.f();
117
+ }
118
+ ;
119
+ }
120
+ return true;
121
+ }
122
+ }]);
123
+ }();
124
+ ListWrapperLdapAccount.RequiredProperties = ["data"];
125
+
126
+ /**
127
+ * @member {Array.<module:model/ListWrapperLdapAccountDataInner>} data
128
+ */
129
+ ListWrapperLdapAccount.prototype['data'] = undefined;
130
+ var _default = exports["default"] = ListWrapperLdapAccount;