@device-management-toolkit/wsman-messages 5.9.4

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.
Files changed (90) hide show
  1. package/README.md +29 -0
  2. package/WSMan.d.ts +217 -0
  3. package/WSMan.js +395 -0
  4. package/WSMan.js.map +1 -0
  5. package/amt/actions.d.ts +112 -0
  6. package/amt/actions.js +118 -0
  7. package/amt/actions.js.map +1 -0
  8. package/amt/classes.d.ts +33 -0
  9. package/amt/classes.js +38 -0
  10. package/amt/classes.js.map +1 -0
  11. package/amt/index.d.ts +12 -0
  12. package/amt/index.js +17 -0
  13. package/amt/index.js.map +1 -0
  14. package/amt/messages.d.ts +466 -0
  15. package/amt/messages.js +819 -0
  16. package/amt/messages.js.map +1 -0
  17. package/amt/messages.test.d.ts +5 -0
  18. package/amt/messages.test.js +1091 -0
  19. package/amt/messages.test.js.map +1 -0
  20. package/amt/methods.d.ts +42 -0
  21. package/amt/methods.js +47 -0
  22. package/amt/methods.js.map +1 -0
  23. package/amt/models.d.ts +329 -0
  24. package/amt/models.js +7 -0
  25. package/amt/models.js.map +1 -0
  26. package/amt/types.d.ts +206 -0
  27. package/amt/types.js +7 -0
  28. package/amt/types.js.map +1 -0
  29. package/cim/actions.d.ts +9 -0
  30. package/cim/actions.js +14 -0
  31. package/cim/actions.js.map +1 -0
  32. package/cim/classes.d.ts +27 -0
  33. package/cim/classes.js +32 -0
  34. package/cim/classes.js.map +1 -0
  35. package/cim/index.d.ts +12 -0
  36. package/cim/index.js +16 -0
  37. package/cim/index.js.map +1 -0
  38. package/cim/messages.d.ts +136 -0
  39. package/cim/messages.js +215 -0
  40. package/cim/messages.js.map +1 -0
  41. package/cim/messages.test.d.ts +5 -0
  42. package/cim/messages.test.js +408 -0
  43. package/cim/messages.test.js.map +1 -0
  44. package/cim/methods.d.ts +15 -0
  45. package/cim/methods.js +20 -0
  46. package/cim/methods.js.map +1 -0
  47. package/cim/models.d.ts +376 -0
  48. package/cim/models.js +7 -0
  49. package/cim/models.js.map +1 -0
  50. package/cim/types.d.ts +296 -0
  51. package/cim/types.js +7 -0
  52. package/cim/types.js.map +1 -0
  53. package/dist +42 -0
  54. package/index.d.ts +9 -0
  55. package/index.js +49 -0
  56. package/index.js.map +1 -0
  57. package/ips/actions.d.ts +15 -0
  58. package/ips/actions.js +20 -0
  59. package/ips/actions.js.map +1 -0
  60. package/ips/classes.d.ts +12 -0
  61. package/ips/classes.js +17 -0
  62. package/ips/classes.js.map +1 -0
  63. package/ips/index.d.ts +12 -0
  64. package/ips/index.js +16 -0
  65. package/ips/index.js.map +1 -0
  66. package/ips/messages.d.ts +117 -0
  67. package/ips/messages.js +210 -0
  68. package/ips/messages.js.map +1 -0
  69. package/ips/messages.test.d.ts +5 -0
  70. package/ips/messages.test.js +206 -0
  71. package/ips/messages.test.js.map +1 -0
  72. package/ips/methods.d.ts +21 -0
  73. package/ips/methods.js +26 -0
  74. package/ips/methods.js.map +1 -0
  75. package/ips/models.d.ts +59 -0
  76. package/ips/models.js +7 -0
  77. package/ips/models.js.map +1 -0
  78. package/ips/types.d.ts +58 -0
  79. package/ips/types.js +7 -0
  80. package/ips/types.js.map +1 -0
  81. package/models/common.d.ts +104 -0
  82. package/models/common.js +7 -0
  83. package/models/common.js.map +1 -0
  84. package/models/index.d.ts +6 -0
  85. package/models/index.js +43 -0
  86. package/models/index.js.map +1 -0
  87. package/package.json +41 -0
  88. package/wsman.test.d.ts +5 -0
  89. package/wsman.test.js +479 -0
  90. package/wsman.test.js.map +1 -0
