@azure/arm-deviceprovisioningservices 3.0.0 → 4.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.
Files changed (137) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/LICENSE +21 -0
  3. package/LICENSE.txt +1 -1
  4. package/README.md +70 -78
  5. package/dist/index.js +3185 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/index.min.js +1 -0
  8. package/dist/index.min.js.map +1 -0
  9. package/dist-esm/src/index.d.ts +5 -0
  10. package/dist-esm/src/index.d.ts.map +1 -0
  11. package/dist-esm/src/index.js +12 -0
  12. package/dist-esm/src/index.js.map +1 -0
  13. package/dist-esm/src/iotDpsClient.d.ts +20 -0
  14. package/dist-esm/src/iotDpsClient.d.ts.map +1 -0
  15. package/dist-esm/src/iotDpsClient.js +53 -0
  16. package/dist-esm/src/iotDpsClient.js.map +1 -0
  17. package/dist-esm/src/lroImpl.d.ts +16 -0
  18. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  19. package/dist-esm/src/lroImpl.js +29 -0
  20. package/dist-esm/src/lroImpl.js.map +1 -0
  21. package/dist-esm/src/models/index.d.ts +878 -0
  22. package/dist-esm/src/models/index.d.ts.map +1 -0
  23. package/dist-esm/src/models/index.js +80 -0
  24. package/dist-esm/src/models/index.js.map +1 -0
  25. package/dist-esm/src/models/mappers.d.ts +37 -0
  26. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  27. package/{esm → dist-esm/src}/models/mappers.js +508 -496
  28. package/dist-esm/src/models/mappers.js.map +1 -0
  29. package/dist-esm/src/models/parameters.d.ts +34 -0
  30. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  31. package/{esm → dist-esm/src}/models/parameters.js +136 -115
  32. package/dist-esm/src/models/parameters.js.map +1 -0
  33. package/dist-esm/src/operations/dpsCertificate.d.ts +70 -0
  34. package/dist-esm/src/operations/dpsCertificate.d.ts.map +1 -0
  35. package/dist-esm/src/operations/dpsCertificate.js +289 -0
  36. package/dist-esm/src/operations/dpsCertificate.js.map +1 -0
  37. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  38. package/dist-esm/src/operations/index.d.ts.map +1 -0
  39. package/{esm → dist-esm/src}/operations/index.js +1 -2
  40. package/dist-esm/src/operations/index.js.map +1 -0
  41. package/dist-esm/src/operations/iotDpsResource.d.ts +253 -0
  42. package/dist-esm/src/operations/iotDpsResource.d.ts.map +1 -0
  43. package/dist-esm/src/operations/iotDpsResource.js +1154 -0
  44. package/dist-esm/src/operations/iotDpsResource.js.map +1 -0
  45. package/dist-esm/src/operations/operations.d.ts +32 -0
  46. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  47. package/dist-esm/src/operations/operations.js +120 -0
  48. package/dist-esm/src/operations/operations.js.map +1 -0
  49. package/dist-esm/src/operationsInterfaces/dpsCertificate.d.ts +62 -0
  50. package/dist-esm/src/operationsInterfaces/dpsCertificate.d.ts.map +1 -0
  51. package/{esm/models/operationsMappers.js → dist-esm/src/operationsInterfaces/dpsCertificate.js} +2 -2
  52. package/dist-esm/src/operationsInterfaces/dpsCertificate.js.map +1 -0
  53. package/dist-esm/src/operationsInterfaces/index.d.ts +4 -0
  54. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  55. package/dist-esm/src/operationsInterfaces/index.js +11 -0
  56. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  57. package/dist-esm/src/operationsInterfaces/iotDpsResource.d.ts +183 -0
  58. package/dist-esm/src/operationsInterfaces/iotDpsResource.d.ts.map +1 -0
  59. package/dist-esm/src/operationsInterfaces/iotDpsResource.js +9 -0
  60. package/dist-esm/src/operationsInterfaces/iotDpsResource.js.map +1 -0
  61. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  62. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  63. package/{esm/models/index.js → dist-esm/src/operationsInterfaces/operations.js} +2 -1
  64. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  65. package/dist-esm/test/sampleTest.d.ts +2 -0
  66. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  67. package/dist-esm/test/sampleTest.js +40 -0
  68. package/dist-esm/test/sampleTest.js.map +1 -0
  69. package/package.json +83 -24
  70. package/review/arm-deviceprovisioningservices.api.md +719 -0
  71. package/rollup.config.js +181 -30
  72. package/src/index.ts +12 -0
  73. package/src/iotDpsClient.ts +72 -36
  74. package/src/lroImpl.ts +34 -0
  75. package/src/models/index.ts +741 -1288
  76. package/src/models/mappers.ts +515 -499
  77. package/src/models/parameters.ts +179 -116
  78. package/src/operations/dpsCertificate.ts +201 -304
  79. package/src/operations/index.ts +1 -2
  80. package/src/operations/iotDpsResource.ts +1157 -872
  81. package/src/operations/operations.ts +85 -73
  82. package/src/operationsInterfaces/dpsCertificate.ts +118 -0
  83. package/src/{models/operationsMappers.ts → operationsInterfaces/index.ts} +3 -6
  84. package/src/operationsInterfaces/iotDpsResource.ts +351 -0
  85. package/src/operationsInterfaces/operations.ts +22 -0
  86. package/tsconfig.json +20 -7
  87. package/types/arm-deviceprovisioningservices.d.ts +1261 -0
  88. package/types/tsdoc-metadata.json +11 -0
  89. package/dist/arm-deviceprovisioningservices.js +0 -2869
  90. package/dist/arm-deviceprovisioningservices.js.map +0 -1
  91. package/dist/arm-deviceprovisioningservices.min.js +0 -1
  92. package/dist/arm-deviceprovisioningservices.min.js.map +0 -1
  93. package/esm/iotDpsClient.d.ts +0 -26
  94. package/esm/iotDpsClient.d.ts.map +0 -1
  95. package/esm/iotDpsClient.js +0 -39
  96. package/esm/iotDpsClient.js.map +0 -1
  97. package/esm/iotDpsClientContext.d.ts +0 -22
  98. package/esm/iotDpsClientContext.d.ts.map +0 -1
  99. package/esm/iotDpsClientContext.js +0 -60
  100. package/esm/iotDpsClientContext.js.map +0 -1
  101. package/esm/models/dpsCertificateMappers.d.ts +0 -2
  102. package/esm/models/dpsCertificateMappers.d.ts.map +0 -1
  103. package/esm/models/dpsCertificateMappers.js +0 -9
  104. package/esm/models/dpsCertificateMappers.js.map +0 -1
  105. package/esm/models/index.d.ts +0 -1433
  106. package/esm/models/index.d.ts.map +0 -1
  107. package/esm/models/index.js.map +0 -1
  108. package/esm/models/iotDpsResourceMappers.d.ts +0 -2
  109. package/esm/models/iotDpsResourceMappers.d.ts.map +0 -1
  110. package/esm/models/iotDpsResourceMappers.js +0 -9
  111. package/esm/models/iotDpsResourceMappers.js.map +0 -1
  112. package/esm/models/mappers.d.ts +0 -38
  113. package/esm/models/mappers.d.ts.map +0 -1
  114. package/esm/models/mappers.js.map +0 -1
  115. package/esm/models/operationsMappers.d.ts +0 -2
  116. package/esm/models/operationsMappers.d.ts.map +0 -1
  117. package/esm/models/operationsMappers.js.map +0 -1
  118. package/esm/models/parameters.d.ts +0 -26
  119. package/esm/models/parameters.d.ts.map +0 -1
  120. package/esm/models/parameters.js.map +0 -1
  121. package/esm/operations/dpsCertificate.d.ts +0 -188
  122. package/esm/operations/dpsCertificate.d.ts.map +0 -1
  123. package/esm/operations/dpsCertificate.js +0 -264
  124. package/esm/operations/dpsCertificate.js.map +0 -1
  125. package/esm/operations/index.d.ts.map +0 -1
  126. package/esm/operations/index.js.map +0 -1
  127. package/esm/operations/iotDpsResource.d.ts +0 -473
  128. package/esm/operations/iotDpsResource.d.ts.map +0 -1
  129. package/esm/operations/iotDpsResource.js +0 -834
  130. package/esm/operations/iotDpsResource.js.map +0 -1
  131. package/esm/operations/operations.d.ts +0 -46
  132. package/esm/operations/operations.d.ts.map +0 -1
  133. package/esm/operations/operations.js +0 -79
  134. package/esm/operations/operations.js.map +0 -1
  135. package/src/iotDpsClientContext.ts +0 -67
  136. package/src/models/dpsCertificateMappers.ts +0 -30
  137. package/src/models/iotDpsResourceMappers.ts +0 -40
