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