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