package/dist/index.js ADDED
@@ -0,0 +1,3185 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var coreClient = require('@azure/core-client');
6
+ var tslib = require('tslib');
7
+ var coreLro = require('@azure/core-lro');
8
+
9
+ /*
10
+ * Copyright (c) Microsoft Corporation.
11
+ * Licensed under the MIT License.
12
+ *
13
+ * Code generated by Microsoft (R) AutoRest Code Generator.
14
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
15
+ */
16
+ (function (KnownCreatedByType) {
17
+ KnownCreatedByType["User"] = "User";
18
+ KnownCreatedByType["Application"] = "Application";
19
+ KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
20
+ KnownCreatedByType["Key"] = "Key";
21
+ })(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
22
+ (function (KnownCertificatePurpose) {
23
+ KnownCertificatePurpose["ClientAuthentication"] = "clientAuthentication";
24
+ KnownCertificatePurpose["ServerAuthentication"] = "serverAuthentication";
25
+ })(exports.KnownCertificatePurpose || (exports.KnownCertificatePurpose = {}));
26
+ (function (KnownState) {
27
+ KnownState["Activating"] = "Activating";
28
+ KnownState["Active"] = "Active";
29
+ KnownState["Deleting"] = "Deleting";
30
+ KnownState["Deleted"] = "Deleted";
31
+ KnownState["ActivationFailed"] = "ActivationFailed";
32
+ KnownState["DeletionFailed"] = "DeletionFailed";
33
+ KnownState["Transitioning"] = "Transitioning";
34
+ KnownState["Suspending"] = "Suspending";
35
+ KnownState["Suspended"] = "Suspended";
36
+ KnownState["Resuming"] = "Resuming";
37
+ KnownState["FailingOver"] = "FailingOver";
38
+ KnownState["FailoverFailed"] = "FailoverFailed";
39
+ })(exports.KnownState || (exports.KnownState = {}));
40
+ (function (KnownPublicNetworkAccess) {
41
+ KnownPublicNetworkAccess["Enabled"] = "Enabled";
42
+ KnownPublicNetworkAccess["Disabled"] = "Disabled";
43
+ })(exports.KnownPublicNetworkAccess || (exports.KnownPublicNetworkAccess = {}));
44
+ (function (KnownPrivateLinkServiceConnectionStatus) {
45
+ KnownPrivateLinkServiceConnectionStatus["Pending"] = "Pending";
46
+ KnownPrivateLinkServiceConnectionStatus["Approved"] = "Approved";
47
+ KnownPrivateLinkServiceConnectionStatus["Rejected"] = "Rejected";
48
+ KnownPrivateLinkServiceConnectionStatus["Disconnected"] = "Disconnected";
49
+ })(exports.KnownPrivateLinkServiceConnectionStatus || (exports.KnownPrivateLinkServiceConnectionStatus = {}));
50
+ (function (KnownAllocationPolicy) {
51
+ KnownAllocationPolicy["Hashed"] = "Hashed";
52
+ KnownAllocationPolicy["GeoLatency"] = "GeoLatency";
53
+ KnownAllocationPolicy["Static"] = "Static";
54
+ })(exports.KnownAllocationPolicy || (exports.KnownAllocationPolicy = {}));
55
+ (function (KnownAccessRightsDescription) {
56
+ KnownAccessRightsDescription["ServiceConfig"] = "ServiceConfig";
57
+ KnownAccessRightsDescription["EnrollmentRead"] = "EnrollmentRead";
58
+ KnownAccessRightsDescription["EnrollmentWrite"] = "EnrollmentWrite";
59
+ KnownAccessRightsDescription["DeviceConnect"] = "DeviceConnect";
60
+ KnownAccessRightsDescription["RegistrationStatusRead"] = "RegistrationStatusRead";
61
+ KnownAccessRightsDescription["RegistrationStatusWrite"] = "RegistrationStatusWrite";
62
+ })(exports.KnownAccessRightsDescription || (exports.KnownAccessRightsDescription = {}));
63
+ (function (KnownIotDpsSku) {
64
+ KnownIotDpsSku["S1"] = "S1";
65
+ })(exports.KnownIotDpsSku || (exports.KnownIotDpsSku = {}));
66
+ (function (KnownNameUnavailabilityReason) {
67
+ KnownNameUnavailabilityReason["Invalid"] = "Invalid";
68
+ KnownNameUnavailabilityReason["AlreadyExists"] = "AlreadyExists";
69
+ })(exports.KnownNameUnavailabilityReason || (exports.KnownNameUnavailabilityReason = {}));
70
+
71
+ /*
72
+ * Copyright (c) Microsoft Corporation.
73
+ * Licensed under the MIT License.
74
+ *
75
+ * Code generated by Microsoft (R) AutoRest Code Generator.
76
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
+ */
78
+ const OperationListResult = {
79
+ type: {
80
+ name: "Composite",
81
+ className: "OperationListResult",
82
+ modelProperties: {
83
+ value: {
84
+ serializedName: "value",
85
+ readOnly: true,
86
+ type: {
87
+ name: "Sequence",
88
+ element: {
89
+ type: {
90
+ name: "Composite",
91
+ className: "Operation"
92
+ }
93
+ }
94
+ }
95
+ },
96
+ nextLink: {
97
+ serializedName: "nextLink",
98
+ readOnly: true,
99
+ type: {
100
+ name: "String"
101
+ }
102
+ }
103
+ }
104
+ }
105
+ };
106
+ const Operation = {
107
+ type: {
108
+ name: "Composite",
109
+ className: "Operation",
110
+ modelProperties: {
111
+ name: {
112
+ serializedName: "name",
113
+ readOnly: true,
114
+ type: {
115
+ name: "String"
116
+ }
117
+ },
118
+ display: {
119
+ serializedName: "display",
120
+ type: {
121
+ name: "Composite",
122
+ className: "OperationDisplay"
123
+ }
124
+ }
125
+ }
126
+ }
127
+ };
128
+ const OperationDisplay = {
129
+ type: {
130
+ name: "Composite",
131
+ className: "OperationDisplay",
132
+ modelProperties: {
133
+ provider: {
134
+ serializedName: "provider",
135
+ readOnly: true,
136
+ type: {
137
+ name: "String"
138
+ }
139
+ },
140
+ resource: {
141
+ serializedName: "resource",
142
+ readOnly: true,
143
+ type: {
144
+ name: "String"
145
+ }
146
+ },
147
+ operation: {
148
+ serializedName: "operation",
149
+ readOnly: true,
150
+ type: {
151
+ name: "String"
152
+ }
153
+ }
154
+ }
155
+ }
156
+ };
157
+ const ErrorDetails = {
158
+ type: {
159
+ name: "Composite",
160
+ className: "ErrorDetails",
161
+ modelProperties: {
162
+ code: {
163
+ serializedName: "code",
164
+ readOnly: true,
165
+ type: {
166
+ name: "String"
167
+ }
168
+ },
169
+ httpStatusCode: {
170
+ serializedName: "httpStatusCode",
171
+ readOnly: true,
172
+ type: {
173
+ name: "String"
174
+ }
175
+ },
176
+ message: {
177
+ serializedName: "message",
178
+ readOnly: true,
179
+ type: {
180
+ name: "String"
181
+ }
182
+ },
183
+ details: {
184
+ serializedName: "details",
185
+ readOnly: true,
186
+ type: {
187
+ name: "String"
188
+ }
189
+ }
190
+ }
191
+ }
192
+ };
193
+ const CertificateResponse = {
194
+ type: {
195
+ name: "Composite",
196
+ className: "CertificateResponse",
197
+ modelProperties: {
198
+ properties: {
199
+ serializedName: "properties",
200
+ type: {
201
+ name: "Composite",
202
+ className: "CertificateProperties"
203
+ }
204
+ },
205
+ id: {
206
+ serializedName: "id",
207
+ readOnly: true,
208
+ type: {
209
+ name: "String"
210
+ }
211
+ },
212
+ name: {
213
+ serializedName: "name",
214
+ readOnly: true,
215
+ type: {
216
+ name: "String"
217
+ }
218
+ },
219
+ etag: {
220
+ serializedName: "etag",
221
+ readOnly: true,
222
+ type: {
223
+ name: "String"
224
+ }
225
+ },
226
+ type: {
227
+ serializedName: "type",
228
+ readOnly: true,
229
+ type: {
230
+ name: "String"
231
+ }
232
+ },
233
+ systemData: {
234
+ serializedName: "systemData",
235
+ type: {
236
+ name: "Composite",
237
+ className: "SystemData"
238
+ }
239
+ }
240
+ }
241
+ }
242
+ };
243
+ const CertificateProperties = {
244
+ type: {
245
+ name: "Composite",
246
+ className: "CertificateProperties",
247
+ modelProperties: {
248
+ subject: {
249
+ serializedName: "subject",
250
+ readOnly: true,
251
+ type: {
252
+ name: "String"
253
+ }
254
+ },
255
+ expiry: {
256
+ serializedName: "expiry",
257
+ readOnly: true,
258
+ type: {
259
+ name: "DateTimeRfc1123"
260
+ }
261
+ },
262
+ thumbprint: {
263
+ serializedName: "thumbprint",
264
+ readOnly: true,
265
+ type: {
266
+ name: "String"
267
+ }
268
+ },
269
+ isVerified: {
270
+ serializedName: "isVerified",
271
+ readOnly: true,
272
+ type: {
273
+ name: "Boolean"
274
+ }
275
+ },
276
+ certificate: {
277
+ serializedName: "certificate",
278
+ readOnly: true,
279
+ type: {
280
+ name: "ByteArray"
281
+ }
282
+ },
283
+ created: {
284
+ serializedName: "created",
285
+ readOnly: true,
286
+ type: {
287
+ name: "DateTimeRfc1123"
288
+ }
289
+ },
290
+ updated: {
291
+ serializedName: "updated",
292
+ readOnly: true,
293
+ type: {
294
+ name: "DateTimeRfc1123"
295
+ }
296
+ }
297
+ }
298
+ }
299
+ };
300
+ const SystemData = {
301
+ type: {
302
+ name: "Composite",
303
+ className: "SystemData",
304
+ modelProperties: {
305
+ createdBy: {
306
+ serializedName: "createdBy",
307
+ type: {
308
+ name: "String"
309
+ }
310
+ },
311
+ createdByType: {
312
+ serializedName: "createdByType",
313
+ type: {
314
+ name: "String"
315
+ }
316
+ },
317
+ createdAt: {
318
+ serializedName: "createdAt",
319
+ type: {
320
+ name: "DateTime"
321
+ }
322
+ },
323
+ lastModifiedBy: {
324
+ serializedName: "lastModifiedBy",
325
+ type: {
326
+ name: "String"
327
+ }
328
+ },
329
+ lastModifiedByType: {
330
+ serializedName: "lastModifiedByType",
331
+ type: {
332
+ name: "String"
333
+ }
334
+ },
335
+ lastModifiedAt: {
336
+ serializedName: "lastModifiedAt",
337
+ type: {
338
+ name: "DateTime"
339
+ }
340
+ }
341
+ }
342
+ }
343
+ };
344
+ const CertificateBodyDescription = {
345
+ type: {
346
+ name: "Composite",
347
+ className: "CertificateBodyDescription",
348
+ modelProperties: {
349
+ certificate: {
350
+ serializedName: "certificate",
351
+ type: {
352
+ name: "String"
353
+ }
354
+ },
355
+ isVerified: {
356
+ serializedName: "isVerified",
357
+ type: {
358
+ name: "Boolean"
359
+ }
360
+ }
361
+ }
362
+ }
363
+ };
364
+ const IotDpsPropertiesDescription = {
365
+ type: {
366
+ name: "Composite",
367
+ className: "IotDpsPropertiesDescription",
368
+ modelProperties: {
369
+ state: {
370
+ serializedName: "state",
371
+ type: {
372
+ name: "String"
373
+ }
374
+ },
375
+ publicNetworkAccess: {
376
+ serializedName: "publicNetworkAccess",
377
+ type: {
378
+ name: "String"
379
+ }
380
+ },
381
+ ipFilterRules: {
382
+ serializedName: "ipFilterRules",
383
+ type: {
384
+ name: "Sequence",
385
+ element: {
386
+ type: {
387
+ name: "Composite",
388
+ className: "IpFilterRule"
389
+ }
390
+ }
391
+ }
392
+ },
393
+ privateEndpointConnections: {
394
+ serializedName: "privateEndpointConnections",
395
+ type: {
396
+ name: "Sequence",
397
+ element: {
398
+ type: {
399
+ name: "Composite",
400
+ className: "PrivateEndpointConnection"
401
+ }
402
+ }
403
+ }
404
+ },
405
+ provisioningState: {
406
+ serializedName: "provisioningState",
407
+ type: {
408
+ name: "String"
409
+ }
410
+ },
411
+ iotHubs: {
412
+ serializedName: "iotHubs",
413
+ type: {
414
+ name: "Sequence",
415
+ element: {
416
+ type: {
417
+ name: "Composite",
418
+ className: "IotHubDefinitionDescription"
419
+ }
420
+ }
421
+ }
422
+ },
423
+ allocationPolicy: {
424
+ serializedName: "allocationPolicy",
425
+ type: {
426
+ name: "String"
427
+ }
428
+ },
429
+ serviceOperationsHostName: {
430
+ serializedName: "serviceOperationsHostName",
431
+ readOnly: true,
432
+ type: {
433
+ name: "String"
434
+ }
435
+ },
436
+ deviceProvisioningHostName: {
437
+ serializedName: "deviceProvisioningHostName",
438
+ readOnly: true,
439
+ type: {
440
+ name: "String"
441
+ }
442
+ },
443
+ idScope: {
444
+ serializedName: "idScope",
445
+ readOnly: true,
446
+ type: {
447
+ name: "String"
448
+ }
449
+ },
450
+ authorizationPolicies: {
451
+ serializedName: "authorizationPolicies",
452
+ type: {
453
+ name: "Sequence",
454
+ element: {
455
+ type: {
456
+ name: "Composite",
457
+ className: "SharedAccessSignatureAuthorizationRuleAccessRightsDescription"
458
+ }
459
+ }
460
+ }
461
+ },
462
+ enableDataResidency: {
463
+ serializedName: "enableDataResidency",
464
+ type: {
465
+ name: "Boolean"
466
+ }
467
+ }
468
+ }
469
+ }
470
+ };
471
+ const IpFilterRule = {
472
+ type: {
473
+ name: "Composite",
474
+ className: "IpFilterRule",
475
+ modelProperties: {
476
+ filterName: {
477
+ serializedName: "filterName",
478
+ required: true,
479
+ type: {
480
+ name: "String"
481
+ }
482
+ },
483
+ action: {
484
+ serializedName: "action",
485
+ required: true,
486
+ type: {
487
+ name: "Enum",
488
+ allowedValues: ["Accept", "Reject"]
489
+ }
490
+ },
491
+ ipMask: {
492
+ serializedName: "ipMask",
493
+ required: true,
494
+ type: {
495
+ name: "String"
496
+ }
497
+ },
498
+ target: {
499
+ serializedName: "target",
500
+ type: {
501
+ name: "Enum",
502
+ allowedValues: ["all", "serviceApi", "deviceApi"]
503
+ }
504
+ }
505
+ }
506
+ }
507
+ };
508
+ const PrivateEndpointConnection = {
509
+ type: {
510
+ name: "Composite",
511
+ className: "PrivateEndpointConnection",
512
+ modelProperties: {
513
+ id: {
514
+ serializedName: "id",
515
+ readOnly: true,
516
+ type: {
517
+ name: "String"
518
+ }
519
+ },
520
+ name: {
521
+ constraints: {
522
+ Pattern: new RegExp("^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$")
523
+ },
524
+ serializedName: "name",
525
+ readOnly: true,
526
+ type: {
527
+ name: "String"
528
+ }
529
+ },
530
+ type: {
531
+ serializedName: "type",
532
+ readOnly: true,
533
+ type: {
534
+ name: "String"
535
+ }
536
+ },
537
+ properties: {
538
+ serializedName: "properties",
539
+ type: {
540
+ name: "Composite",
541
+ className: "PrivateEndpointConnectionProperties"
542
+ }
543
+ },
544
+ systemData: {
545
+ serializedName: "systemData",
546
+ type: {
547
+ name: "Composite",
548
+ className: "SystemData"
549
+ }
550
+ }
551
+ }
552
+ }
553
+ };
554
+ const PrivateEndpointConnectionProperties = {
555
+ type: {
556
+ name: "Composite",
557
+ className: "PrivateEndpointConnectionProperties",
558
+ modelProperties: {
559
+ privateEndpoint: {
560
+ serializedName: "privateEndpoint",
561
+ type: {
562
+ name: "Composite",
563
+ className: "PrivateEndpoint"
564
+ }
565
+ },
566
+ privateLinkServiceConnectionState: {
567
+ serializedName: "privateLinkServiceConnectionState",
568
+ type: {
569
+ name: "Composite",
570
+ className: "PrivateLinkServiceConnectionState"
571
+ }
572
+ }
573
+ }
574
+ }
575
+ };
576
+ const PrivateEndpoint = {
577
+ type: {
578
+ name: "Composite",
579
+ className: "PrivateEndpoint",
580
+ modelProperties: {
581
+ id: {
582
+ serializedName: "id",
583
+ readOnly: true,
584
+ type: {
585
+ name: "String"
586
+ }
587
+ }
588
+ }
589
+ }
590
+ };
591
+ const PrivateLinkServiceConnectionState = {
592
+ type: {
593
+ name: "Composite",
594
+ className: "PrivateLinkServiceConnectionState",
595
+ modelProperties: {
596
+ status: {
597
+ serializedName: "status",
598
+ required: true,
599
+ type: {
600
+ name: "String"
601
+ }
602
+ },
603
+ description: {
604
+ serializedName: "description",
605
+ required: true,
606
+ type: {
607
+ name: "String"
608
+ }
609
+ },
610
+ actionsRequired: {
611
+ serializedName: "actionsRequired",
612
+ type: {
613
+ name: "String"
614
+ }
615
+ }
616
+ }
617
+ }
618
+ };
619
+ const IotHubDefinitionDescription = {
620
+ type: {
621
+ name: "Composite",
622
+ className: "IotHubDefinitionDescription",
623
+ modelProperties: {
624
+ applyAllocationPolicy: {
625
+ serializedName: "applyAllocationPolicy",
626
+ type: {
627
+ name: "Boolean"
628
+ }
629
+ },
630
+ allocationWeight: {
631
+ serializedName: "allocationWeight",
632
+ type: {
633
+ name: "Number"
634
+ }
635
+ },
636
+ name: {
637
+ serializedName: "name",
638
+ readOnly: true,
639
+ type: {
640
+ name: "String"
641
+ }
642
+ },
643
+ connectionString: {
644
+ serializedName: "connectionString",
645
+ required: true,
646
+ type: {
647
+ name: "String"
648
+ }
649
+ },
650
+ location: {
651
+ serializedName: "location",
652
+ required: true,
653
+ type: {
654
+ name: "String"
655
+ }
656
+ }
657
+ }
658
+ }
659
+ };
660
+ const SharedAccessSignatureAuthorizationRuleAccessRightsDescription = {
661
+ type: {
662
+ name: "Composite",
663
+ className: "SharedAccessSignatureAuthorizationRuleAccessRightsDescription",
664
+ modelProperties: {
665
+ keyName: {
666
+ serializedName: "keyName",
667
+ required: true,
668
+ type: {
669
+ name: "String"
670
+ }
671
+ },
672
+ primaryKey: {
673
+ serializedName: "primaryKey",
674
+ type: {
675
+ name: "String"
676
+ }
677
+ },
678
+ secondaryKey: {
679
+ serializedName: "secondaryKey",
680
+ type: {
681
+ name: "String"
682
+ }
683
+ },
684
+ rights: {
685
+ serializedName: "rights",
686
+ required: true,
687
+ type: {
688
+ name: "String"
689
+ }
690
+ }
691
+ }
692
+ }
693
+ };
694
+ const IotDpsSkuInfo = {
695
+ type: {
696
+ name: "Composite",
697
+ className: "IotDpsSkuInfo",
698
+ modelProperties: {
699
+ name: {
700
+ serializedName: "name",
701
+ type: {
702
+ name: "String"
703
+ }
704
+ },
705
+ tier: {
706
+ serializedName: "tier",
707
+ readOnly: true,
708
+ type: {
709
+ name: "String"
710
+ }
711
+ },
712
+ capacity: {
713
+ serializedName: "capacity",
714
+ type: {
715
+ name: "Number"
716
+ }
717
+ }
718
+ }
719
+ }
720
+ };
721
+ const Resource = {
722
+ type: {
723
+ name: "Composite",
724
+ className: "Resource",
725
+ modelProperties: {
726
+ id: {
727
+ serializedName: "id",
728
+ readOnly: true,
729
+ type: {
730
+ name: "String"
731
+ }
732
+ },
733
+ name: {
734
+ constraints: {
735
+ Pattern: new RegExp("^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$")
736
+ },
737
+ serializedName: "name",
738
+ readOnly: true,
739
+ type: {
740
+ name: "String"
741
+ }
742
+ },
743
+ type: {
744
+ serializedName: "type",
745
+ readOnly: true,
746
+ type: {
747
+ name: "String"
748
+ }
749
+ },
750
+ location: {
751
+ serializedName: "location",
752
+ required: true,
753
+ type: {
754
+ name: "String"
755
+ }
756
+ },
757
+ tags: {
758
+ serializedName: "tags",
759
+ type: {
760
+ name: "Dictionary",
761
+ value: { type: { name: "String" } }
762
+ }
763
+ }
764
+ }
765
+ }
766
+ };
767
+ const TagsResource = {
768
+ type: {
769
+ name: "Composite",
770
+ className: "TagsResource",
771
+ modelProperties: {
772
+ tags: {
773
+ serializedName: "tags",
774
+ type: {
775
+ name: "Dictionary",
776
+ value: { type: { name: "String" } }
777
+ }
778
+ }
779
+ }
780
+ }
781
+ };
782
+ const CertificateListDescription = {
783
+ type: {
784
+ name: "Composite",
785
+ className: "CertificateListDescription",
786
+ modelProperties: {
787
+ value: {
788
+ serializedName: "value",
789
+ type: {
790
+ name: "Sequence",
791
+ element: {
792
+ type: {
793
+ name: "Composite",
794
+ className: "CertificateResponse"
795
+ }
796
+ }
797
+ }
798
+ }
799
+ }
800
+ }
801
+ };
802
+ const ProvisioningServiceDescriptionListResult = {
803
+ type: {
804
+ name: "Composite",
805
+ className: "ProvisioningServiceDescriptionListResult",
806
+ modelProperties: {
807
+ value: {
808
+ serializedName: "value",
809
+ type: {
810
+ name: "Sequence",
811
+ element: {
812
+ type: {
813
+ name: "Composite",
814
+ className: "ProvisioningServiceDescription"
815
+ }
816
+ }
817
+ }
818
+ },
819
+ nextLink: {
820
+ serializedName: "nextLink",
821
+ readOnly: true,
822
+ type: {
823
+ name: "String"
824
+ }
825
+ }
826
+ }
827
+ }
828
+ };
829
+ const AsyncOperationResult = {
830
+ type: {
831
+ name: "Composite",
832
+ className: "AsyncOperationResult",
833
+ modelProperties: {
834
+ status: {
835
+ serializedName: "status",
836
+ type: {
837
+ name: "String"
838
+ }
839
+ },
840
+ error: {
841
+ serializedName: "error",
842
+ type: {
843
+ name: "Composite",
844
+ className: "ErrorMesssage"
845
+ }
846
+ }
847
+ }
848
+ }
849
+ };
850
+ const ErrorMesssage = {
851
+ type: {
852
+ name: "Composite",
853
+ className: "ErrorMesssage",
854
+ modelProperties: {
855
+ code: {
856
+ serializedName: "code",
857
+ type: {
858
+ name: "String"
859
+ }
860
+ },
861
+ message: {
862
+ serializedName: "message",
863
+ type: {
864
+ name: "String"
865
+ }
866
+ },
867
+ details: {
868
+ serializedName: "details",
869
+ type: {
870
+ name: "String"
871
+ }
872
+ }
873
+ }
874
+ }
875
+ };
876
+ const IotDpsSkuDefinitionListResult = {
877
+ type: {
878
+ name: "Composite",
879
+ className: "IotDpsSkuDefinitionListResult",
880
+ modelProperties: {
881
+ value: {
882
+ serializedName: "value",
883
+ type: {
884
+ name: "Sequence",
885
+ element: {
886
+ type: {
887
+ name: "Composite",
888
+ className: "IotDpsSkuDefinition"
889
+ }
890
+ }
891
+ }
892
+ },
893
+ nextLink: {
894
+ serializedName: "nextLink",
895
+ readOnly: true,
896
+ type: {
897
+ name: "String"
898
+ }
899
+ }
900
+ }
901
+ }
902
+ };
903
+ const IotDpsSkuDefinition = {
904
+ type: {
905
+ name: "Composite",
906
+ className: "IotDpsSkuDefinition",
907
+ modelProperties: {
908
+ name: {
909
+ serializedName: "name",
910
+ type: {
911
+ name: "String"
912
+ }
913
+ }
914
+ }
915
+ }
916
+ };
917
+ const VerificationCodeResponse = {
918
+ type: {
919
+ name: "Composite",
920
+ className: "VerificationCodeResponse",
921
+ modelProperties: {
922
+ name: {
923
+ serializedName: "name",
924
+ readOnly: true,
925
+ type: {
926
+ name: "String"
927
+ }
928
+ },
929
+ etag: {
930
+ serializedName: "etag",
931
+ readOnly: true,
932
+ type: {
933
+ name: "String"
934
+ }
935
+ },
936
+ id: {
937
+ serializedName: "id",
938
+ readOnly: true,
939
+ type: {
940
+ name: "String"
941
+ }
942
+ },
943
+ type: {
944
+ serializedName: "type",
945
+ readOnly: true,
946
+ type: {
947
+ name: "String"
948
+ }
949
+ },
950
+ properties: {
951
+ serializedName: "properties",
952
+ type: {
953
+ name: "Composite",
954
+ className: "VerificationCodeResponseProperties"
955
+ }
956
+ }
957
+ }
958
+ }
959
+ };
960
+ const VerificationCodeResponseProperties = {
961
+ type: {
962
+ name: "Composite",
963
+ className: "VerificationCodeResponseProperties",
964
+ modelProperties: {
965
+ verificationCode: {
966
+ serializedName: "verificationCode",
967
+ type: {
968
+ name: "String"
969
+ }
970
+ },
971
+ subject: {
972
+ serializedName: "subject",
973
+ type: {
974
+ name: "String"
975
+ }
976
+ },
977
+ expiry: {
978
+ serializedName: "expiry",
979
+ type: {
980
+ name: "String"
981
+ }
982
+ },
983
+ thumbprint: {
984
+ serializedName: "thumbprint",
985
+ type: {
986
+ name: "String"
987
+ }
988
+ },
989
+ isVerified: {
990
+ serializedName: "isVerified",
991
+ type: {
992
+ name: "Boolean"
993
+ }
994
+ },
995
+ certificate: {
996
+ serializedName: "certificate",
997
+ type: {
998
+ name: "ByteArray"
999
+ }
1000
+ },
1001
+ created: {
1002
+ serializedName: "created",
1003
+ type: {
1004
+ name: "String"
1005
+ }
1006
+ },
1007
+ updated: {
1008
+ serializedName: "updated",
1009
+ type: {
1010
+ name: "String"
1011
+ }
1012
+ }
1013
+ }
1014
+ }
1015
+ };
1016
+ const VerificationCodeRequest = {
1017
+ type: {
1018
+ name: "Composite",
1019
+ className: "VerificationCodeRequest",
1020
+ modelProperties: {
1021
+ certificate: {
1022
+ serializedName: "certificate",
1023
+ type: {
1024
+ name: "String"
1025
+ }
1026
+ }
1027
+ }
1028
+ }
1029
+ };
1030
+ const OperationInputs = {
1031
+ type: {
1032
+ name: "Composite",
1033
+ className: "OperationInputs",
1034
+ modelProperties: {
1035
+ name: {
1036
+ serializedName: "name",
1037
+ required: true,
1038
+ type: {
1039
+ name: "String"
1040
+ }
1041
+ }
1042
+ }
1043
+ }
1044
+ };
1045
+ const NameAvailabilityInfo = {
1046
+ type: {
1047
+ name: "Composite",
1048
+ className: "NameAvailabilityInfo",
1049
+ modelProperties: {
1050
+ nameAvailable: {
1051
+ serializedName: "nameAvailable",
1052
+ type: {
1053
+ name: "Boolean"
1054
+ }
1055
+ },
1056
+ reason: {
1057
+ serializedName: "reason",
1058
+ type: {
1059
+ name: "String"
1060
+ }
1061
+ },
1062
+ message: {
1063
+ serializedName: "message",
1064
+ type: {
1065
+ name: "String"
1066
+ }
1067
+ }
1068
+ }
1069
+ }
1070
+ };
1071
+ const SharedAccessSignatureAuthorizationRuleListResult = {
1072
+ type: {
1073
+ name: "Composite",
1074
+ className: "SharedAccessSignatureAuthorizationRuleListResult",
1075
+ modelProperties: {
1076
+ value: {
1077
+ serializedName: "value",
1078
+ type: {
1079
+ name: "Sequence",
1080
+ element: {
1081
+ type: {
1082
+ name: "Composite",
1083
+ className: "SharedAccessSignatureAuthorizationRuleAccessRightsDescription"
1084
+ }
1085
+ }
1086
+ }
1087
+ },
1088
+ nextLink: {
1089
+ serializedName: "nextLink",
1090
+ readOnly: true,
1091
+ type: {
1092
+ name: "String"
1093
+ }
1094
+ }
1095
+ }
1096
+ }
1097
+ };
1098
+ const PrivateLinkResources = {
1099
+ type: {
1100
+ name: "Composite",
1101
+ className: "PrivateLinkResources",
1102
+ modelProperties: {
1103
+ value: {
1104
+ serializedName: "value",
1105
+ type: {
1106
+ name: "Sequence",
1107
+ element: {
1108
+ type: {
1109
+ name: "Composite",
1110
+ className: "GroupIdInformation"
1111
+ }
1112
+ }
1113
+ }
1114
+ }
1115
+ }
1116
+ }
1117
+ };
1118
+ const GroupIdInformation = {
1119
+ type: {
1120
+ name: "Composite",
1121
+ className: "GroupIdInformation",
1122
+ modelProperties: {
1123
+ id: {
1124
+ serializedName: "id",
1125
+ readOnly: true,
1126
+ type: {
1127
+ name: "String"
1128
+ }
1129
+ },
1130
+ name: {
1131
+ constraints: {
1132
+ Pattern: new RegExp("^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$")
1133
+ },
1134
+ serializedName: "name",
1135
+ readOnly: true,
1136
+ type: {
1137
+ name: "String"
1138
+ }
1139
+ },
1140
+ type: {
1141
+ serializedName: "type",
1142
+ readOnly: true,
1143
+ type: {
1144
+ name: "String"
1145
+ }
1146
+ },
1147
+ properties: {
1148
+ serializedName: "properties",
1149
+ type: {
1150
+ name: "Composite",
1151
+ className: "GroupIdInformationProperties"
1152
+ }
1153
+ }
1154
+ }
1155
+ }
1156
+ };
1157
+ const GroupIdInformationProperties = {
1158
+ type: {
1159
+ name: "Composite",
1160
+ className: "GroupIdInformationProperties",
1161
+ modelProperties: {
1162
+ groupId: {
1163
+ serializedName: "groupId",
1164
+ type: {
1165
+ name: "String"
1166
+ }
1167
+ },
1168
+ requiredMembers: {
1169
+ serializedName: "requiredMembers",
1170
+ type: {
1171
+ name: "Sequence",
1172
+ element: {
1173
+ type: {
1174
+ name: "String"
1175
+ }
1176
+ }
1177
+ }
1178
+ },
1179
+ requiredZoneNames: {
1180
+ serializedName: "requiredZoneNames",
1181
+ type: {
1182
+ name: "Sequence",
1183
+ element: {
1184
+ type: {
1185
+ name: "String"
1186
+ }
1187
+ }
1188
+ }
1189
+ }
1190
+ }
1191
+ }
1192
+ };
1193
+ const ProvisioningServiceDescription = {
1194
+ type: {
1195
+ name: "Composite",
1196
+ className: "ProvisioningServiceDescription",
1197
+ modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { etag: {
1198
+ serializedName: "etag",
1199
+ type: {
1200
+ name: "String"
1201
+ }
1202
+ }, properties: {
1203
+ serializedName: "properties",
1204
+ type: {
1205
+ name: "Composite",
1206
+ className: "IotDpsPropertiesDescription"
1207
+ }
1208
+ }, sku: {
1209
+ serializedName: "sku",
1210
+ type: {
1211
+ name: "Composite",
1212
+ className: "IotDpsSkuInfo"
1213
+ }
1214
+ }, systemData: {
1215
+ serializedName: "systemData",
1216
+ type: {
1217
+ name: "Composite",
1218
+ className: "SystemData"
1219
+ }
1220
+ } })
1221
+ }
1222
+ };
1223
+
1224
+ var Mappers = /*#__PURE__*/Object.freeze({
1225
+ __proto__: null,
1226
+ OperationListResult: OperationListResult,
1227
+ Operation: Operation,
1228
+ OperationDisplay: OperationDisplay,
1229
+ ErrorDetails: ErrorDetails,
1230
+ CertificateResponse: CertificateResponse,
1231
+ CertificateProperties: CertificateProperties,
1232
+ SystemData: SystemData,
1233
+ CertificateBodyDescription: CertificateBodyDescription,
1234
+ IotDpsPropertiesDescription: IotDpsPropertiesDescription,
1235
+ IpFilterRule: IpFilterRule,
1236
+ PrivateEndpointConnection: PrivateEndpointConnection,
1237
+ PrivateEndpointConnectionProperties: PrivateEndpointConnectionProperties,
1238
+ PrivateEndpoint: PrivateEndpoint,
1239
+ PrivateLinkServiceConnectionState: PrivateLinkServiceConnectionState,
1240
+ IotHubDefinitionDescription: IotHubDefinitionDescription,
1241
+ SharedAccessSignatureAuthorizationRuleAccessRightsDescription: SharedAccessSignatureAuthorizationRuleAccessRightsDescription,
1242
+ IotDpsSkuInfo: IotDpsSkuInfo,
1243
+ Resource: Resource,
1244
+ TagsResource: TagsResource,
1245
+ CertificateListDescription: CertificateListDescription,
1246
+ ProvisioningServiceDescriptionListResult: ProvisioningServiceDescriptionListResult,
1247
+ AsyncOperationResult: AsyncOperationResult,
1248
+ ErrorMesssage: ErrorMesssage,
1249
+ IotDpsSkuDefinitionListResult: IotDpsSkuDefinitionListResult,
1250
+ IotDpsSkuDefinition: IotDpsSkuDefinition,
1251
+ VerificationCodeResponse: VerificationCodeResponse,
1252
+ VerificationCodeResponseProperties: VerificationCodeResponseProperties,
1253
+ VerificationCodeRequest: VerificationCodeRequest,
1254
+ OperationInputs: OperationInputs,
1255
+ NameAvailabilityInfo: NameAvailabilityInfo,
1256
+ SharedAccessSignatureAuthorizationRuleListResult: SharedAccessSignatureAuthorizationRuleListResult,
1257
+ PrivateLinkResources: PrivateLinkResources,
1258
+ GroupIdInformation: GroupIdInformation,
1259
+ GroupIdInformationProperties: GroupIdInformationProperties,
1260
+ ProvisioningServiceDescription: ProvisioningServiceDescription
1261
+ });
1262
+
1263
+ /*
1264
+ * Copyright (c) Microsoft Corporation.
1265
+ * Licensed under the MIT License.
1266
+ *
1267
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1268
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1269
+ */
1270
+ const accept = {
1271
+ parameterPath: "accept",
1272
+ mapper: {
1273
+ defaultValue: "application/json",
1274
+ isConstant: true,
1275
+ serializedName: "Accept",
1276
+ type: {
1277
+ name: "String"
1278
+ }
1279
+ }
1280
+ };
1281
+ const $host = {
1282
+ parameterPath: "$host",
1283
+ mapper: {
1284
+ serializedName: "$host",
1285
+ required: true,
1286
+ type: {
1287
+ name: "String"
1288
+ }
1289
+ },
1290
+ skipEncoding: true
1291
+ };
1292
+ const apiVersion = {
1293
+ parameterPath: "apiVersion",
1294
+ mapper: {
1295
+ defaultValue: "2021-10-15",
1296
+ isConstant: true,
1297
+ serializedName: "api-version",
1298
+ type: {
1299
+ name: "String"
1300
+ }
1301
+ }
1302
+ };
1303
+ const nextLink = {
1304
+ parameterPath: "nextLink",
1305
+ mapper: {
1306
+ serializedName: "nextLink",
1307
+ required: true,
1308
+ type: {
1309
+ name: "String"
1310
+ }
1311
+ },
1312
+ skipEncoding: true
1313
+ };
1314
+ const certificateName = {
1315
+ parameterPath: "certificateName",
1316
+ mapper: {
1317
+ serializedName: "certificateName",
1318
+ required: true,
1319
+ type: {
1320
+ name: "String"
1321
+ }
1322
+ }
1323
+ };
1324
+ const subscriptionId = {
1325
+ parameterPath: "subscriptionId",
1326
+ mapper: {
1327
+ serializedName: "subscriptionId",
1328
+ required: true,
1329
+ type: {
1330
+ name: "String"
1331
+ }
1332
+ }
1333
+ };
1334
+ const resourceGroupName = {
1335
+ parameterPath: "resourceGroupName",
1336
+ mapper: {
1337
+ serializedName: "resourceGroupName",
1338
+ required: true,
1339
+ type: {
1340
+ name: "String"
1341
+ }
1342
+ }
1343
+ };
1344
+ const provisioningServiceName = {
1345
+ parameterPath: "provisioningServiceName",
1346
+ mapper: {
1347
+ serializedName: "provisioningServiceName",
1348
+ required: true,
1349
+ type: {
1350
+ name: "String"
1351
+ }
1352
+ }
1353
+ };
1354
+ const ifMatch = {
1355
+ parameterPath: ["options", "ifMatch"],
1356
+ mapper: {
1357
+ serializedName: "If-Match",
1358
+ type: {
1359
+ name: "String"
1360
+ }
1361
+ }
1362
+ };
1363
+ const contentType = {
1364
+ parameterPath: ["options", "contentType"],
1365
+ mapper: {
1366
+ defaultValue: "application/json",
1367
+ isConstant: true,
1368
+ serializedName: "Content-Type",
1369
+ type: {
1370
+ name: "String"
1371
+ }
1372
+ }
1373
+ };
1374
+ const certificateDescription = {
1375
+ parameterPath: "certificateDescription",
1376
+ mapper: CertificateBodyDescription
1377
+ };
1378
+ const certificateName1 = {
1379
+ parameterPath: "certificateName",
1380
+ mapper: {
1381
+ constraints: {
1382
+ MaxLength: 256
1383
+ },
1384
+ serializedName: "certificateName",
1385
+ required: true,
1386
+ type: {
1387
+ name: "String"
1388
+ }
1389
+ }
1390
+ };
1391
+ const ifMatch1 = {
1392
+ parameterPath: "ifMatch",
1393
+ mapper: {
1394
+ serializedName: "If-Match",
1395
+ required: true,
1396
+ type: {
1397
+ name: "String"
1398
+ }
1399
+ }
1400
+ };
1401
+ const certificateName11 = {
1402
+ parameterPath: ["options", "certificateName1"],
1403
+ mapper: {
1404
+ serializedName: "certificate.name",
1405
+ type: {
1406
+ name: "String"
1407
+ }
1408
+ }
1409
+ };
1410
+ const certificateRawBytes = {
1411
+ parameterPath: ["options", "certificateRawBytes"],
1412
+ mapper: {
1413
+ serializedName: "certificate.rawBytes",
1414
+ type: {
1415
+ name: "ByteArray"
1416
+ }
1417
+ }
1418
+ };
1419
+ const certificateIsVerified = {
1420
+ parameterPath: ["options", "certificateIsVerified"],
1421
+ mapper: {
1422
+ serializedName: "certificate.isVerified",
1423
+ type: {
1424
+ name: "Boolean"
1425
+ }
1426
+ }
1427
+ };
1428
+ const certificatePurpose = {
1429
+ parameterPath: ["options", "certificatePurpose"],
1430
+ mapper: {
1431
+ serializedName: "certificate.purpose",
1432
+ type: {
1433
+ name: "String"
1434
+ }
1435
+ }
1436
+ };
1437
+ const certificateCreated = {
1438
+ parameterPath: ["options", "certificateCreated"],
1439
+ mapper: {
1440
+ serializedName: "certificate.created",
1441
+ type: {
1442
+ name: "DateTime"
1443
+ }
1444
+ }
1445
+ };
1446
+ const certificateLastUpdated = {
1447
+ parameterPath: ["options", "certificateLastUpdated"],
1448
+ mapper: {
1449
+ serializedName: "certificate.lastUpdated",
1450
+ type: {
1451
+ name: "DateTime"
1452
+ }
1453
+ }
1454
+ };
1455
+ const certificateHasPrivateKey = {
1456
+ parameterPath: ["options", "certificateHasPrivateKey"],
1457
+ mapper: {
1458
+ serializedName: "certificate.hasPrivateKey",
1459
+ type: {
1460
+ name: "Boolean"
1461
+ }
1462
+ }
1463
+ };
1464
+ const certificateNonce = {
1465
+ parameterPath: ["options", "certificateNonce"],
1466
+ mapper: {
1467
+ serializedName: "certificate.nonce",
1468
+ type: {
1469
+ name: "String"
1470
+ }
1471
+ }
1472
+ };
1473
+ const request = {
1474
+ parameterPath: "request",
1475
+ mapper: VerificationCodeRequest
1476
+ };
1477
+ const iotDpsDescription = {
1478
+ parameterPath: "iotDpsDescription",
1479
+ mapper: ProvisioningServiceDescription
1480
+ };
1481
+ const provisioningServiceTags = {
1482
+ parameterPath: "provisioningServiceTags",
1483
+ mapper: TagsResource
1484
+ };
1485
+ const operationId = {
1486
+ parameterPath: "operationId",
1487
+ mapper: {
1488
+ serializedName: "operationId",
1489
+ required: true,
1490
+ type: {
1491
+ name: "String"
1492
+ }
1493
+ }
1494
+ };
1495
+ const asyncinfo = {
1496
+ parameterPath: "asyncinfo",
1497
+ mapper: {
1498
+ defaultValue: "true",
1499
+ serializedName: "asyncinfo",
1500
+ required: true,
1501
+ type: {
1502
+ name: "String"
1503
+ }
1504
+ }
1505
+ };
1506
+ const argumentsParam = {
1507
+ parameterPath: "argumentsParam",
1508
+ mapper: OperationInputs
1509
+ };
1510
+ const keyName = {
1511
+ parameterPath: "keyName",
1512
+ mapper: {
1513
+ serializedName: "keyName",
1514
+ required: true,
1515
+ type: {
1516
+ name: "String"
1517
+ }
1518
+ }
1519
+ };
1520
+ const resourceName = {
1521
+ parameterPath: "resourceName",
1522
+ mapper: {
1523
+ serializedName: "resourceName",
1524
+ required: true,
1525
+ type: {
1526
+ name: "String"
1527
+ }
1528
+ }
1529
+ };
1530
+ const groupId = {
1531
+ parameterPath: "groupId",
1532
+ mapper: {
1533
+ serializedName: "groupId",
1534
+ required: true,
1535
+ type: {
1536
+ name: "String"
1537
+ }
1538
+ }
1539
+ };
1540
+ const privateEndpointConnectionName = {
1541
+ parameterPath: "privateEndpointConnectionName",
1542
+ mapper: {
1543
+ serializedName: "privateEndpointConnectionName",
1544
+ required: true,
1545
+ type: {
1546
+ name: "String"
1547
+ }
1548
+ }
1549
+ };
1550
+ const privateEndpointConnection = {
1551
+ parameterPath: "privateEndpointConnection",
1552
+ mapper: PrivateEndpointConnection
1553
+ };
1554
+
1555
+ /*
1556
+ * Copyright (c) Microsoft Corporation.
1557
+ * Licensed under the MIT License.
1558
+ *
1559
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1560
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1561
+ */
1562
+ /// <reference lib="esnext.asynciterable" />
1563
+ /** Class containing Operations operations. */
1564
+ class OperationsImpl {
1565
+ /**
1566
+ * Initialize a new instance of the class Operations class.
1567
+ * @param client Reference to the service client
1568
+ */
1569
+ constructor(client) {
1570
+ this.client = client;
1571
+ }
1572
+ /**
1573
+ * Lists all of the available Microsoft.Devices REST API operations.
1574
+ * @param options The options parameters.
1575
+ */
1576
+ list(options) {
1577
+ const iter = this.listPagingAll(options);
1578
+ return {
1579
+ next() {
1580
+ return iter.next();
1581
+ },
1582
+ [Symbol.asyncIterator]() {
1583
+ return this;
1584
+ },
1585
+ byPage: () => {
1586
+ return this.listPagingPage(options);
1587
+ }
1588
+ };
1589
+ }
1590
+ listPagingPage(options) {
1591
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
1592
+ let result = yield tslib.__await(this._list(options));
1593
+ yield yield tslib.__await(result.value || []);
1594
+ let continuationToken = result.nextLink;
1595
+ while (continuationToken) {
1596
+ result = yield tslib.__await(this._listNext(continuationToken, options));
1597
+ continuationToken = result.nextLink;
1598
+ yield yield tslib.__await(result.value || []);
1599
+ }
1600
+ });
1601
+ }
1602
+ listPagingAll(options) {
1603
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
1604
+ var e_1, _a;
1605
+ try {
1606
+ for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1607
+ const page = _c.value;
1608
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1609
+ }
1610
+ }
1611
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1612
+ finally {
1613
+ try {
1614
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1615
+ }
1616
+ finally { if (e_1) throw e_1.error; }
1617
+ }
1618
+ });
1619
+ }
1620
+ /**
1621
+ * Lists all of the available Microsoft.Devices REST API operations.
1622
+ * @param options The options parameters.
1623
+ */
1624
+ _list(options) {
1625
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
1626
+ }
1627
+ /**
1628
+ * ListNext
1629
+ * @param nextLink The nextLink from the previous successful call to the List method.
1630
+ * @param options The options parameters.
1631
+ */
1632
+ _listNext(nextLink, options) {
1633
+ return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
1634
+ }
1635
+ }
1636
+ // Operation Specifications
1637
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
1638
+ const listOperationSpec = {
1639
+ path: "/providers/Microsoft.Devices/operations",
1640
+ httpMethod: "GET",
1641
+ responses: {
1642
+ 200: {
1643
+ bodyMapper: OperationListResult
1644
+ },
1645
+ default: {
1646
+ bodyMapper: ErrorDetails
1647
+ }
1648
+ },
1649
+ queryParameters: [apiVersion],
1650
+ urlParameters: [$host],
1651
+ headerParameters: [accept],
1652
+ serializer
1653
+ };
1654
+ const listNextOperationSpec = {
1655
+ path: "{nextLink}",
1656
+ httpMethod: "GET",
1657
+ responses: {
1658
+ 200: {
1659
+ bodyMapper: OperationListResult
1660
+ },
1661
+ default: {
1662
+ bodyMapper: ErrorDetails
1663
+ }
1664
+ },
1665
+ queryParameters: [apiVersion],
1666
+ urlParameters: [$host, nextLink],
1667
+ headerParameters: [accept],
1668
+ serializer
1669
+ };
1670
+
1671
+ /*
1672
+ * Copyright (c) Microsoft Corporation.
1673
+ * Licensed under the MIT License.
1674
+ *
1675
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1676
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1677
+ */
1678
+ /** Class containing DpsCertificate operations. */
1679
+ class DpsCertificateImpl {
1680
+ /**
1681
+ * Initialize a new instance of the class DpsCertificate class.
1682
+ * @param client Reference to the service client
1683
+ */
1684
+ constructor(client) {
1685
+ this.client = client;
1686
+ }
1687
+ /**
1688
+ * Get the certificate from the provisioning service.
1689
+ * @param certificateName Name of the certificate to retrieve.
1690
+ * @param resourceGroupName Resource group identifier.
1691
+ * @param provisioningServiceName Name of the provisioning service the certificate is associated with.
1692
+ * @param options The options parameters.
1693
+ */
1694
+ get(certificateName, resourceGroupName, provisioningServiceName, options) {
1695
+ return this.client.sendOperationRequest({ certificateName, resourceGroupName, provisioningServiceName, options }, getOperationSpec);
1696
+ }
1697
+ /**
1698
+ * Add new certificate or update an existing certificate.
1699
+ * @param resourceGroupName Resource group identifier.
1700
+ * @param provisioningServiceName The name of the provisioning service.
1701
+ * @param certificateName The name of the certificate create or update.
1702
+ * @param certificateDescription The certificate body.
1703
+ * @param options The options parameters.
1704
+ */
1705
+ createOrUpdate(resourceGroupName, provisioningServiceName, certificateName, certificateDescription, options) {
1706
+ return this.client.sendOperationRequest({
1707
+ resourceGroupName,
1708
+ provisioningServiceName,
1709
+ certificateName,
1710
+ certificateDescription,
1711
+ options
1712
+ }, createOrUpdateOperationSpec);
1713
+ }
1714
+ /**
1715
+ * Deletes the specified certificate associated with the Provisioning Service
1716
+ * @param resourceGroupName Resource group identifier.
1717
+ * @param ifMatch ETag of the certificate
1718
+ * @param provisioningServiceName The name of the provisioning service.
1719
+ * @param certificateName This is a mandatory field, and is the logical name of the certificate that
1720
+ * the provisioning service will access by.
1721
+ * @param options The options parameters.
1722
+ */
1723
+ delete(resourceGroupName, ifMatch, provisioningServiceName, certificateName, options) {
1724
+ return this.client.sendOperationRequest({
1725
+ resourceGroupName,
1726
+ ifMatch,
1727
+ provisioningServiceName,
1728
+ certificateName,
1729
+ options
1730
+ }, deleteOperationSpec);
1731
+ }
1732
+ /**
1733
+ * Get all the certificates tied to the provisioning service.
1734
+ * @param resourceGroupName Name of resource group.
1735
+ * @param provisioningServiceName Name of provisioning service to retrieve certificates for.
1736
+ * @param options The options parameters.
1737
+ */
1738
+ list(resourceGroupName, provisioningServiceName, options) {
1739
+ return this.client.sendOperationRequest({ resourceGroupName, provisioningServiceName, options }, listOperationSpec$1);
1740
+ }
1741
+ /**
1742
+ * Generate verification code for Proof of Possession.
1743
+ * @param certificateName The mandatory logical name of the certificate, that the provisioning service
1744
+ * uses to access.
1745
+ * @param ifMatch ETag of the certificate. This is required to update an existing certificate, and
1746
+ * ignored while creating a brand new certificate.
1747
+ * @param resourceGroupName name of resource group.
1748
+ * @param provisioningServiceName Name of provisioning service.
1749
+ * @param options The options parameters.
1750
+ */
1751
+ generateVerificationCode(certificateName, ifMatch, resourceGroupName, provisioningServiceName, options) {
1752
+ return this.client.sendOperationRequest({
1753
+ certificateName,
1754
+ ifMatch,
1755
+ resourceGroupName,
1756
+ provisioningServiceName,
1757
+ options
1758
+ }, generateVerificationCodeOperationSpec);
1759
+ }
1760
+ /**
1761
+ * Verifies the certificate's private key possession by providing the leaf cert issued by the verifying
1762
+ * pre uploaded certificate.
1763
+ * @param certificateName The mandatory logical name of the certificate, that the provisioning service
1764
+ * uses to access.
1765
+ * @param ifMatch ETag of the certificate.
1766
+ * @param resourceGroupName Resource group name.
1767
+ * @param provisioningServiceName Provisioning service name.
1768
+ * @param request The name of the certificate
1769
+ * @param options The options parameters.
1770
+ */
1771
+ verifyCertificate(certificateName, ifMatch, resourceGroupName, provisioningServiceName, request, options) {
1772
+ return this.client.sendOperationRequest({
1773
+ certificateName,
1774
+ ifMatch,
1775
+ resourceGroupName,
1776
+ provisioningServiceName,
1777
+ request,
1778
+ options
1779
+ }, verifyCertificateOperationSpec);
1780
+ }
1781
+ }
1782
+ // Operation Specifications
1783
+ const serializer$1 = coreClient.createSerializer(Mappers, /* isXml */ false);
1784
+ const getOperationSpec = {
1785
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/certificates/{certificateName}",
1786
+ httpMethod: "GET",
1787
+ responses: {
1788
+ 200: {
1789
+ bodyMapper: CertificateResponse
1790
+ },
1791
+ default: {
1792
+ bodyMapper: ErrorDetails
1793
+ }
1794
+ },
1795
+ queryParameters: [apiVersion],
1796
+ urlParameters: [
1797
+ $host,
1798
+ certificateName,
1799
+ subscriptionId,
1800
+ resourceGroupName,
1801
+ provisioningServiceName
1802
+ ],
1803
+ headerParameters: [accept, ifMatch],
1804
+ serializer: serializer$1
1805
+ };
1806
+ const createOrUpdateOperationSpec = {
1807
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/certificates/{certificateName}",
1808
+ httpMethod: "PUT",
1809
+ responses: {
1810
+ 200: {
1811
+ bodyMapper: CertificateResponse
1812
+ },
1813
+ default: {
1814
+ bodyMapper: ErrorDetails
1815
+ }
1816
+ },
1817
+ requestBody: certificateDescription,
1818
+ queryParameters: [apiVersion],
1819
+ urlParameters: [
1820
+ $host,
1821
+ subscriptionId,
1822
+ resourceGroupName,
1823
+ provisioningServiceName,
1824
+ certificateName1
1825
+ ],
1826
+ headerParameters: [
1827
+ accept,
1828
+ ifMatch,
1829
+ contentType
1830
+ ],
1831
+ mediaType: "json",
1832
+ serializer: serializer$1
1833
+ };
1834
+ const deleteOperationSpec = {
1835
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/certificates/{certificateName}",
1836
+ httpMethod: "DELETE",
1837
+ responses: {
1838
+ 200: {},
1839
+ 204: {},
1840
+ default: {
1841
+ bodyMapper: ErrorDetails
1842
+ }
1843
+ },
1844
+ queryParameters: [
1845
+ apiVersion,
1846
+ certificateName11,
1847
+ certificateRawBytes,
1848
+ certificateIsVerified,
1849
+ certificatePurpose,
1850
+ certificateCreated,
1851
+ certificateLastUpdated,
1852
+ certificateHasPrivateKey,
1853
+ certificateNonce
1854
+ ],
1855
+ urlParameters: [
1856
+ $host,
1857
+ certificateName,
1858
+ subscriptionId,
1859
+ resourceGroupName,
1860
+ provisioningServiceName
1861
+ ],
1862
+ headerParameters: [accept, ifMatch1],
1863
+ serializer: serializer$1
1864
+ };
1865
+ const listOperationSpec$1 = {
1866
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/certificates",
1867
+ httpMethod: "GET",
1868
+ responses: {
1869
+ 200: {
1870
+ bodyMapper: CertificateListDescription
1871
+ },
1872
+ default: {
1873
+ bodyMapper: ErrorDetails
1874
+ }
1875
+ },
1876
+ queryParameters: [apiVersion],
1877
+ urlParameters: [
1878
+ $host,
1879
+ subscriptionId,
1880
+ resourceGroupName,
1881
+ provisioningServiceName
1882
+ ],
1883
+ headerParameters: [accept],
1884
+ serializer: serializer$1
1885
+ };
1886
+ const generateVerificationCodeOperationSpec = {
1887
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/certificates/{certificateName}/generateVerificationCode",
1888
+ httpMethod: "POST",
1889
+ responses: {
1890
+ 200: {
1891
+ bodyMapper: VerificationCodeResponse
1892
+ },
1893
+ default: {
1894
+ bodyMapper: ErrorDetails
1895
+ }
1896
+ },
1897
+ queryParameters: [
1898
+ apiVersion,
1899
+ certificateName11,
1900
+ certificateRawBytes,
1901
+ certificateIsVerified,
1902
+ certificatePurpose,
1903
+ certificateCreated,
1904
+ certificateLastUpdated,
1905
+ certificateHasPrivateKey,
1906
+ certificateNonce
1907
+ ],
1908
+ urlParameters: [
1909
+ $host,
1910
+ certificateName,
1911
+ subscriptionId,
1912
+ resourceGroupName,
1913
+ provisioningServiceName
1914
+ ],
1915
+ headerParameters: [accept, ifMatch1],
1916
+ serializer: serializer$1
1917
+ };
1918
+ const verifyCertificateOperationSpec = {
1919
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/certificates/{certificateName}/verify",
1920
+ httpMethod: "POST",
1921
+ responses: {
1922
+ 200: {
1923
+ bodyMapper: CertificateResponse
1924
+ },
1925
+ default: {
1926
+ bodyMapper: ErrorDetails
1927
+ }
1928
+ },
1929
+ requestBody: request,
1930
+ queryParameters: [
1931
+ apiVersion,
1932
+ certificateName11,
1933
+ certificateRawBytes,
1934
+ certificateIsVerified,
1935
+ certificatePurpose,
1936
+ certificateCreated,
1937
+ certificateLastUpdated,
1938
+ certificateHasPrivateKey,
1939
+ certificateNonce
1940
+ ],
1941
+ urlParameters: [
1942
+ $host,
1943
+ certificateName,
1944
+ subscriptionId,
1945
+ resourceGroupName,
1946
+ provisioningServiceName
1947
+ ],
1948
+ headerParameters: [
1949
+ accept,
1950
+ contentType,
1951
+ ifMatch1
1952
+ ],
1953
+ mediaType: "json",
1954
+ serializer: serializer$1
1955
+ };
1956
+
1957
+ /*
1958
+ * Copyright (c) Microsoft Corporation.
1959
+ * Licensed under the MIT License.
1960
+ *
1961
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1962
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1963
+ */
1964
+ class LroImpl {
1965
+ constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
1966
+ this.sendOperationFn = sendOperationFn;
1967
+ this.args = args;
1968
+ this.spec = spec;
1969
+ this.requestPath = requestPath;
1970
+ this.requestMethod = requestMethod;
1971
+ }
1972
+ sendInitialRequest() {
1973
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1974
+ return this.sendOperationFn(this.args, this.spec);
1975
+ });
1976
+ }
1977
+ sendPollRequest(path) {
1978
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1979
+ const _a = this.spec, restSpec = tslib.__rest(_a, ["requestBody"]);
1980
+ return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
1981
+ });
1982
+ }
1983
+ }
1984
+
1985
+ /*
1986
+ * Copyright (c) Microsoft Corporation.
1987
+ * Licensed under the MIT License.
1988
+ *
1989
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1990
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1991
+ */
1992
+ /// <reference lib="esnext.asynciterable" />
1993
+ /** Class containing IotDpsResource operations. */
1994
+ class IotDpsResourceImpl {
1995
+ /**
1996
+ * Initialize a new instance of the class IotDpsResource class.
1997
+ * @param client Reference to the service client
1998
+ */
1999
+ constructor(client) {
2000
+ this.client = client;
2001
+ }
2002
+ /**
2003
+ * List all the provisioning services for a given subscription id.
2004
+ * @param options The options parameters.
2005
+ */
2006
+ listBySubscription(options) {
2007
+ const iter = this.listBySubscriptionPagingAll(options);
2008
+ return {
2009
+ next() {
2010
+ return iter.next();
2011
+ },
2012
+ [Symbol.asyncIterator]() {
2013
+ return this;
2014
+ },
2015
+ byPage: () => {
2016
+ return this.listBySubscriptionPagingPage(options);
2017
+ }
2018
+ };
2019
+ }
2020
+ listBySubscriptionPagingPage(options) {
2021
+ return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
2022
+ let result = yield tslib.__await(this._listBySubscription(options));
2023
+ yield yield tslib.__await(result.value || []);
2024
+ let continuationToken = result.nextLink;
2025
+ while (continuationToken) {
2026
+ result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
2027
+ continuationToken = result.nextLink;
2028
+ yield yield tslib.__await(result.value || []);
2029
+ }
2030
+ });
2031
+ }
2032
+ listBySubscriptionPagingAll(options) {
2033
+ return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
2034
+ var e_1, _a;
2035
+ try {
2036
+ for (var _b = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2037
+ const page = _c.value;
2038
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2039
+ }
2040
+ }
2041
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2042
+ finally {
2043
+ try {
2044
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2045
+ }
2046
+ finally { if (e_1) throw e_1.error; }
2047
+ }
2048
+ });
2049
+ }
2050
+ /**
2051
+ * Get a list of all provisioning services in the given resource group.
2052
+ * @param resourceGroupName Resource group identifier.
2053
+ * @param options The options parameters.
2054
+ */
2055
+ listByResourceGroup(resourceGroupName, options) {
2056
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
2057
+ return {
2058
+ next() {
2059
+ return iter.next();
2060
+ },
2061
+ [Symbol.asyncIterator]() {
2062
+ return this;
2063
+ },
2064
+ byPage: () => {
2065
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
2066
+ }
2067
+ };
2068
+ }
2069
+ listByResourceGroupPagingPage(resourceGroupName, options) {
2070
+ return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
2071
+ let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
2072
+ yield yield tslib.__await(result.value || []);
2073
+ let continuationToken = result.nextLink;
2074
+ while (continuationToken) {
2075
+ result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
2076
+ continuationToken = result.nextLink;
2077
+ yield yield tslib.__await(result.value || []);
2078
+ }
2079
+ });
2080
+ }
2081
+ listByResourceGroupPagingAll(resourceGroupName, options) {
2082
+ return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
2083
+ var e_2, _a;
2084
+ try {
2085
+ for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2086
+ const page = _c.value;
2087
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2088
+ }
2089
+ }
2090
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
2091
+ finally {
2092
+ try {
2093
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2094
+ }
2095
+ finally { if (e_2) throw e_2.error; }
2096
+ }
2097
+ });
2098
+ }
2099
+ /**
2100
+ * Gets the list of valid SKUs and tiers for a provisioning service.
2101
+ * @param provisioningServiceName Name of provisioning service.
2102
+ * @param resourceGroupName Name of resource group.
2103
+ * @param options The options parameters.
2104
+ */
2105
+ listValidSkus(provisioningServiceName, resourceGroupName, options) {
2106
+ const iter = this.listValidSkusPagingAll(provisioningServiceName, resourceGroupName, options);
2107
+ return {
2108
+ next() {
2109
+ return iter.next();
2110
+ },
2111
+ [Symbol.asyncIterator]() {
2112
+ return this;
2113
+ },
2114
+ byPage: () => {
2115
+ return this.listValidSkusPagingPage(provisioningServiceName, resourceGroupName, options);
2116
+ }
2117
+ };
2118
+ }
2119
+ listValidSkusPagingPage(provisioningServiceName, resourceGroupName, options) {
2120
+ return tslib.__asyncGenerator(this, arguments, function* listValidSkusPagingPage_1() {
2121
+ let result = yield tslib.__await(this._listValidSkus(provisioningServiceName, resourceGroupName, options));
2122
+ yield yield tslib.__await(result.value || []);
2123
+ let continuationToken = result.nextLink;
2124
+ while (continuationToken) {
2125
+ result = yield tslib.__await(this._listValidSkusNext(provisioningServiceName, resourceGroupName, continuationToken, options));
2126
+ continuationToken = result.nextLink;
2127
+ yield yield tslib.__await(result.value || []);
2128
+ }
2129
+ });
2130
+ }
2131
+ listValidSkusPagingAll(provisioningServiceName, resourceGroupName, options) {
2132
+ return tslib.__asyncGenerator(this, arguments, function* listValidSkusPagingAll_1() {
2133
+ var e_3, _a;
2134
+ try {
2135
+ for (var _b = tslib.__asyncValues(this.listValidSkusPagingPage(provisioningServiceName, resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2136
+ const page = _c.value;
2137
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2138
+ }
2139
+ }
2140
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
2141
+ finally {
2142
+ try {
2143
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2144
+ }
2145
+ finally { if (e_3) throw e_3.error; }
2146
+ }
2147
+ });
2148
+ }
2149
+ /**
2150
+ * List the primary and secondary keys for a provisioning service.
2151
+ * @param provisioningServiceName The provisioning service name to get the shared access keys for.
2152
+ * @param resourceGroupName resource group name
2153
+ * @param options The options parameters.
2154
+ */
2155
+ listKeys(provisioningServiceName, resourceGroupName, options) {
2156
+ const iter = this.listKeysPagingAll(provisioningServiceName, resourceGroupName, options);
2157
+ return {
2158
+ next() {
2159
+ return iter.next();
2160
+ },
2161
+ [Symbol.asyncIterator]() {
2162
+ return this;
2163
+ },
2164
+ byPage: () => {
2165
+ return this.listKeysPagingPage(provisioningServiceName, resourceGroupName, options);
2166
+ }
2167
+ };
2168
+ }
2169
+ listKeysPagingPage(provisioningServiceName, resourceGroupName, options) {
2170
+ return tslib.__asyncGenerator(this, arguments, function* listKeysPagingPage_1() {
2171
+ let result = yield tslib.__await(this._listKeys(provisioningServiceName, resourceGroupName, options));
2172
+ yield yield tslib.__await(result.value || []);
2173
+ let continuationToken = result.nextLink;
2174
+ while (continuationToken) {
2175
+ result = yield tslib.__await(this._listKeysNext(provisioningServiceName, resourceGroupName, continuationToken, options));
2176
+ continuationToken = result.nextLink;
2177
+ yield yield tslib.__await(result.value || []);
2178
+ }
2179
+ });
2180
+ }
2181
+ listKeysPagingAll(provisioningServiceName, resourceGroupName, options) {
2182
+ return tslib.__asyncGenerator(this, arguments, function* listKeysPagingAll_1() {
2183
+ var e_4, _a;
2184
+ try {
2185
+ for (var _b = tslib.__asyncValues(this.listKeysPagingPage(provisioningServiceName, resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2186
+ const page = _c.value;
2187
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2188
+ }
2189
+ }
2190
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
2191
+ finally {
2192
+ try {
2193
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2194
+ }
2195
+ finally { if (e_4) throw e_4.error; }
2196
+ }
2197
+ });
2198
+ }
2199
+ /**
2200
+ * Get the metadata of the provisioning service without SAS keys.
2201
+ * @param provisioningServiceName Name of the provisioning service to retrieve.
2202
+ * @param resourceGroupName Resource group name.
2203
+ * @param options The options parameters.
2204
+ */
2205
+ get(provisioningServiceName, resourceGroupName, options) {
2206
+ return this.client.sendOperationRequest({ provisioningServiceName, resourceGroupName, options }, getOperationSpec$1);
2207
+ }
2208
+ /**
2209
+ * Create or update the metadata of the provisioning service. The usual pattern to modify a property is
2210
+ * to retrieve the provisioning service metadata and security metadata, and then combine them with the
2211
+ * modified values in a new body to update the provisioning service.
2212
+ * @param resourceGroupName Resource group identifier.
2213
+ * @param provisioningServiceName Name of provisioning service to create or update.
2214
+ * @param iotDpsDescription Description of the provisioning service to create or update.
2215
+ * @param options The options parameters.
2216
+ */
2217
+ beginCreateOrUpdate(resourceGroupName, provisioningServiceName, iotDpsDescription, options) {
2218
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2219
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2220
+ return this.client.sendOperationRequest(args, spec);
2221
+ });
2222
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2223
+ var _a;
2224
+ let currentRawResponse = undefined;
2225
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2226
+ const callback = (rawResponse, flatResponse) => {
2227
+ currentRawResponse = rawResponse;
2228
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2229
+ };
2230
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2231
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2232
+ return {
2233
+ flatResponse,
2234
+ rawResponse: {
2235
+ statusCode: currentRawResponse.status,
2236
+ body: currentRawResponse.parsedBody,
2237
+ headers: currentRawResponse.headers.toJSON()
2238
+ }
2239
+ };
2240
+ });
2241
+ const lro = new LroImpl(sendOperation, {
2242
+ resourceGroupName,
2243
+ provisioningServiceName,
2244
+ iotDpsDescription,
2245
+ options
2246
+ }, createOrUpdateOperationSpec$1);
2247
+ return new coreLro.LroEngine(lro, {
2248
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2249
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2250
+ });
2251
+ });
2252
+ }
2253
+ /**
2254
+ * Create or update the metadata of the provisioning service. The usual pattern to modify a property is
2255
+ * to retrieve the provisioning service metadata and security metadata, and then combine them with the
2256
+ * modified values in a new body to update the provisioning service.
2257
+ * @param resourceGroupName Resource group identifier.
2258
+ * @param provisioningServiceName Name of provisioning service to create or update.
2259
+ * @param iotDpsDescription Description of the provisioning service to create or update.
2260
+ * @param options The options parameters.
2261
+ */
2262
+ beginCreateOrUpdateAndWait(resourceGroupName, provisioningServiceName, iotDpsDescription, options) {
2263
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2264
+ const poller = yield this.beginCreateOrUpdate(resourceGroupName, provisioningServiceName, iotDpsDescription, options);
2265
+ return poller.pollUntilDone();
2266
+ });
2267
+ }
2268
+ /**
2269
+ * Update an existing provisioning service's tags. to update other fields use the CreateOrUpdate method
2270
+ * @param resourceGroupName Resource group identifier.
2271
+ * @param provisioningServiceName Name of provisioning service to create or update.
2272
+ * @param provisioningServiceTags Updated tag information to set into the provisioning service
2273
+ * instance.
2274
+ * @param options The options parameters.
2275
+ */
2276
+ beginUpdate(resourceGroupName, provisioningServiceName, provisioningServiceTags, options) {
2277
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2278
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2279
+ return this.client.sendOperationRequest(args, spec);
2280
+ });
2281
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2282
+ var _a;
2283
+ let currentRawResponse = undefined;
2284
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2285
+ const callback = (rawResponse, flatResponse) => {
2286
+ currentRawResponse = rawResponse;
2287
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2288
+ };
2289
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2290
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2291
+ return {
2292
+ flatResponse,
2293
+ rawResponse: {
2294
+ statusCode: currentRawResponse.status,
2295
+ body: currentRawResponse.parsedBody,
2296
+ headers: currentRawResponse.headers.toJSON()
2297
+ }
2298
+ };
2299
+ });
2300
+ const lro = new LroImpl(sendOperation, {
2301
+ resourceGroupName,
2302
+ provisioningServiceName,
2303
+ provisioningServiceTags,
2304
+ options
2305
+ }, updateOperationSpec);
2306
+ return new coreLro.LroEngine(lro, {
2307
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2308
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2309
+ });
2310
+ });
2311
+ }
2312
+ /**
2313
+ * Update an existing provisioning service's tags. to update other fields use the CreateOrUpdate method
2314
+ * @param resourceGroupName Resource group identifier.
2315
+ * @param provisioningServiceName Name of provisioning service to create or update.
2316
+ * @param provisioningServiceTags Updated tag information to set into the provisioning service
2317
+ * instance.
2318
+ * @param options The options parameters.
2319
+ */
2320
+ beginUpdateAndWait(resourceGroupName, provisioningServiceName, provisioningServiceTags, options) {
2321
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2322
+ const poller = yield this.beginUpdate(resourceGroupName, provisioningServiceName, provisioningServiceTags, options);
2323
+ return poller.pollUntilDone();
2324
+ });
2325
+ }
2326
+ /**
2327
+ * Deletes the Provisioning Service.
2328
+ * @param provisioningServiceName Name of provisioning service to delete.
2329
+ * @param resourceGroupName Resource group identifier.
2330
+ * @param options The options parameters.
2331
+ */
2332
+ beginDelete(provisioningServiceName, resourceGroupName, options) {
2333
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2334
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2335
+ return this.client.sendOperationRequest(args, spec);
2336
+ });
2337
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2338
+ var _a;
2339
+ let currentRawResponse = undefined;
2340
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2341
+ const callback = (rawResponse, flatResponse) => {
2342
+ currentRawResponse = rawResponse;
2343
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2344
+ };
2345
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2346
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2347
+ return {
2348
+ flatResponse,
2349
+ rawResponse: {
2350
+ statusCode: currentRawResponse.status,
2351
+ body: currentRawResponse.parsedBody,
2352
+ headers: currentRawResponse.headers.toJSON()
2353
+ }
2354
+ };
2355
+ });
2356
+ const lro = new LroImpl(sendOperation, { provisioningServiceName, resourceGroupName, options }, deleteOperationSpec$1);
2357
+ return new coreLro.LroEngine(lro, {
2358
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2359
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2360
+ });
2361
+ });
2362
+ }
2363
+ /**
2364
+ * Deletes the Provisioning Service.
2365
+ * @param provisioningServiceName Name of provisioning service to delete.
2366
+ * @param resourceGroupName Resource group identifier.
2367
+ * @param options The options parameters.
2368
+ */
2369
+ beginDeleteAndWait(provisioningServiceName, resourceGroupName, options) {
2370
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2371
+ const poller = yield this.beginDelete(provisioningServiceName, resourceGroupName, options);
2372
+ return poller.pollUntilDone();
2373
+ });
2374
+ }
2375
+ /**
2376
+ * List all the provisioning services for a given subscription id.
2377
+ * @param options The options parameters.
2378
+ */
2379
+ _listBySubscription(options) {
2380
+ return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec);
2381
+ }
2382
+ /**
2383
+ * Get a list of all provisioning services in the given resource group.
2384
+ * @param resourceGroupName Resource group identifier.
2385
+ * @param options The options parameters.
2386
+ */
2387
+ _listByResourceGroup(resourceGroupName, options) {
2388
+ return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
2389
+ }
2390
+ /**
2391
+ * Gets the status of a long running operation, such as create, update or delete a provisioning
2392
+ * service.
2393
+ * @param operationId Operation id corresponding to long running operation. Use this to poll for the
2394
+ * status.
2395
+ * @param resourceGroupName Resource group identifier.
2396
+ * @param provisioningServiceName Name of provisioning service that the operation is running on.
2397
+ * @param asyncinfo Async header used to poll on the status of the operation, obtained while creating
2398
+ * the long running operation.
2399
+ * @param options The options parameters.
2400
+ */
2401
+ getOperationResult(operationId, resourceGroupName, provisioningServiceName, asyncinfo, options) {
2402
+ return this.client.sendOperationRequest({
2403
+ operationId,
2404
+ resourceGroupName,
2405
+ provisioningServiceName,
2406
+ asyncinfo,
2407
+ options
2408
+ }, getOperationResultOperationSpec);
2409
+ }
2410
+ /**
2411
+ * Gets the list of valid SKUs and tiers for a provisioning service.
2412
+ * @param provisioningServiceName Name of provisioning service.
2413
+ * @param resourceGroupName Name of resource group.
2414
+ * @param options The options parameters.
2415
+ */
2416
+ _listValidSkus(provisioningServiceName, resourceGroupName, options) {
2417
+ return this.client.sendOperationRequest({ provisioningServiceName, resourceGroupName, options }, listValidSkusOperationSpec);
2418
+ }
2419
+ /**
2420
+ * Check if a provisioning service name is available. This will validate if the name is syntactically
2421
+ * valid and if the name is usable
2422
+ * @param argumentsParam Set the name parameter in the OperationInputs structure to the name of the
2423
+ * provisioning service to check.
2424
+ * @param options The options parameters.
2425
+ */
2426
+ checkProvisioningServiceNameAvailability(argumentsParam, options) {
2427
+ return this.client.sendOperationRequest({ argumentsParam, options }, checkProvisioningServiceNameAvailabilityOperationSpec);
2428
+ }
2429
+ /**
2430
+ * List the primary and secondary keys for a provisioning service.
2431
+ * @param provisioningServiceName The provisioning service name to get the shared access keys for.
2432
+ * @param resourceGroupName resource group name
2433
+ * @param options The options parameters.
2434
+ */
2435
+ _listKeys(provisioningServiceName, resourceGroupName, options) {
2436
+ return this.client.sendOperationRequest({ provisioningServiceName, resourceGroupName, options }, listKeysOperationSpec);
2437
+ }
2438
+ /**
2439
+ * List primary and secondary keys for a specific key name
2440
+ * @param provisioningServiceName Name of the provisioning service.
2441
+ * @param keyName Logical key name to get key-values for.
2442
+ * @param resourceGroupName The name of the resource group that contains the provisioning service.
2443
+ * @param options The options parameters.
2444
+ */
2445
+ listKeysForKeyName(provisioningServiceName, keyName, resourceGroupName, options) {
2446
+ return this.client.sendOperationRequest({ provisioningServiceName, keyName, resourceGroupName, options }, listKeysForKeyNameOperationSpec);
2447
+ }
2448
+ /**
2449
+ * List private link resources for the given provisioning service
2450
+ * @param resourceGroupName The name of the resource group that contains the provisioning service.
2451
+ * @param resourceName The name of the provisioning service.
2452
+ * @param options The options parameters.
2453
+ */
2454
+ listPrivateLinkResources(resourceGroupName, resourceName, options) {
2455
+ return this.client.sendOperationRequest({ resourceGroupName, resourceName, options }, listPrivateLinkResourcesOperationSpec);
2456
+ }
2457
+ /**
2458
+ * Get the specified private link resource for the given provisioning service
2459
+ * @param resourceGroupName The name of the resource group that contains the provisioning service.
2460
+ * @param resourceName The name of the provisioning service.
2461
+ * @param groupId The name of the private link resource
2462
+ * @param options The options parameters.
2463
+ */
2464
+ getPrivateLinkResources(resourceGroupName, resourceName, groupId, options) {
2465
+ return this.client.sendOperationRequest({ resourceGroupName, resourceName, groupId, options }, getPrivateLinkResourcesOperationSpec);
2466
+ }
2467
+ /**
2468
+ * List private endpoint connection properties
2469
+ * @param resourceGroupName The name of the resource group that contains the provisioning service.
2470
+ * @param resourceName The name of the provisioning service.
2471
+ * @param options The options parameters.
2472
+ */
2473
+ listPrivateEndpointConnections(resourceGroupName, resourceName, options) {
2474
+ return this.client.sendOperationRequest({ resourceGroupName, resourceName, options }, listPrivateEndpointConnectionsOperationSpec);
2475
+ }
2476
+ /**
2477
+ * Get private endpoint connection properties
2478
+ * @param resourceGroupName The name of the resource group that contains the provisioning service.
2479
+ * @param resourceName The name of the provisioning service.
2480
+ * @param privateEndpointConnectionName The name of the private endpoint connection
2481
+ * @param options The options parameters.
2482
+ */
2483
+ getPrivateEndpointConnection(resourceGroupName, resourceName, privateEndpointConnectionName, options) {
2484
+ return this.client.sendOperationRequest({
2485
+ resourceGroupName,
2486
+ resourceName,
2487
+ privateEndpointConnectionName,
2488
+ options
2489
+ }, getPrivateEndpointConnectionOperationSpec);
2490
+ }
2491
+ /**
2492
+ * Create or update the status of a private endpoint connection with the specified name
2493
+ * @param resourceGroupName The name of the resource group that contains the provisioning service.
2494
+ * @param resourceName The name of the provisioning service.
2495
+ * @param privateEndpointConnectionName The name of the private endpoint connection
2496
+ * @param privateEndpointConnection The private endpoint connection with updated properties
2497
+ * @param options The options parameters.
2498
+ */
2499
+ beginCreateOrUpdatePrivateEndpointConnection(resourceGroupName, resourceName, privateEndpointConnectionName, privateEndpointConnection, options) {
2500
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2501
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2502
+ return this.client.sendOperationRequest(args, spec);
2503
+ });
2504
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2505
+ var _a;
2506
+ let currentRawResponse = undefined;
2507
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2508
+ const callback = (rawResponse, flatResponse) => {
2509
+ currentRawResponse = rawResponse;
2510
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2511
+ };
2512
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2513
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2514
+ return {
2515
+ flatResponse,
2516
+ rawResponse: {
2517
+ statusCode: currentRawResponse.status,
2518
+ body: currentRawResponse.parsedBody,
2519
+ headers: currentRawResponse.headers.toJSON()
2520
+ }
2521
+ };
2522
+ });
2523
+ const lro = new LroImpl(sendOperation, {
2524
+ resourceGroupName,
2525
+ resourceName,
2526
+ privateEndpointConnectionName,
2527
+ privateEndpointConnection,
2528
+ options
2529
+ }, createOrUpdatePrivateEndpointConnectionOperationSpec);
2530
+ return new coreLro.LroEngine(lro, {
2531
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2532
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2533
+ });
2534
+ });
2535
+ }
2536
+ /**
2537
+ * Create or update the status of a private endpoint connection with the specified name
2538
+ * @param resourceGroupName The name of the resource group that contains the provisioning service.
2539
+ * @param resourceName The name of the provisioning service.
2540
+ * @param privateEndpointConnectionName The name of the private endpoint connection
2541
+ * @param privateEndpointConnection The private endpoint connection with updated properties
2542
+ * @param options The options parameters.
2543
+ */
2544
+ beginCreateOrUpdatePrivateEndpointConnectionAndWait(resourceGroupName, resourceName, privateEndpointConnectionName, privateEndpointConnection, options) {
2545
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2546
+ const poller = yield this.beginCreateOrUpdatePrivateEndpointConnection(resourceGroupName, resourceName, privateEndpointConnectionName, privateEndpointConnection, options);
2547
+ return poller.pollUntilDone();
2548
+ });
2549
+ }
2550
+ /**
2551
+ * Delete private endpoint connection with the specified name
2552
+ * @param resourceGroupName The name of the resource group that contains the provisioning service.
2553
+ * @param resourceName The name of the provisioning service.
2554
+ * @param privateEndpointConnectionName The name of the private endpoint connection
2555
+ * @param options The options parameters.
2556
+ */
2557
+ beginDeletePrivateEndpointConnection(resourceGroupName, resourceName, privateEndpointConnectionName, options) {
2558
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2559
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2560
+ return this.client.sendOperationRequest(args, spec);
2561
+ });
2562
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2563
+ var _a;
2564
+ let currentRawResponse = undefined;
2565
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2566
+ const callback = (rawResponse, flatResponse) => {
2567
+ currentRawResponse = rawResponse;
2568
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2569
+ };
2570
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2571
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2572
+ return {
2573
+ flatResponse,
2574
+ rawResponse: {
2575
+ statusCode: currentRawResponse.status,
2576
+ body: currentRawResponse.parsedBody,
2577
+ headers: currentRawResponse.headers.toJSON()
2578
+ }
2579
+ };
2580
+ });
2581
+ const lro = new LroImpl(sendOperation, {
2582
+ resourceGroupName,
2583
+ resourceName,
2584
+ privateEndpointConnectionName,
2585
+ options
2586
+ }, deletePrivateEndpointConnectionOperationSpec);
2587
+ return new coreLro.LroEngine(lro, {
2588
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2589
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2590
+ });
2591
+ });
2592
+ }
2593
+ /**
2594
+ * Delete private endpoint connection with the specified name
2595
+ * @param resourceGroupName The name of the resource group that contains the provisioning service.
2596
+ * @param resourceName The name of the provisioning service.
2597
+ * @param privateEndpointConnectionName The name of the private endpoint connection
2598
+ * @param options The options parameters.
2599
+ */
2600
+ beginDeletePrivateEndpointConnectionAndWait(resourceGroupName, resourceName, privateEndpointConnectionName, options) {
2601
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2602
+ const poller = yield this.beginDeletePrivateEndpointConnection(resourceGroupName, resourceName, privateEndpointConnectionName, options);
2603
+ return poller.pollUntilDone();
2604
+ });
2605
+ }
2606
+ /**
2607
+ * ListBySubscriptionNext
2608
+ * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
2609
+ * @param options The options parameters.
2610
+ */
2611
+ _listBySubscriptionNext(nextLink, options) {
2612
+ return this.client.sendOperationRequest({ nextLink, options }, listBySubscriptionNextOperationSpec);
2613
+ }
2614
+ /**
2615
+ * ListByResourceGroupNext
2616
+ * @param resourceGroupName Resource group identifier.
2617
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
2618
+ * @param options The options parameters.
2619
+ */
2620
+ _listByResourceGroupNext(resourceGroupName, nextLink, options) {
2621
+ return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec);
2622
+ }
2623
+ /**
2624
+ * ListValidSkusNext
2625
+ * @param provisioningServiceName Name of provisioning service.
2626
+ * @param resourceGroupName Name of resource group.
2627
+ * @param nextLink The nextLink from the previous successful call to the ListValidSkus method.
2628
+ * @param options The options parameters.
2629
+ */
2630
+ _listValidSkusNext(provisioningServiceName, resourceGroupName, nextLink, options) {
2631
+ return this.client.sendOperationRequest({ provisioningServiceName, resourceGroupName, nextLink, options }, listValidSkusNextOperationSpec);
2632
+ }
2633
+ /**
2634
+ * ListKeysNext
2635
+ * @param provisioningServiceName The provisioning service name to get the shared access keys for.
2636
+ * @param resourceGroupName resource group name
2637
+ * @param nextLink The nextLink from the previous successful call to the ListKeys method.
2638
+ * @param options The options parameters.
2639
+ */
2640
+ _listKeysNext(provisioningServiceName, resourceGroupName, nextLink, options) {
2641
+ return this.client.sendOperationRequest({ provisioningServiceName, resourceGroupName, nextLink, options }, listKeysNextOperationSpec);
2642
+ }
2643
+ }
2644
+ // Operation Specifications
2645
+ const serializer$2 = coreClient.createSerializer(Mappers, /* isXml */ false);
2646
+ const getOperationSpec$1 = {
2647
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}",
2648
+ httpMethod: "GET",
2649
+ responses: {
2650
+ 200: {
2651
+ bodyMapper: ProvisioningServiceDescription
2652
+ },
2653
+ default: {
2654
+ bodyMapper: ErrorDetails
2655
+ }
2656
+ },
2657
+ queryParameters: [apiVersion],
2658
+ urlParameters: [
2659
+ $host,
2660
+ subscriptionId,
2661
+ resourceGroupName,
2662
+ provisioningServiceName
2663
+ ],
2664
+ headerParameters: [accept],
2665
+ serializer: serializer$2
2666
+ };
2667
+ const createOrUpdateOperationSpec$1 = {
2668
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}",
2669
+ httpMethod: "PUT",
2670
+ responses: {
2671
+ 200: {
2672
+ bodyMapper: ProvisioningServiceDescription
2673
+ },
2674
+ 201: {
2675
+ bodyMapper: ProvisioningServiceDescription
2676
+ },
2677
+ 202: {
2678
+ bodyMapper: ProvisioningServiceDescription
2679
+ },
2680
+ 204: {
2681
+ bodyMapper: ProvisioningServiceDescription
2682
+ },
2683
+ default: {
2684
+ bodyMapper: ErrorDetails
2685
+ }
2686
+ },
2687
+ requestBody: iotDpsDescription,
2688
+ queryParameters: [apiVersion],
2689
+ urlParameters: [
2690
+ $host,
2691
+ subscriptionId,
2692
+ resourceGroupName,
2693
+ provisioningServiceName
2694
+ ],
2695
+ headerParameters: [accept, contentType],
2696
+ mediaType: "json",
2697
+ serializer: serializer$2
2698
+ };
2699
+ const updateOperationSpec = {
2700
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}",
2701
+ httpMethod: "PATCH",
2702
+ responses: {
2703
+ 200: {
2704
+ bodyMapper: ProvisioningServiceDescription
2705
+ },
2706
+ 201: {
2707
+ bodyMapper: ProvisioningServiceDescription
2708
+ },
2709
+ 202: {
2710
+ bodyMapper: ProvisioningServiceDescription
2711
+ },
2712
+ 204: {
2713
+ bodyMapper: ProvisioningServiceDescription
2714
+ }
2715
+ },
2716
+ requestBody: provisioningServiceTags,
2717
+ queryParameters: [apiVersion],
2718
+ urlParameters: [
2719
+ $host,
2720
+ subscriptionId,
2721
+ resourceGroupName,
2722
+ provisioningServiceName
2723
+ ],
2724
+ headerParameters: [accept, contentType],
2725
+ mediaType: "json",
2726
+ serializer: serializer$2
2727
+ };
2728
+ const deleteOperationSpec$1 = {
2729
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}",
2730
+ httpMethod: "DELETE",
2731
+ responses: {
2732
+ 200: {},
2733
+ 201: {},
2734
+ 202: {},
2735
+ 204: {},
2736
+ default: {
2737
+ bodyMapper: ErrorDetails
2738
+ }
2739
+ },
2740
+ queryParameters: [apiVersion],
2741
+ urlParameters: [
2742
+ $host,
2743
+ subscriptionId,
2744
+ resourceGroupName,
2745
+ provisioningServiceName
2746
+ ],
2747
+ headerParameters: [accept],
2748
+ serializer: serializer$2
2749
+ };
2750
+ const listBySubscriptionOperationSpec = {
2751
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.Devices/provisioningServices",
2752
+ httpMethod: "GET",
2753
+ responses: {
2754
+ 200: {
2755
+ bodyMapper: ProvisioningServiceDescriptionListResult
2756
+ },
2757
+ default: {
2758
+ bodyMapper: ErrorDetails
2759
+ }
2760
+ },
2761
+ queryParameters: [apiVersion],
2762
+ urlParameters: [$host, subscriptionId],
2763
+ headerParameters: [accept],
2764
+ serializer: serializer$2
2765
+ };
2766
+ const listByResourceGroupOperationSpec = {
2767
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices",
2768
+ httpMethod: "GET",
2769
+ responses: {
2770
+ 200: {
2771
+ bodyMapper: ProvisioningServiceDescriptionListResult
2772
+ },
2773
+ default: {
2774
+ bodyMapper: ErrorDetails
2775
+ }
2776
+ },
2777
+ queryParameters: [apiVersion],
2778
+ urlParameters: [
2779
+ $host,
2780
+ subscriptionId,
2781
+ resourceGroupName
2782
+ ],
2783
+ headerParameters: [accept],
2784
+ serializer: serializer$2
2785
+ };
2786
+ const getOperationResultOperationSpec = {
2787
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/operationresults/{operationId}",
2788
+ httpMethod: "GET",
2789
+ responses: {
2790
+ 200: {
2791
+ bodyMapper: AsyncOperationResult
2792
+ },
2793
+ default: {
2794
+ bodyMapper: ErrorDetails
2795
+ }
2796
+ },
2797
+ queryParameters: [apiVersion, asyncinfo],
2798
+ urlParameters: [
2799
+ $host,
2800
+ subscriptionId,
2801
+ resourceGroupName,
2802
+ provisioningServiceName,
2803
+ operationId
2804
+ ],
2805
+ headerParameters: [accept],
2806
+ serializer: serializer$2
2807
+ };
2808
+ const listValidSkusOperationSpec = {
2809
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/skus",
2810
+ httpMethod: "GET",
2811
+ responses: {
2812
+ 200: {
2813
+ bodyMapper: IotDpsSkuDefinitionListResult
2814
+ },
2815
+ default: {
2816
+ bodyMapper: ErrorDetails
2817
+ }
2818
+ },
2819
+ queryParameters: [apiVersion],
2820
+ urlParameters: [
2821
+ $host,
2822
+ subscriptionId,
2823
+ resourceGroupName,
2824
+ provisioningServiceName
2825
+ ],
2826
+ headerParameters: [accept],
2827
+ serializer: serializer$2
2828
+ };
2829
+ const checkProvisioningServiceNameAvailabilityOperationSpec = {
2830
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.Devices/checkProvisioningServiceNameAvailability",
2831
+ httpMethod: "POST",
2832
+ responses: {
2833
+ 200: {
2834
+ bodyMapper: NameAvailabilityInfo
2835
+ },
2836
+ default: {
2837
+ bodyMapper: ErrorDetails
2838
+ }
2839
+ },
2840
+ requestBody: argumentsParam,
2841
+ queryParameters: [apiVersion],
2842
+ urlParameters: [$host, subscriptionId],
2843
+ headerParameters: [accept, contentType],
2844
+ mediaType: "json",
2845
+ serializer: serializer$2
2846
+ };
2847
+ const listKeysOperationSpec = {
2848
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/listkeys",
2849
+ httpMethod: "POST",
2850
+ responses: {
2851
+ 200: {
2852
+ bodyMapper: SharedAccessSignatureAuthorizationRuleListResult
2853
+ },
2854
+ default: {
2855
+ bodyMapper: ErrorDetails
2856
+ }
2857
+ },
2858
+ queryParameters: [apiVersion],
2859
+ urlParameters: [
2860
+ $host,
2861
+ subscriptionId,
2862
+ resourceGroupName,
2863
+ provisioningServiceName
2864
+ ],
2865
+ headerParameters: [accept],
2866
+ serializer: serializer$2
2867
+ };
2868
+ const listKeysForKeyNameOperationSpec = {
2869
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/keys/{keyName}/listkeys",
2870
+ httpMethod: "POST",
2871
+ responses: {
2872
+ 200: {
2873
+ bodyMapper: SharedAccessSignatureAuthorizationRuleAccessRightsDescription
2874
+ },
2875
+ default: {
2876
+ bodyMapper: ErrorDetails
2877
+ }
2878
+ },
2879
+ queryParameters: [apiVersion],
2880
+ urlParameters: [
2881
+ $host,
2882
+ subscriptionId,
2883
+ resourceGroupName,
2884
+ provisioningServiceName,
2885
+ keyName
2886
+ ],
2887
+ headerParameters: [accept],
2888
+ serializer: serializer$2
2889
+ };
2890
+ const listPrivateLinkResourcesOperationSpec = {
2891
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{resourceName}/privateLinkResources",
2892
+ httpMethod: "GET",
2893
+ responses: {
2894
+ 200: {
2895
+ bodyMapper: PrivateLinkResources
2896
+ },
2897
+ default: {
2898
+ bodyMapper: ErrorDetails
2899
+ }
2900
+ },
2901
+ queryParameters: [apiVersion],
2902
+ urlParameters: [
2903
+ $host,
2904
+ subscriptionId,
2905
+ resourceGroupName,
2906
+ resourceName
2907
+ ],
2908
+ headerParameters: [accept],
2909
+ serializer: serializer$2
2910
+ };
2911
+ const getPrivateLinkResourcesOperationSpec = {
2912
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{resourceName}/privateLinkResources/{groupId}",
2913
+ httpMethod: "GET",
2914
+ responses: {
2915
+ 200: {
2916
+ bodyMapper: GroupIdInformation
2917
+ },
2918
+ default: {
2919
+ bodyMapper: ErrorDetails
2920
+ }
2921
+ },
2922
+ queryParameters: [apiVersion],
2923
+ urlParameters: [
2924
+ $host,
2925
+ subscriptionId,
2926
+ resourceGroupName,
2927
+ resourceName,
2928
+ groupId
2929
+ ],
2930
+ headerParameters: [accept],
2931
+ serializer: serializer$2
2932
+ };
2933
+ const listPrivateEndpointConnectionsOperationSpec = {
2934
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{resourceName}/privateEndpointConnections",
2935
+ httpMethod: "GET",
2936
+ responses: {
2937
+ 200: {
2938
+ bodyMapper: {
2939
+ type: {
2940
+ name: "Sequence",
2941
+ element: {
2942
+ type: { name: "Composite", className: "PrivateEndpointConnection" }
2943
+ }
2944
+ }
2945
+ }
2946
+ },
2947
+ default: {
2948
+ bodyMapper: ErrorDetails
2949
+ }
2950
+ },
2951
+ queryParameters: [apiVersion],
2952
+ urlParameters: [
2953
+ $host,
2954
+ subscriptionId,
2955
+ resourceGroupName,
2956
+ resourceName
2957
+ ],
2958
+ headerParameters: [accept],
2959
+ serializer: serializer$2
2960
+ };
2961
+ const getPrivateEndpointConnectionOperationSpec = {
2962
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}",
2963
+ httpMethod: "GET",
2964
+ responses: {
2965
+ 200: {
2966
+ bodyMapper: PrivateEndpointConnection
2967
+ },
2968
+ default: {
2969
+ bodyMapper: ErrorDetails
2970
+ }
2971
+ },
2972
+ queryParameters: [apiVersion],
2973
+ urlParameters: [
2974
+ $host,
2975
+ subscriptionId,
2976
+ resourceGroupName,
2977
+ resourceName,
2978
+ privateEndpointConnectionName
2979
+ ],
2980
+ headerParameters: [accept],
2981
+ serializer: serializer$2
2982
+ };
2983
+ const createOrUpdatePrivateEndpointConnectionOperationSpec = {
2984
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}",
2985
+ httpMethod: "PUT",
2986
+ responses: {
2987
+ 200: {
2988
+ bodyMapper: PrivateEndpointConnection
2989
+ },
2990
+ 201: {
2991
+ bodyMapper: PrivateEndpointConnection
2992
+ },
2993
+ 202: {
2994
+ bodyMapper: PrivateEndpointConnection
2995
+ },
2996
+ 204: {
2997
+ bodyMapper: PrivateEndpointConnection
2998
+ },
2999
+ default: {
3000
+ bodyMapper: ErrorDetails
3001
+ }
3002
+ },
3003
+ requestBody: privateEndpointConnection,
3004
+ queryParameters: [apiVersion],
3005
+ urlParameters: [
3006
+ $host,
3007
+ subscriptionId,
3008
+ resourceGroupName,
3009
+ resourceName,
3010
+ privateEndpointConnectionName
3011
+ ],
3012
+ headerParameters: [accept, contentType],
3013
+ mediaType: "json",
3014
+ serializer: serializer$2
3015
+ };
3016
+ const deletePrivateEndpointConnectionOperationSpec = {
3017
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}",
3018
+ httpMethod: "DELETE",
3019
+ responses: {
3020
+ 200: {
3021
+ bodyMapper: PrivateEndpointConnection
3022
+ },
3023
+ 201: {
3024
+ bodyMapper: PrivateEndpointConnection
3025
+ },
3026
+ 202: {
3027
+ bodyMapper: PrivateEndpointConnection
3028
+ },
3029
+ 204: {
3030
+ bodyMapper: PrivateEndpointConnection
3031
+ },
3032
+ default: {
3033
+ bodyMapper: ErrorDetails
3034
+ }
3035
+ },
3036
+ queryParameters: [apiVersion],
3037
+ urlParameters: [
3038
+ $host,
3039
+ subscriptionId,
3040
+ resourceGroupName,
3041
+ resourceName,
3042
+ privateEndpointConnectionName
3043
+ ],
3044
+ headerParameters: [accept],
3045
+ serializer: serializer$2
3046
+ };
3047
+ const listBySubscriptionNextOperationSpec = {
3048
+ path: "{nextLink}",
3049
+ httpMethod: "GET",
3050
+ responses: {
3051
+ 200: {
3052
+ bodyMapper: ProvisioningServiceDescriptionListResult
3053
+ },
3054
+ default: {
3055
+ bodyMapper: ErrorDetails
3056
+ }
3057
+ },
3058
+ queryParameters: [apiVersion],
3059
+ urlParameters: [
3060
+ $host,
3061
+ nextLink,
3062
+ subscriptionId
3063
+ ],
3064
+ headerParameters: [accept],
3065
+ serializer: serializer$2
3066
+ };
3067
+ const listByResourceGroupNextOperationSpec = {
3068
+ path: "{nextLink}",
3069
+ httpMethod: "GET",
3070
+ responses: {
3071
+ 200: {
3072
+ bodyMapper: ProvisioningServiceDescriptionListResult
3073
+ },
3074
+ default: {
3075
+ bodyMapper: ErrorDetails
3076
+ }
3077
+ },
3078
+ queryParameters: [apiVersion],
3079
+ urlParameters: [
3080
+ $host,
3081
+ nextLink,
3082
+ subscriptionId,
3083
+ resourceGroupName
3084
+ ],
3085
+ headerParameters: [accept],
3086
+ serializer: serializer$2
3087
+ };
3088
+ const listValidSkusNextOperationSpec = {
3089
+ path: "{nextLink}",
3090
+ httpMethod: "GET",
3091
+ responses: {
3092
+ 200: {
3093
+ bodyMapper: IotDpsSkuDefinitionListResult
3094
+ },
3095
+ default: {
3096
+ bodyMapper: ErrorDetails
3097
+ }
3098
+ },
3099
+ queryParameters: [apiVersion],
3100
+ urlParameters: [
3101
+ $host,
3102
+ nextLink,
3103
+ subscriptionId,
3104
+ resourceGroupName,
3105
+ provisioningServiceName
3106
+ ],
3107
+ headerParameters: [accept],
3108
+ serializer: serializer$2
3109
+ };
3110
+ const listKeysNextOperationSpec = {
3111
+ path: "{nextLink}",
3112
+ httpMethod: "GET",
3113
+ responses: {
3114
+ 200: {
3115
+ bodyMapper: SharedAccessSignatureAuthorizationRuleListResult
3116
+ },
3117
+ default: {
3118
+ bodyMapper: ErrorDetails
3119
+ }
3120
+ },
3121
+ queryParameters: [apiVersion],
3122
+ urlParameters: [
3123
+ $host,
3124
+ nextLink,
3125
+ subscriptionId,
3126
+ resourceGroupName,
3127
+ provisioningServiceName
3128
+ ],
3129
+ headerParameters: [accept],
3130
+ serializer: serializer$2
3131
+ };
3132
+
3133
+ /*
3134
+ * Copyright (c) Microsoft Corporation.
3135
+ * Licensed under the MIT License.
3136
+ *
3137
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3138
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3139
+ */
3140
+ class IotDpsClient extends coreClient.ServiceClient {
3141
+ /**
3142
+ * Initializes a new instance of the IotDpsClient class.
3143
+ * @param credentials Subscription credentials which uniquely identify client subscription.
3144
+ * @param subscriptionId The subscription identifier.
3145
+ * @param options The parameter options
3146
+ */
3147
+ constructor(credentials, subscriptionId, options) {
3148
+ if (credentials === undefined) {
3149
+ throw new Error("'credentials' cannot be null");
3150
+ }
3151
+ if (subscriptionId === undefined) {
3152
+ throw new Error("'subscriptionId' cannot be null");
3153
+ }
3154
+ // Initializing default values for options
3155
+ if (!options) {
3156
+ options = {};
3157
+ }
3158
+ const defaults = {
3159
+ requestContentType: "application/json; charset=utf-8",
3160
+ credential: credentials
3161
+ };
3162
+ const packageDetails = `azsdk-js-arm-deviceprovisioningservices/4.1.0`;
3163
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
3164
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
3165
+ : `${packageDetails}`;
3166
+ if (!options.credentialScopes) {
3167
+ options.credentialScopes = ["https://management.azure.com/.default"];
3168
+ }
3169
+ const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
3170
+ userAgentPrefix
3171
+ }, baseUri: options.endpoint || "https://management.azure.com" });
3172
+ super(optionsWithDefaults);
3173
+ // Parameter assignments
3174
+ this.subscriptionId = subscriptionId;
3175
+ // Assigning values to Constant parameters
3176
+ this.$host = options.$host || "https://management.azure.com";
3177
+ this.apiVersion = options.apiVersion || "2021-10-15";
3178
+ this.operations = new OperationsImpl(this);
3179
+ this.dpsCertificate = new DpsCertificateImpl(this);
3180
+ this.iotDpsResource = new IotDpsResourceImpl(this);
3181
+ }
3182
+ }
3183
+
3184
+ exports.IotDpsClient = IotDpsClient;
3185
+ //# sourceMappingURL=index.js.map