@@ -0,0 +1,819 @@
1
+ "use strict";
2
+ /*********************************************************************
3
+ * Copyright (c) Intel Corporation 2021
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ **********************************************************************/
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.Messages = void 0;
8
+ const __1 = require("../");
9
+ const WSMan_1 = require("../WSMan");
10
+ const _1 = require("./");
11
+ class AlarmClockService extends WSMan_1.Base {
12
+ constructor() {
13
+ super(...arguments);
14
+ this.className = _1.Classes.ALARM_CLOCK_SERVICE;
15
+ /**
16
+ * This method creates an alarm that would wake the system at a given time.The method receives as input an embedded instance of type IPS_AlarmClockOccurrence, with the following fields set: StartTime, Interval, InstanceID, DeleteOnCompletion. Upon success, the method creates an instance of IPS_AlarmClockOccurrence which is associated with AlarmClockService.The method would fail if 5 instances or more of IPS_AlarmClockOccurrence already exist in the system.
17
+ * @param alarmClockOccurrence IPS.Models.AlarmClockOccurrence Object
18
+ * @returns string
19
+ */
20
+ this.AddAlarm = (alarmClockOccurrence) => {
21
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.ADD_ALARM, this.className);
22
+ // toIsoString() is adding milliseconds... remove them by taking everything before the '.' and adding back the 'Z'
23
+ const startTime = alarmClockOccurrence.StartTime.toISOString().split('.')[0] + 'Z';
24
+ let body = `<Body><p:AddAlarm_INPUT xmlns:p="${this.wsmanMessageCreator.resourceUriBase}AMT_AlarmClockService"><p:AlarmTemplate><s:InstanceID xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence">${alarmClockOccurrence.InstanceID}</s:InstanceID>`;
25
+ if (alarmClockOccurrence.ElementName != null) {
26
+ body += `<s:ElementName xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence">${alarmClockOccurrence.ElementName}</s:ElementName>`;
27
+ }
28
+ body += `<s:StartTime xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><p:Datetime xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">${startTime}</p:Datetime></s:StartTime>`;
29
+ if (alarmClockOccurrence.Interval != null) {
30
+ const minutes = alarmClockOccurrence.Interval % 60;
31
+ const hours = Math.floor(alarmClockOccurrence.Interval / 60) % 24;
32
+ const days = Math.floor(alarmClockOccurrence.Interval / 1440);
33
+ body += `<s:Interval xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><p:Interval xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">P${days}DT${hours}H${minutes}M</p:Interval></s:Interval>`;
34
+ }
35
+ body += `<s:DeleteOnCompletion xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence">${String(alarmClockOccurrence.DeleteOnCompletion)}</s:DeleteOnCompletion></p:AlarmTemplate></p:AddAlarm_INPUT></Body>`;
36
+ return this.wsmanMessageCreator.createXml(header, body);
37
+ };
38
+ /**
39
+ * Changes properties of the selected instance
40
+ * @param alarmClockService An instance of AlarmClockService
41
+ * @returns string
42
+ */
43
+ this.Put = (alarmClockService) => this.protectedPut(alarmClockService, false);
44
+ }
45
+ }
46
+ class AuditLog extends WSMan_1.Base {
47
+ constructor() {
48
+ super(...arguments);
49
+ this.className = _1.Classes.AUDIT_LOG;
50
+ /**
51
+ * Returns a list of consecutive audit log records in chronological order: The first record in the returned array is the oldest record stored in the log. The record entries are returned as an array of base64Binary elements.
52
+ * @param startIndex Identifies the position of the first record to retrieve. An index of 1 indicates the first record in the log. If startIndex isn't provided, defaults to 1.
53
+ * @returns string
54
+ */
55
+ this.ReadRecords = (startIndex) => {
56
+ if (startIndex === undefined) {
57
+ startIndex = 1;
58
+ }
59
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.READ_RECORDS, this.className);
60
+ const body = this.wsmanMessageCreator.createBody('ReadRecords_INPUT', this.className, [{ StartIndex: startIndex }]);
61
+ return this.wsmanMessageCreator.createXml(header, body);
62
+ };
63
+ }
64
+ }
65
+ class AuthorizationService extends WSMan_1.Base {
66
+ constructor() {
67
+ super(...arguments);
68
+ this.className = _1.Classes.AUTHORIZATION_SERVICE;
69
+ /**
70
+ * Adds a user entry to the Intel(R) AMT device.
71
+ * @param accessPermission Indicates whether the User is allowed to access Intel(R) AMT from the Network or Local Interfaces. Note: this definition is restricted by the Default Interface Access Permissions of each Realm.
72
+ * @param realms Array of interface names the ACL entry is allowed to access.
73
+ * @param digestUsername Username for access control. Contains 7-bit ASCII characters. String length is limited to 16 characters. Username cannot be an empty string.
74
+ * @param digestPassword An MD5 Hash of these parameters concatenated together (Username + ":" + DigestRealm + ":" + Password). The DigestRealm is a field in AMT_GeneralSettings
75
+ * @param kerberosUserSid Descriptor for user (SID) which is authenticated using the Kerberos Authentication. Byte array, specifying the Security Identifier (SID) according to the Kerberos specification. Current requirements imply that SID should be not smaller than 1 byte length and no longer than 28 bytes. SID length should also be a multiplicand of 4.
76
+ * @returns string
77
+ */
78
+ this.AddUserAclEntryEx = (accessPermission, realms, digestUsername, digestPassword, kerberosUserSid) => {
79
+ if ((!digestUsername || !digestPassword) && !kerberosUserSid) {
80
+ throw new Error(WSMan_1.WSManErrors.MISSING_USER_ACL_ENTRY_INFORMATION);
81
+ }
82
+ if (digestUsername && digestUsername.length > 16) {
83
+ throw new Error(WSMan_1.WSManErrors.USERNAME_TOO_LONG);
84
+ }
85
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.ADD_USER_ACL_ENTRY_EX, this.className);
86
+ const aclObject = {
87
+ DigestUsername: digestUsername,
88
+ DigestPassword: digestPassword,
89
+ KerberosUserSid: kerberosUserSid,
90
+ AccessPermission: accessPermission,
91
+ Realms: realms
92
+ };
93
+ const body = this.wsmanMessageCreator.createBody('AddUserAclEntryEx_INPUT', this.className, [aclObject]);
94
+ return this.wsmanMessageCreator.createXml(header, body);
95
+ };
96
+ /**
97
+ * Enumerates entries in the User Access Control List (ACL). Only 50 handles can be returned, so in order to get others startIndex should be bigger than 1.
98
+ * @param startIndex Indicates the first ACL entry to retrieve. if startIndex isn't provided, it will be set to 1
99
+ * @returns string
100
+ */
101
+ this.EnumerateUserAclEntries = (startIndex) => {
102
+ if (!startIndex)
103
+ startIndex = 1;
104
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.ENUMERATE_USER_ACL_ENTRIES, this.className);
105
+ const body = this.wsmanMessageCreator.createBody('EnumerateUserAclEntries_INPUT', this.className, [
106
+ { StartIndex: startIndex }
107
+ ]);
108
+ return this.wsmanMessageCreator.createXml(header, body);
109
+ };
110
+ /**
111
+ * Gets the state of a user ACL entry (enabled/disabled)
112
+ * @param handle Specifies the ACL entry
113
+ * @returns string
114
+ */
115
+ this.GetAclEnabledState = (handle) => {
116
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.GET_ACL_ENABLED_STATE, this.className);
117
+ const body = this.wsmanMessageCreator.createBody('GetAclEnabledState_INPUT', this.className, [
118
+ { Handle: handle }
119
+ ]);
120
+ return this.wsmanMessageCreator.createXml(header, body);
121
+ };
122
+ /**
123
+ * Returns the username attribute of the Admin ACL.
124
+ * @returns string
125
+ */
126
+ this.GetAdminAclEntry = () => {
127
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.GET_ADMIN_ACL_ENTRY, this.className);
128
+ const body = this.wsmanMessageCreator.createBody('GetAdminAclEntry_INPUT', this.className, [{}]);
129
+ return this.wsmanMessageCreator.createXml(header, body);
130
+ };
131
+ /**
132
+ * Reads the Admin ACL Entry status from Intel(R) AMT. The return state changes as a function of the admin password. TRUE if the admin ACL entry (admin password) was never changed by the user. Otherwise, the parameter is FALSE.
133
+ * @returns string
134
+ */
135
+ this.GetAdminAclEntryStatus = () => {
136
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.GET_ADMIN_ACL_ENTRY_STATUS, this.className);
137
+ const body = this.wsmanMessageCreator.createBody('GetAdminAclEntryStatus_INPUT', this.className, [{}]);
138
+ return this.wsmanMessageCreator.createXml(header, body);
139
+ };
140
+ /**
141
+ * Reads the remote Admin ACL Entry status from Intel(R) AMT. The return state changes as a function of the remote admin password. TRUE if the admin ACL entry (admin password) was never changed by the user. Otherwise, the parameter is FALSE.
142
+ * @returns string
143
+ */
144
+ this.GetAdminNetAclEntryStatus = () => {
145
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.GET_ADMIN_NET_ACL_ENTRY_STATUS, this.className);
146
+ const body = this.wsmanMessageCreator.createBody('GetAdminNetAclEntryStatus_INPUT', this.className, [{}]);
147
+ return this.wsmanMessageCreator.createXml(header, body);
148
+ };
149
+ /**
150
+ * Reads a user entry from the Intel(R) AMT device. Note: confidential information, such as password (hash) is omitted or zeroed in the response.
151
+ * @param handle Specifies the ACL entry to fetch.
152
+ * @returns string
153
+ */
154
+ this.GetUserAclEntryEx = (handle) => {
155
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.GET_USER_ACL_ENTRY_EX, this.className);
156
+ const body = this.wsmanMessageCreator.createBody('GetUserAclEntryEx_INPUT', this.className, [
157
+ { Handle: handle }
158
+ ]);
159
+ return this.wsmanMessageCreator.createXml(header, body);
160
+ };
161
+ /**
162
+ * Removes an entry from the User Access Control List (ACL), given a handle.
163
+ * @param handle Specifies the ACL entry to be removed.
164
+ * @returns string
165
+ */
166
+ this.RemoveUserAclEntry = (handle) => {
167
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.REMOVE_USER_ACL_ENTRY, this.className);
168
+ const body = this.wsmanMessageCreator.createBody('RemoveUserAclEntry_INPUT', this.className, [
169
+ { Handle: handle }
170
+ ]);
171
+ return this.wsmanMessageCreator.createXml(header, body);
172
+ };
173
+ /**
174
+ * Enables or disables a user ACL entry.Disabling ACL entries is useful when accounts that cannot be removed (system accounts - starting with $$) are required to be disabled.
175
+ * @param handle Specifies the ACL entry to update
176
+ * @param enabled Specifies the state of the ACL entry
177
+ * @returns string
178
+ */
179
+ this.SetAclEnabledState = (handle, enabled) => {
180
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.SET_ACL_ENABLED_STATE, this.className);
181
+ const body = this.wsmanMessageCreator.createBody('SetAclEnabledState_INPUT', this.className, [
182
+ { Handle: handle, Enabled: enabled }
183
+ ]);
184
+ return this.wsmanMessageCreator.createXml(header, body);
185
+ };
186
+ /**
187
+ * Updates an Admin entry in the Intel(R) AMT device.
188
+ * @param username Username for access control. Contains 7-bit ASCII characters. String length is limited to 16 characters. Username cannot be an empty string.
189
+ * @param digestPassword An MD5 Hash of these parameters concatenated together (Username + ":" + DigestRealm + ":" + Password). The DigestRealm is a field in AMT_GeneralSettings.
190
+ * @returns string
191
+ */
192
+ this.SetAdminACLEntryEx = (username, digestPassword) => {
193
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.SET_ADMIN_ACL_ENTRY_EX, this.className);
194
+ const body = this.wsmanMessageCreator.createBody('SetAdminAclEntryEx_INPUT', this.className, [
195
+ {
196
+ Username: username,
197
+ DigestPassword: digestPassword
198
+ }
199
+ ]);
200
+ return this.wsmanMessageCreator.createXml(header, body);
201
+ };
202
+ /**
203
+ * Updates a user entry in the Intel(R) AMT device.
204
+ * @param handle Creation handle to a User ACL entry.
205
+ * @param accessPermission Indicates whether the User is allowed to access Intel(R) AMT from the Network or Local Interfaces. Note: this definition is restricted by the Default Interface Access Permissions of each Realm.
206
+ * @param realms Array of interface names the ACL entry is allowed to access.
207
+ * @param digestUsername Username for access control. Contains 7-bit ASCII characters. String length is limited to 16 characters. Username cannot be an empty string.
208
+ * @param digestPassword An MD5 Hash of these parameters concatenated together (Username + ":" + DigestRealm + ":" + Password). The DigestRealm is a field in AMT_GeneralSettings
209
+ * @param kerberosUserSid Descriptor for user (SID) which is authenticated using the Kerberos Authentication. Byte array, specifying the Security Identifier (SID) according to the Kerberos specification. Current requirements imply that SID should be not smaller than 1 byte length and no longer than 28 bytes. SID length should also be a multiplicand of 4.
210
+ * @returns string
211
+ */
212
+ this.UpdateUserAclEntryEx = (handle, accessPermission, realms, digestUsername, digestPassword, kerberosUserSid) => {
213
+ if ((!digestUsername || !digestPassword) && !kerberosUserSid) {
214
+ throw new Error(WSMan_1.WSManErrors.MISSING_USER_ACL_ENTRY_INFORMATION);
215
+ }
216
+ if (digestUsername && digestUsername.length > 16) {
217
+ throw new Error(WSMan_1.WSManErrors.USERNAME_TOO_LONG);
218
+ }
219
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.UPDATE_USER_ACL_ENTRY_EX, this.className);
220
+ const aclObject = {
221
+ Handle: handle,
222
+ DigestUsername: digestUsername,
223
+ DigestPassword: digestPassword,
224
+ KerberosUserSid: kerberosUserSid,
225
+ AccessPermission: accessPermission,
226
+ Realms: realms
227
+ };
228
+ const body = this.wsmanMessageCreator.createBody('UpdateUserAclEntryEx_INPUT', this.className, [aclObject]);
229
+ return this.wsmanMessageCreator.createXml(header, body);
230
+ };
231
+ }
232
+ }
233
+ class BootCapabilities extends WSMan_1.Base {
234
+ constructor() {
235
+ super(...arguments);
236
+ this.className = _1.Classes.BOOT_CAPABILITIES;
237
+ }
238
+ }
239
+ class BootSettingData extends WSMan_1.Base {
240
+ constructor() {
241
+ super(...arguments);
242
+ this.className = _1.Classes.BOOT_SETTING_DATA;
243
+ /**
244
+ * Changes properties of BootSettingData.
245
+ * @param bootSettingData BootSettingData Object.
246
+ * @returns string
247
+ */
248
+ this.Put = (bootSettingData) => this.protectedPut(bootSettingData, false);
249
+ }
250
+ }
251
+ class EnvironmentDetectionSettingData extends WSMan_1.Base {
252
+ constructor() {
253
+ super(...arguments);
254
+ this.className = _1.Classes.ENVIRONMENT_DETECTION_SETTING_DATA;
255
+ /**
256
+ * Changes properties of EnvironmentDetectionSettingData.
257
+ * @param environmentDetectionSettingData EnvironmentDetectionSettingData Object.
258
+ * @returns string
259
+ */
260
+ this.Put = (environmentDetectionSettingData) => this.protectedPut(environmentDetectionSettingData, true);
261
+ }
262
+ }
263
+ class EthernetPortSettings extends WSMan_1.Base {
264
+ constructor() {
265
+ super(...arguments);
266
+ this.className = _1.Classes.ETHERNET_PORT_SETTINGS;
267
+ /**
268
+ * Changes properties of the EthernetPortSettings.
269
+ * @param ethernetPortObject EthernetPortSettings Object.
270
+ * @returns string
271
+ */
272
+ this.Put = (ethernetPortObject) => this.protectedPut(ethernetPortObject, true);
273
+ }
274
+ }
275
+ class GeneralSettings extends WSMan_1.Base {
276
+ constructor() {
277
+ super(...arguments);
278
+ this.className = _1.Classes.GENERAL_SETTINGS;
279
+ /**
280
+ * Changes properties of GeneralSettings.
281
+ * @param generalSettings GeneralSettings Object.
282
+ * @returns string
283
+ */
284
+ this.Put = (generalSettings) => this.protectedPut(generalSettings, false);
285
+ }
286
+ }
287
+ class IEEE8021xCredentialContext extends WSMan_1.Base {
288
+ constructor() {
289
+ super(...arguments);
290
+ this.className = _1.Classes.IEEE8021X_CREDENTIAL_CONTEXT;
291
+ }
292
+ }
293
+ class IEEE8021xProfile extends WSMan_1.Base {
294
+ constructor() {
295
+ super(...arguments);
296
+ this.className = _1.Classes.IEEE8021X_PROFILE;
297
+ /**
298
+ * Changes properties of IEEE8021xProfile
299
+ * @param ieee8021xProfile IEEE8021xProfile Object
300
+ * @returns string
301
+ */
302
+ this.Put = (ieee8021xProfile) => this.protectedPut(ieee8021xProfile, false);
303
+ }
304
+ }
305
+ class KerberosSettingData extends WSMan_1.Base {
306
+ constructor() {
307
+ super(...arguments);
308
+ this.className = _1.Classes.KERBEROS_SETTING_DATA;
309
+ /**
310
+ * Gets the current state of the credential caching functionality
311
+ * @returns string
312
+ */
313
+ this.GetCredentialCacheState = () => {
314
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.GET_CREDENTIAL_CACHE_STATE, this.className);
315
+ const body = this.wsmanMessageCreator.createBody('GetCredentialCacheState_INPUT', this.className);
316
+ return this.wsmanMessageCreator.createXml(header, body);
317
+ };
318
+ /**
319
+ * Enables/disables the credential caching functionality
320
+ * @param enabled New state of the functionality
321
+ * @returns string
322
+ */
323
+ this.SetCredentialCacheState = (enabled) => {
324
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.SET_CREDENTIAL_CACHE_STATE, this.className);
325
+ const body = this.wsmanMessageCreator.createBody('SetCredentialCacheState_INPUT', this.className, [enabled]);
326
+ return this.wsmanMessageCreator.createXml(header, body);
327
+ };
328
+ }
329
+ }
330
+ class ManagementPresenceRemoteSAP extends WSMan_1.Base {
331
+ constructor() {
332
+ super(...arguments);
333
+ this.className = _1.Classes.MANAGEMENT_PRESENCE_REMOTE_SAP;
334
+ /**
335
+ * Deletes an instance
336
+ * @param selector indicates the instance
337
+ * @returns string
338
+ */
339
+ this.Delete = (selector) => this.protectedDelete(selector);
340
+ }
341
+ }
342
+ class MessageLog extends WSMan_1.Base {
343
+ constructor() {
344
+ super(...arguments);
345
+ this.className = _1.Classes.MESSAGE_LOG;
346
+ /**
347
+ * Retrieves multiple records from MessageLog.
348
+ * @param identifier the IterationIdentifier input parameter is a numeric value (starting at 1) which is the position of the first record in the log that should be extracted. If identifier isn't provided, defaults to 1.
349
+ * @returns string
350
+ */
351
+ this.GetRecords = (identifier) => {
352
+ if (identifier === undefined) {
353
+ identifier = 1;
354
+ }
355
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.GET_RECORDS, this.className);
356
+ const body = this.wsmanMessageCreator.createBody('GetRecords_INPUT', this.className, [
357
+ { IterationIdentifier: identifier, MaxReadRecords: 390 }
358
+ ]);
359
+ return this.wsmanMessageCreator.createXml(header, body);
360
+ };
361
+ /**
362
+ * Requests that an iteration of the MessageLog be established and that the iterator be set to the first entry in the Log. An identifier for the iterator is returned as an output parameter of the method.
363
+ * @returns string
364
+ */
365
+ this.PositionToFirstRecord = () => {
366
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.POSITION_TO_FIRST_RECORD, this.className);
367
+ const body = `<Body><h:PositionToFirstRecord_INPUT xmlns:h="${this.wsmanMessageCreator.resourceUriBase}${this.className}" /></Body>`;
368
+ return this.wsmanMessageCreator.createXml(header, body);
369
+ };
370
+ }
371
+ }
372
+ class MPSUsernamePassword extends WSMan_1.Base {
373
+ constructor() {
374
+ super(...arguments);
375
+ this.className = _1.Classes.MPS_USERNAME_PASSWORD;
376
+ /**
377
+ * Changes properties of MPSUsernamePassword.
378
+ * @param mpsUsernamePassword MPSUsernamePassword Object.
379
+ * @returns string
380
+ */
381
+ this.Put = (mpsUsernamePassword) => this.protectedPut(mpsUsernamePassword, false);
382
+ }
383
+ }
384
+ class PublicKeyCertificate extends WSMan_1.Base {
385
+ constructor() {
386
+ super(...arguments);
387
+ this.className = _1.Classes.PUBLIC_KEY_CERTIFICATE;
388
+ /**
389
+ * Deletes an instance
390
+ * @param selector indicates the instance
391
+ * @returns string
392
+ */
393
+ this.Delete = (selector) => this.protectedDelete(selector);
394
+ /**
395
+ * Changes properties of PublicKeyCertificate.
396
+ * @param publicKeyCertificate Public Key Certificate object
397
+ * @returns string
398
+ */
399
+ this.Put = (publicKeyCertificate) => this.protectedPut(publicKeyCertificate, false);
400
+ }
401
+ }
402
+ class PublicKeyManagementService extends WSMan_1.Base {
403
+ constructor() {
404
+ super(...arguments);
405
+ this.className = _1.Classes.PUBLIC_KEY_MANAGEMENT_SERVICE;
406
+ /**
407
+ * This method adds new certificate to the Intel(R) AMT CertStore. A certificate cannot be removed if it is referenced (for example, used by TLS, 802.1X or EAC).
408
+ * @param addCertificate AddCertificate Object
409
+ * @returns string
410
+ */
411
+ this.AddCertificate = (addCertificate) => {
412
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.ADD_CERTIFICATE, this.className);
413
+ const body = this.wsmanMessageCreator.createBody('AddCertificate_INPUT', this.className, [addCertificate]);
414
+ return this.wsmanMessageCreator.createXml(header, body);
415
+ };
416
+ /**
417
+ * This function adds new certificate key to the Intel(R) AMT CertStore. A key cannot be removed if its corresponding certificate is referenced (for example, used by TLS or 802.1X).
418
+ * @param keyBlob RSA Key encoded as DES PKCS#1
419
+ * @returns string
420
+ */
421
+ this.AddKey = (keyBlob) => {
422
+ const keyObj = {
423
+ KeyBlob: keyBlob
424
+ };
425
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.ADD_KEY, this.className);
426
+ const body = this.wsmanMessageCreator.createBody('AddKey_INPUT', this.className, [keyObj]);
427
+ return this.wsmanMessageCreator.createXml(header, body);
428
+ };
429
+ /**
430
+ * This method adds new root certificate to the Intel(R) AMT CertStore. A certificate cannot be removed if it is referenced (for example, used by TLS, 802.1X or EAC).
431
+ * @param addCertificate AddCertificate Object
432
+ * @returns string
433
+ */
434
+ this.AddTrustedRootCertificate = (addCertificate) => {
435
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.ADD_TRUSTED_ROOT_CERTIFICATE, this.className);
436
+ const body = this.wsmanMessageCreator.createBody('AddTrustedRootCertificate_INPUT', this.className, [
437
+ addCertificate
438
+ ]);
439
+ return this.wsmanMessageCreator.createXml(header, body);
440
+ };
441
+ /**
442
+ * This method is used to generate a key in the FW.
443
+ * @param keyPairParameters KeyPairParameters Object
444
+ * @returns string
445
+ */
446
+ this.GenerateKeyPair = (keyPairParameters) => {
447
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.GENERATE_KEY_PAIR, this.className);
448
+ const body = this.wsmanMessageCreator.createBody('GenerateKeyPair_INPUT', this.className, [keyPairParameters]);
449
+ return this.wsmanMessageCreator.createXml(header, body);
450
+ };
451
+ /**
452
+ * This method is used to create a PKCS#10 certificate signing request based on a key from the key store.
453
+ * @param pkcs10Request PKCS10Request Object
454
+ * @returns string
455
+ */
456
+ this.GeneratePKCS10RequestEx = (pkcs10Request) => {
457
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.GENERATE_PKCS10_REQUEST_EX, this.className);
458
+ const body = this.wsmanMessageCreator.createBody('GeneratePKCS10RequestEx_INPUT', this.className, [pkcs10Request]);
459
+ return this.wsmanMessageCreator.createXml(header, body);
460
+ };
461
+ }
462
+ }
463
+ class PublicPrivateKeyPair extends WSMan_1.Base {
464
+ constructor() {
465
+ super(...arguments);
466
+ this.className = _1.Classes.PUBLIC_PRIVATE_KEY_PAIR; /**
467
+ * Deletes an instance
468
+ * @param selector indicates the instance
469
+ * @returns string
470
+ */
471
+ this.Delete = (selector) => this.protectedDelete(selector);
472
+ }
473
+ }
474
+ class RedirectionService extends WSMan_1.Base {
475
+ constructor() {
476
+ super(...arguments);
477
+ this.className = _1.Classes.REDIRECTION_SERVICE;
478
+ /**
479
+ * Changes properties of RedirectionService.
480
+ * @param redirectionService RedirectionService Object.
481
+ * @returns string
482
+ */
483
+ this.Put = (redirectionService) => this.protectedPut(redirectionService, false);
484
+ /**
485
+ * Requests that the state of the element be changed to the value specified in the RequestedState parameter. The supported values in requestedState are 32768-32771.
486
+ * @param requestedState The state requested for the element. This information will be placed into the RequestedState property of the instance if the return code of the RequestStateChange method is 0 ('Completed with No Error'), 3 ('Timeout'), or 4096 (0x1000) ('Job Started'). Refer to the description of the EnabledState and RequestedState properties for the detailed explanations of the RequestedState values.
487
+ * @value_map 32768 = disable IDER and SOL, 32769 = enable IDER and disable SOL, 32770 = enable SOL and disable IDER, 32771 = enable IDER and SOL
488
+ * @returns string
489
+ */
490
+ this.RequestStateChange = (requestedState) => this.protectedRequestStateChange(`http://intel.com/wbem/wscim/1/amt-schema/1/${this.className}/RequestStateChange`, requestedState);
491
+ }
492
+ }
493
+ class RemoteAccessPolicyAppliesToMPS extends WSMan_1.Base {
494
+ constructor() {
495
+ super(...arguments);
496
+ this.className = _1.Classes.REMOTE_ACCESS_POLICY_APPLIES_TO_MPS;
497
+ /**
498
+ * Deletes an instance
499
+ * @param selector indicates the instance
500
+ * @returns string
501
+ */
502
+ this.Delete = (selector) => this.protectedDelete(selector);
503
+ /**
504
+ * Creates an instance of RemoteAccessPolicyAppliesToMPS
505
+ * @param remoteAccessPolicyAppliesToMPS RemoteAccessPolicyAppliesToMPS Object
506
+ * @returns string
507
+ */
508
+ this.Create = (remoteAccessPolicyAppliesToMPS) => this.protectedCreate(remoteAccessPolicyAppliesToMPS);
509
+ /**
510
+ * Changes properties of RemoteAccessPolicyAppliesToMPS.
511
+ * @param remoteAccessPolicyAppliesToMPS RemoteAccessPolicyAppliesToMPS Object.
512
+ * @returns string
513
+ */
514
+ this.Put = (remoteAccessPolicyAppliesToMPS) => this.protectedPut(remoteAccessPolicyAppliesToMPS, false);
515
+ }
516
+ }
517
+ class RemoteAccessPolicyRule extends WSMan_1.Base {
518
+ constructor() {
519
+ super(...arguments);
520
+ this.className = _1.Classes.REMOTE_ACCESS_POLICY_RULE;
521
+ /**
522
+ * Deletes an instance
523
+ * @param selector indicates the instance
524
+ * @returns string
525
+ */
526
+ this.Delete = (selector) => this.protectedDelete(selector);
527
+ /**
528
+ * Changes properties of RemoteAccessPolicyRule
529
+ * @param remoteAccessPolicyRule Remote Access Policy Rule object
530
+ * @returns string
531
+ */
532
+ this.Put = (remoteAccessPolicyRule) => this.protectedPut(remoteAccessPolicyRule, false);
533
+ }
534
+ }
535
+ class RemoteAccessService extends WSMan_1.Base {
536
+ constructor() {
537
+ super(...arguments);
538
+ this.className = _1.Classes.REMOTE_ACCESS_SERVICE;
539
+ /**
540
+ * Requires mpServer. Adds a Management Presence Server to the Intel(R) AMT subsystem. Creates an AMT_ManagementPresenceRemoteSAP instance and an AMT_RemoteAccessCredentialContext association to a credential. This credential may be an existing AMT_PublicKeyCertificate instance (if the created MPS is configured to use mutual authentication). If the created MpServer is configured to use username password authentication, an AMT_MPSUsernamePassword instance is created and used as the associated credential.
541
+ * @param mpServer MPServer Object.
542
+ * @returns string
543
+ */
544
+ this.AddMPS = (mpServer) => {
545
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.ADD_MPS, _1.Classes.REMOTE_ACCESS_SERVICE);
546
+ const body = `<Body><h:AddMpServer_INPUT xmlns:h="${this.wsmanMessageCreator.resourceUriBase}AMT_RemoteAccessService"><h:AccessInfo>${mpServer.AccessInfo}</h:AccessInfo><h:InfoFormat>${mpServer.InfoFormat}</h:InfoFormat><h:Port>${mpServer.Port}</h:Port><h:AuthMethod>${mpServer.AuthMethod}</h:AuthMethod><h:Username>${mpServer.Username}</h:Username><h:Password>${mpServer.Password}</h:Password><h:CN>${mpServer.CommonName}</h:CN></h:AddMpServer_INPUT></Body>`;
547
+ return this.wsmanMessageCreator.createXml(header, body);
548
+ };
549
+ /**
550
+ * Requires remoteAccessPolicyRule and selector. Adds a Remote Access policy to the Intel(R) AMT subsystem. The policy defines an event that will trigger an establishment of a tunnel between AMT and a pre-configured MPS. Creates an AMT_RemoteAccessPolicyRule instance and associates it to a given list of AMT_ManagementPresenceRemoteSAP instances with AMT_PolicySetAppliesToElement association instances.
551
+ * @param remoteAccessPolicyRule RemoteAccessPolicyRule Object.
552
+ * @param selector Selector Object.
553
+ * @returns string
554
+ */
555
+ this.AddRemoteAccessPolicyRule = (remoteAccessPolicyRule, selector) => {
556
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.ADD_REMOTE_ACCESS_POLICY_RULE, _1.Classes.REMOTE_ACCESS_SERVICE);
557
+ const body = `<Body><h:AddRemoteAccessPolicyRule_INPUT xmlns:h="${this.wsmanMessageCreator.resourceUriBase}AMT_RemoteAccessService"><h:Trigger>${remoteAccessPolicyRule.Trigger}</h:Trigger><h:TunnelLifeTime>${remoteAccessPolicyRule.TunnelLifeTime}</h:TunnelLifeTime><h:ExtendedData>${remoteAccessPolicyRule.ExtendedData}</h:ExtendedData><h:MpServer><Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">${this.wsmanMessageCreator.resourceUriBase}AMT_ManagementPresenceRemoteSAP</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="${selector.name}">${selector.value}</Selector></SelectorSet></ReferenceParameters></h:MpServer></h:AddRemoteAccessPolicyRule_INPUT></Body>`;
558
+ return this.wsmanMessageCreator.createXml(header, body);
559
+ };
560
+ }
561
+ }
562
+ class SetupAndConfigurationService extends WSMan_1.Base {
563
+ constructor() {
564
+ super(...arguments);
565
+ this.className = _1.Classes.SETUP_AND_CONFIGURATION_SERVICE;
566
+ /**
567
+ * Commits pending configuration commands made to the Intel(R) AMT device. Completes configuration when in "IN-provisioning" state.
568
+ * @returns string
569
+ */
570
+ this.CommitChanges = () => {
571
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.COMMIT_CHANGES, _1.Classes.SETUP_AND_CONFIGURATION_SERVICE);
572
+ const body = this.wsmanMessageCreator.createBody('CommitChanges_INPUT', _1.Classes.SETUP_AND_CONFIGURATION_SERVICE, [
573
+ {}
574
+ ]);
575
+ return this.wsmanMessageCreator.createXml(header, body);
576
+ };
577
+ /**
578
+ * Pulls instances of SetupAndConfigurationService, following an Enumerate operation.
579
+ * @param enumerationContext string returned from an Enumerate call.
580
+ * @returns string
581
+ */
582
+ this.GetUuid = () => {
583
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.GET_UUID, _1.Classes.SETUP_AND_CONFIGURATION_SERVICE);
584
+ const body = this.wsmanMessageCreator.createBody('GetUuid_INPUT', _1.Classes.SETUP_AND_CONFIGURATION_SERVICE);
585
+ return this.wsmanMessageCreator.createXml(header, body);
586
+ };
587
+ /**
588
+ * Requires password. This method sets the ME Bios extension password. It allows a remote caller to change the ME access password for the BIOS extension screen. This call succeeds depending on the password policy rule defined in MEBx (BIOS extension):"Default Password Only" - Method succeeds only when the current password is still the default value and only in PKI provisioning. "During Setup and Configuration" - Method succeeds only during provisioning, regardless of provisioning method or previous password value."ANYTIME" - Method will always succeed. (i.e. even when configured).
589
+ * @param password Password needs to be strong: Contain at least one of: upper-case, lower-case, digit and special character.
590
+ * @remarks Min Length = 8
591
+ * @remarks Max Length = 32
592
+ * @returns string
593
+ */
594
+ this.SetMEBXPassword = (password) => {
595
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.SET_MEBX_PASSWORD, _1.Classes.SETUP_AND_CONFIGURATION_SERVICE);
596
+ const body = `<Body><h:SetMEBxPassword_INPUT xmlns:h="${this.wsmanMessageCreator.resourceUriBase}${_1.Classes.SETUP_AND_CONFIGURATION_SERVICE}"><h:Password>${password}</h:Password></h:SetMEBxPassword_INPUT></Body>`;
597
+ return this.wsmanMessageCreator.createXml(header, body);
598
+ };
599
+ /**
600
+ * Resets the Intel(R) AMT device to default factory settings. The device will need to be re-provisioned after this command.
601
+ * @param provisioningMode Indicates the provisioning mode (Enterprise , Small Business or Remote Connectivity) the device will enter following successful completion of the command. Starting from Release 6.0 only effective value is ProvisioningModeEnterprise
602
+ * @value_map 0 = ProvisioningModeCurrent, 1 = ProvisioningModeEnterprise, 2 = ProvisioningModeSmallBusiness, 3 = ProvisioningRemoteConnectivity
603
+ * @returns string
604
+ */
605
+ this.Unprovision = (provisioningMode) => {
606
+ if (provisioningMode === undefined) {
607
+ provisioningMode = 1;
608
+ }
609
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.UNPROVISION, _1.Classes.SETUP_AND_CONFIGURATION_SERVICE);
610
+ const body = `<Body><h:Unprovision_INPUT xmlns:h="${this.wsmanMessageCreator.resourceUriBase}${_1.Classes.SETUP_AND_CONFIGURATION_SERVICE}"><h:ProvisioningMode>${provisioningMode}</h:ProvisioningMode></h:Unprovision_INPUT></Body>`;
611
+ return this.wsmanMessageCreator.createXml(header, body);
612
+ };
613
+ /**
614
+ * Changes properties of Setup and Configuration Service
615
+ * @param setupAndConfigurationService SetupAndConfigurationService object
616
+ * @returns string
617
+ */
618
+ this.Put = (setupAndConfigurationService) => this.protectedPut(setupAndConfigurationService, false);
619
+ }
620
+ }
621
+ class TimeSynchronizationService extends WSMan_1.Base {
622
+ constructor() {
623
+ super(...arguments);
624
+ this.className = _1.Classes.TIME_SYNCHRONIZATION_SERVICE;
625
+ /**
626
+ * Requires ta0, tm1, tm2. This method is used to synchronize the Intel(R) AMT device's internal clock with an external clock.
627
+ * @param ta0 The time value received from invoking GetLowAccuracyTimeSynch().
628
+ * @param tm1 The remote client timestamp after getting a response from GetLowAccuracyTimeSynch().
629
+ * @param tm2 The remote client timestamp obtained immediately prior to invoking this method.
630
+ * @returns string
631
+ */
632
+ this.SetHighAccuracyTimeSynch = (ta0, tm1, tm2) => {
633
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.SET_HIGH_ACCURACY_TIME_SYNCH, _1.Classes.TIME_SYNCHRONIZATION_SERVICE);
634
+ const body = this.wsmanMessageCreator.createBody('SetHighAccuracyTimeSynch_INPUT', _1.Classes.TIME_SYNCHRONIZATION_SERVICE, [
635
+ {
636
+ Ta0: ta0,
637
+ Tm1: tm1,
638
+ Tm2: tm2
639
+ }
640
+ ]);
641
+ return this.wsmanMessageCreator.createXml(header, body);
642
+ };
643
+ /**
644
+ * This method is used for reading the Intel(R) AMT device's internal clock.
645
+ * @returns string
646
+ */
647
+ this.GetLowAccuracyTimeSynch = () => {
648
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.GET_LOW_ACCURACY_TIME_SYNCH, _1.Classes.TIME_SYNCHRONIZATION_SERVICE);
649
+ const body = this.wsmanMessageCreator.createBody('GetLowAccuracyTimeSynch_INPUT', _1.Classes.TIME_SYNCHRONIZATION_SERVICE);
650
+ return this.wsmanMessageCreator.createXml(header, body);
651
+ };
652
+ }
653
+ }
654
+ class TLSCredentialContext extends WSMan_1.Base {
655
+ constructor() {
656
+ super(...arguments);
657
+ this.className = _1.Classes.TLS_CREDENTIAL_CONTEXT;
658
+ /**
659
+ * Deletes an instance
660
+ * @param selector indicates the instance
661
+ * @returns string
662
+ */
663
+ this.Delete = (selector) => this.protectedDelete(selector);
664
+ /**
665
+ * Requires tlsCredentialContext. Creates a new instance of TLSCredentialContext.
666
+ * @param tlsCredentialContext TLSCredentialContext Object.
667
+ * @returns string
668
+ */
669
+ // TLS Credential Context object is highly complex and needs to use createBody function
670
+ this.Create = (certHandle) => {
671
+ const header = this.wsmanMessageCreator.createHeader(WSMan_1.BaseActions.CREATE, _1.Classes.TLS_CREDENTIAL_CONTEXT);
672
+ // const body = this.wsmanMessageCreator.createBody('AMT_TLSCredentialContext', Classes.TLS_CREDENTIAL_CONTEXT, tlsCredentialContext)
673
+ const body = `<Body><h:AMT_TLSCredentialContext xmlns:h="${this.wsmanMessageCreator.resourceUriBase}AMT_TLSCredentialContext"><h:ElementInContext><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>${this.wsmanMessageCreator.resourceUriBase}AMT_PublicKeyCertificate</w:ResourceURI><w:SelectorSet><w:Selector Name="InstanceID">${certHandle}</w:Selector></w:SelectorSet></a:ReferenceParameters></h:ElementInContext><h:ElementProvidingContext><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>${this.wsmanMessageCreator.resourceUriBase}AMT_TLSProtocolEndpointCollection</w:ResourceURI><w:SelectorSet><w:Selector Name="ElementName">TLSProtocolEndpointInstances Collection</w:Selector></w:SelectorSet></a:ReferenceParameters></h:ElementProvidingContext></h:AMT_TLSCredentialContext></Body>`;
674
+ return this.wsmanMessageCreator.createXml(header, body);
675
+ };
676
+ }
677
+ }
678
+ class TLSSettingData extends WSMan_1.Base {
679
+ constructor() {
680
+ super(...arguments);
681
+ this.className = _1.Classes.TLS_SETTING_DATA;
682
+ /**
683
+ * Changes properties of TLSSettingData.
684
+ * @param tlsSettingData TLSSettingData Object.
685
+ * @returns string
686
+ */
687
+ this.Put = (tlsSettingData) => this.protectedPut(tlsSettingData, true, { name: 'InstanceID', value: tlsSettingData.InstanceID });
688
+ }
689
+ }
690
+ class UserInitiatedConnectionService extends WSMan_1.Base {
691
+ constructor() {
692
+ super(...arguments);
693
+ this.className = _1.Classes.USER_INITIATED_CONNECTION_SERVICE;
694
+ /**
695
+ * Requires requestedState. Requests that the state of the element be changed to the value specified in the RequestedState parameter. When the requested state change takes place, the EnabledState and RequestedState of the element will be the same. Invoking the RequestStateChange method multiple times could result in earlier requests being overwritten or lost. If 0 is returned, then the task completed successfully and the use of ConcreteJob was not required. If 4096 (0x1000) is returned, then the task will take some time to complete, ConcreteJob will be created, and its reference returned in the output parameter Job. Any other return code indicates an error condition.
696
+ * @param requestedState The state requested for the element. This information will be placed into the RequestedState property of the instance if the return code of the RequestStateChange method is 0 ('Completed with No Error'), 3 ('Timeout'), or 4096 (0x1000) ('Job Started'). Refer to the description of the EnabledState and RequestedState properties for the detailed explanations of the RequestedState values.
697
+ * @value_map 32768 = All Interfaces disabled, 32769 = BIOS Interface enabled, 32770 = OS Interface enabled, 32771 = BIOS and OS Interfaces enabled
698
+ * @returns string
699
+ */
700
+ this.RequestStateChange = (requestedState) => this.protectedRequestStateChange(`http://intel.com/wbem/wscim/1/amt-schema/1/${this.className}/RequestStateChange`, requestedState);
701
+ }
702
+ }
703
+ class WiFiPortConfigurationService extends WSMan_1.Base {
704
+ constructor() {
705
+ super(...arguments);
706
+ this.className = _1.Classes.WIFI_PORT_CONFIGURATION_SERVICE;
707
+ /**
708
+ * Atomically creates an instance of CIM_WifiEndpointSettings from the embedded instance parameter and optionally an instance of CIM_IEEE8021xSettings from the embedded instance parameter (if provided), associates the CIM_WiFiEndpointSettings instance with the referenced instance of CIM_WiFiEndpoint using an instance of CIM_ElementSettingData optionally associates the newly created or referenced by parameter instance of CIM_IEEE8021xSettings with the instance of CIM_WiFiEndpointSettings using an instance of CIM_ConcreteComponent and optionally associates the referenced instance of AMT_PublicKeyCertificate (if provided) with the instance of CIM_IEEE8021xSettings (if provided) using an instance of CIM_CredentialContext.
709
+ * @param wifiEndpointSettings WiFiEndpointSettings Object
710
+ * @param selector Selector Object.
711
+ * @returns string
712
+ */
713
+ this.AddWiFiSettings = (wifiEndpointSettings, selector, ieee8021xSettingsInput, clientCredential, caCredential) => {
714
+ var _a;
715
+ const header = this.wsmanMessageCreator.createHeader(_1.Actions.ADD_WIFI_SETTINGS, _1.Classes.WIFI_PORT_CONFIGURATION_SERVICE);
716
+ const dataArray = [];
717
+ const wifiEndpointObject = {
718
+ WiFiEndpoint: {
719
+ Address: '/wsman',
720
+ ReferenceParameters: {
721
+ ResourceURI: `http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/${__1.CIM.Classes.WIFI_ENDPOINT}`,
722
+ SelectorSet: this.wsmanMessageCreator.createSelectorObjectForBody(selector)
723
+ }
724
+ }
725
+ };
726
+ dataArray.push(wifiEndpointObject);
727
+ if (wifiEndpointSettings) {
728
+ // HANDLE SPECIAL CHARACTERS FOR XML
729
+ wifiEndpointSettings.PSKPassPhrase = (_a = wifiEndpointSettings.PSKPassPhrase) === null || _a === void 0 ? void 0 : _a.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&apos;');
730
+ const wifiEndpointSettingInputObject = {
731
+ WiFiEndpointSettingsInput: wifiEndpointSettings,
732
+ namespace: 'http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_WiFiEndpointSettings'
733
+ };
734
+ dataArray.push(wifiEndpointSettingInputObject);
735
+ }
736
+ if (ieee8021xSettingsInput) {
737
+ const ieee8021xSettingsInputObject = {
738
+ IEEE8021xSettingsInput: ieee8021xSettingsInput,
739
+ namespace: 'http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_IEEE8021xSettings'
740
+ };
741
+ dataArray.push(ieee8021xSettingsInputObject);
742
+ }
743
+ if (clientCredential) {
744
+ const clientCredentialObject = {
745
+ ClientCredential: {
746
+ Address: 'default',
747
+ ReferenceParameters: {
748
+ ResourceURI: 'http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyCertificate',
749
+ SelectorSet: this.wsmanMessageCreator.createSelectorObjectForBody({
750
+ name: 'InstanceID',
751
+ value: clientCredential
752
+ })
753
+ }
754
+ }
755
+ };
756
+ dataArray.push(clientCredentialObject);
757
+ }
758
+ if (caCredential) {
759
+ const caCredentialObject = {
760
+ CACredential: {
761
+ Address: 'default',
762
+ ReferenceParameters: {
763
+ ResourceURI: 'http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyCertificate',
764
+ SelectorSet: this.wsmanMessageCreator.createSelectorObjectForBody({
765
+ name: 'InstanceID',
766
+ value: caCredential
767
+ })
768
+ }
769
+ }
770
+ };
771
+ dataArray.push(caCredentialObject);
772
+ }
773
+ const body = this.wsmanMessageCreator.createBody(_1.Methods.ADD_WIFI_SETTINGS + '_INPUT', _1.Classes.WIFI_PORT_CONFIGURATION_SERVICE, dataArray);
774
+ return this.wsmanMessageCreator.createXml(header, body);
775
+ };
776
+ /**
777
+ * Changes properties of WiFiEndpointSettings
778
+ * @param wifiEndpointSettings WiFiEndpointSettings Object
779
+ * @param selector Selector Object.
780
+ * @returns string
781
+ */
782
+ this.Put = (wifiEndpointSettings, selector) => this.protectedPut(wifiEndpointSettings, true, selector);
783
+ }
784
+ }
785
+ class Messages {
786
+ constructor() {
787
+ this.resourceUriBase = 'http://intel.com/wbem/wscim/1/amt-schema/1/';
788
+ this.wsmanMessageCreator = new WSMan_1.WSManMessageCreator(this.resourceUriBase);
789
+ this.AlarmClockService = new AlarmClockService(this.wsmanMessageCreator);
790
+ this.AuditLog = new AuditLog(this.wsmanMessageCreator);
791
+ this.AuthorizationService = new AuthorizationService(this.wsmanMessageCreator);
792
+ this.BootCapabilities = new BootCapabilities(this.wsmanMessageCreator);
793
+ this.BootSettingData = new BootSettingData(this.wsmanMessageCreator);
794
+ this.EnvironmentDetectionSettingData = new EnvironmentDetectionSettingData(this.wsmanMessageCreator);
795
+ this.EthernetPortSettings = new EthernetPortSettings(this.wsmanMessageCreator);
796
+ this.GeneralSettings = new GeneralSettings(this.wsmanMessageCreator);
797
+ this.IEEE8021xCredentialContext = new IEEE8021xCredentialContext(this.wsmanMessageCreator);
798
+ this.IEEE8021xProfile = new IEEE8021xProfile(this.wsmanMessageCreator);
799
+ this.KerberosSettingData = new KerberosSettingData(this.wsmanMessageCreator);
800
+ this.ManagementPresenceRemoteSAP = new ManagementPresenceRemoteSAP(this.wsmanMessageCreator);
801
+ this.MessageLog = new MessageLog(this.wsmanMessageCreator);
802
+ this.MPSUsernamePassword = new MPSUsernamePassword(this.wsmanMessageCreator);
803
+ this.PublicKeyCertificate = new PublicKeyCertificate(this.wsmanMessageCreator);
804
+ this.PublicKeyManagementService = new PublicKeyManagementService(this.wsmanMessageCreator);
805
+ this.PublicPrivateKeyPair = new PublicPrivateKeyPair(this.wsmanMessageCreator);
806
+ this.RedirectionService = new RedirectionService(this.wsmanMessageCreator);
807
+ this.RemoteAccessPolicyAppliesToMPS = new RemoteAccessPolicyAppliesToMPS(this.wsmanMessageCreator);
808
+ this.RemoteAccessPolicyRule = new RemoteAccessPolicyRule(this.wsmanMessageCreator);
809
+ this.RemoteAccessService = new RemoteAccessService(this.wsmanMessageCreator);
810
+ this.SetupAndConfigurationService = new SetupAndConfigurationService(this.wsmanMessageCreator);
811
+ this.TimeSynchronizationService = new TimeSynchronizationService(this.wsmanMessageCreator);
812
+ this.TLSCredentialContext = new TLSCredentialContext(this.wsmanMessageCreator);
813
+ this.TLSSettingData = new TLSSettingData(this.wsmanMessageCreator);
814
+ this.UserInitiatedConnectionService = new UserInitiatedConnectionService(this.wsmanMessageCreator);
815
+ this.WiFiPortConfigurationService = new WiFiPortConfigurationService(this.wsmanMessageCreator);
816
+ }
817
+ }
818
+ exports.Messages = Messages;
819
+ //# sourceMappingURL=messages.js.map