@azure/arm-privatedns 2.1.1 → 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 (139) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/README.md +69 -83
  4. package/dist/index.js +2295 -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 +470 -0
  17. package/dist-esm/src/models/index.d.ts.map +1 -0
  18. package/dist-esm/src/models/index.js +24 -0
  19. package/dist-esm/src/models/index.js.map +1 -0
  20. package/dist-esm/src/models/mappers.d.ts +22 -0
  21. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  22. package/{esm → dist-esm/src}/models/mappers.js +234 -205
  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/{esm → dist-esm/src}/models/parameters.js +91 -77
  27. package/dist-esm/src/models/parameters.js.map +1 -0
  28. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  29. package/dist-esm/src/operations/index.d.ts.map +1 -0
  30. package/{esm → dist-esm/src}/operations/index.js +3 -5
  31. package/dist-esm/src/operations/index.js.map +1 -0
  32. package/dist-esm/src/operations/privateZones.d.ts +114 -0
  33. package/dist-esm/src/operations/privateZones.d.ts.map +1 -0
  34. package/dist-esm/src/operations/privateZones.js +516 -0
  35. package/dist-esm/src/operations/privateZones.js.map +1 -0
  36. package/dist-esm/src/operations/recordSets.d.ts +105 -0
  37. package/dist-esm/src/operations/recordSets.d.ts.map +1 -0
  38. package/dist-esm/src/operations/recordSets.js +451 -0
  39. package/dist-esm/src/operations/recordSets.js.map +1 -0
  40. package/dist-esm/src/operations/virtualNetworkLinks.d.ts +103 -0
  41. package/dist-esm/src/operations/virtualNetworkLinks.d.ts.map +1 -0
  42. package/dist-esm/src/operations/virtualNetworkLinks.js +442 -0
  43. package/dist-esm/src/operations/virtualNetworkLinks.js.map +1 -0
  44. package/dist-esm/src/operationsInterfaces/index.d.ts +4 -0
  45. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  46. package/dist-esm/src/operationsInterfaces/index.js +11 -0
  47. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  48. package/dist-esm/src/operationsInterfaces/privateZones.d.ts +78 -0
  49. package/dist-esm/src/operationsInterfaces/privateZones.d.ts.map +1 -0
  50. package/dist-esm/src/operationsInterfaces/privateZones.js +9 -0
  51. package/dist-esm/src/operationsInterfaces/privateZones.js.map +1 -0
  52. package/dist-esm/src/operationsInterfaces/recordSets.d.ts +61 -0
  53. package/dist-esm/src/operationsInterfaces/recordSets.d.ts.map +1 -0
  54. package/dist-esm/src/operationsInterfaces/recordSets.js +9 -0
  55. package/dist-esm/src/operationsInterfaces/recordSets.js.map +1 -0
  56. package/dist-esm/src/operationsInterfaces/virtualNetworkLinks.d.ts +78 -0
  57. package/dist-esm/src/operationsInterfaces/virtualNetworkLinks.d.ts.map +1 -0
  58. package/dist-esm/src/operationsInterfaces/virtualNetworkLinks.js +9 -0
  59. package/dist-esm/src/operationsInterfaces/virtualNetworkLinks.js.map +1 -0
  60. package/dist-esm/src/privateDnsManagementClient.d.ts +21 -0
  61. package/dist-esm/src/privateDnsManagementClient.d.ts.map +1 -0
  62. package/dist-esm/src/privateDnsManagementClient.js +54 -0
  63. package/dist-esm/src/privateDnsManagementClient.js.map +1 -0
  64. package/dist-esm/test/sampleTest.d.ts +2 -0
  65. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  66. package/dist-esm/test/sampleTest.js +40 -0
  67. package/dist-esm/test/sampleTest.js.map +1 -0
  68. package/package.json +83 -24
  69. package/review/arm-privatedns.api.md +435 -0
  70. package/rollup.config.js +181 -30
  71. package/src/index.ts +12 -0
  72. package/src/lroImpl.ts +34 -0
  73. package/src/models/index.ts +400 -956
  74. package/src/models/mappers.ts +248 -214
  75. package/src/models/parameters.ts +117 -78
  76. package/src/operations/index.ts +3 -5
  77. package/src/operations/privateZones.ts +521 -325
  78. package/src/operations/recordSets.ts +382 -348
  79. package/src/operations/virtualNetworkLinks.ts +475 -261
  80. package/src/operationsInterfaces/index.ts +11 -0
  81. package/src/operationsInterfaces/privateZones.ts +145 -0
  82. package/src/operationsInterfaces/recordSets.ts +117 -0
  83. package/src/operationsInterfaces/virtualNetworkLinks.ts +150 -0
  84. package/src/privateDnsManagementClient.ts +75 -40
  85. package/tsconfig.json +20 -7
  86. package/types/arm-privatedns.d.ts +768 -0
  87. package/types/tsdoc-metadata.json +11 -0
  88. package/dist/arm-privatedns.js +0 -1948
  89. package/dist/arm-privatedns.js.map +0 -1
  90. package/dist/arm-privatedns.min.js +0 -1
  91. package/dist/arm-privatedns.min.js.map +0 -1
  92. package/esm/models/index.d.ts +0 -1031
  93. package/esm/models/index.d.ts.map +0 -1
  94. package/esm/models/index.js +0 -8
  95. package/esm/models/index.js.map +0 -1
  96. package/esm/models/mappers.d.ts +0 -22
  97. package/esm/models/mappers.d.ts.map +0 -1
  98. package/esm/models/mappers.js.map +0 -1
  99. package/esm/models/parameters.d.ts +0 -15
  100. package/esm/models/parameters.d.ts.map +0 -1
  101. package/esm/models/parameters.js.map +0 -1
  102. package/esm/models/privateZonesMappers.d.ts +0 -2
  103. package/esm/models/privateZonesMappers.d.ts.map +0 -1
  104. package/esm/models/privateZonesMappers.js +0 -9
  105. package/esm/models/privateZonesMappers.js.map +0 -1
  106. package/esm/models/recordSetsMappers.d.ts +0 -2
  107. package/esm/models/recordSetsMappers.d.ts.map +0 -1
  108. package/esm/models/recordSetsMappers.js +0 -9
  109. package/esm/models/recordSetsMappers.js.map +0 -1
  110. package/esm/models/virtualNetworkLinksMappers.d.ts +0 -2
  111. package/esm/models/virtualNetworkLinksMappers.d.ts.map +0 -1
  112. package/esm/models/virtualNetworkLinksMappers.js +0 -9
  113. package/esm/models/virtualNetworkLinksMappers.js.map +0 -1
  114. package/esm/operations/index.d.ts.map +0 -1
  115. package/esm/operations/index.js.map +0 -1
  116. package/esm/operations/privateZones.d.ts +0 -165
  117. package/esm/operations/privateZones.d.ts.map +0 -1
  118. package/esm/operations/privateZones.js +0 -347
  119. package/esm/operations/privateZones.js.map +0 -1
  120. package/esm/operations/recordSets.d.ts +0 -229
  121. package/esm/operations/recordSets.d.ts.map +0 -1
  122. package/esm/operations/recordSets.js +0 -304
  123. package/esm/operations/recordSets.js.map +0 -1
  124. package/esm/operations/virtualNetworkLinks.d.ts +0 -139
  125. package/esm/operations/virtualNetworkLinks.d.ts.map +0 -1
  126. package/esm/operations/virtualNetworkLinks.js +0 -305
  127. package/esm/operations/virtualNetworkLinks.js.map +0 -1
  128. package/esm/privateDnsManagementClient.d.ts +0 -27
  129. package/esm/privateDnsManagementClient.d.ts.map +0 -1
  130. package/esm/privateDnsManagementClient.js +0 -41
  131. package/esm/privateDnsManagementClient.js.map +0 -1
  132. package/esm/privateDnsManagementClientContext.d.ts +0 -23
  133. package/esm/privateDnsManagementClientContext.d.ts.map +0 -1
  134. package/esm/privateDnsManagementClientContext.js +0 -62
  135. package/esm/privateDnsManagementClientContext.js.map +0 -1
  136. package/src/models/privateZonesMappers.ts +0 -28
  137. package/src/models/recordSetsMappers.ts +0 -28
  138. package/src/models/virtualNetworkLinksMappers.ts +0 -28
  139. package/src/privateDnsManagementClientContext.ts +0 -69
package/dist/index.js ADDED
@@ -0,0 +1,2295 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var coreClient = require('@azure/core-client');
6
+ var tslib = require('tslib');
7
+ var coreLro = require('@azure/core-lro');
8
+
9
+ /*
10
+ * Copyright (c) Microsoft Corporation.
11
+ * Licensed under the MIT License.
12
+ *
13
+ * Code generated by Microsoft (R) AutoRest Code Generator.
14
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
15
+ */
16
+ (function (KnownProvisioningState) {
17
+ KnownProvisioningState["Creating"] = "Creating";
18
+ KnownProvisioningState["Updating"] = "Updating";
19
+ KnownProvisioningState["Deleting"] = "Deleting";
20
+ KnownProvisioningState["Succeeded"] = "Succeeded";
21
+ KnownProvisioningState["Failed"] = "Failed";
22
+ KnownProvisioningState["Canceled"] = "Canceled";
23
+ })(exports.KnownProvisioningState || (exports.KnownProvisioningState = {}));
24
+ (function (KnownVirtualNetworkLinkState) {
25
+ KnownVirtualNetworkLinkState["InProgress"] = "InProgress";
26
+ KnownVirtualNetworkLinkState["Completed"] = "Completed";
27
+ })(exports.KnownVirtualNetworkLinkState || (exports.KnownVirtualNetworkLinkState = {}));
28
+
29
+ /*
30
+ * Copyright (c) Microsoft Corporation.
31
+ * Licensed under the MIT License.
32
+ *
33
+ * Code generated by Microsoft (R) AutoRest Code Generator.
34
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
35
+ */
36
+ const Resource = {
37
+ type: {
38
+ name: "Composite",
39
+ className: "Resource",
40
+ modelProperties: {
41
+ id: {
42
+ serializedName: "id",
43
+ readOnly: true,
44
+ type: {
45
+ name: "String"
46
+ }
47
+ },
48
+ name: {
49
+ serializedName: "name",
50
+ readOnly: true,
51
+ type: {
52
+ name: "String"
53
+ }
54
+ },
55
+ type: {
56
+ serializedName: "type",
57
+ readOnly: true,
58
+ type: {
59
+ name: "String"
60
+ }
61
+ }
62
+ }
63
+ }
64
+ };
65
+ const CloudError = {
66
+ type: {
67
+ name: "Composite",
68
+ className: "CloudError",
69
+ modelProperties: {
70
+ error: {
71
+ serializedName: "error",
72
+ type: {
73
+ name: "Composite",
74
+ className: "CloudErrorBody"
75
+ }
76
+ }
77
+ }
78
+ }
79
+ };
80
+ const CloudErrorBody = {
81
+ type: {
82
+ name: "Composite",
83
+ className: "CloudErrorBody",
84
+ modelProperties: {
85
+ code: {
86
+ serializedName: "code",
87
+ type: {
88
+ name: "String"
89
+ }
90
+ },
91
+ message: {
92
+ serializedName: "message",
93
+ type: {
94
+ name: "String"
95
+ }
96
+ },
97
+ target: {
98
+ serializedName: "target",
99
+ type: {
100
+ name: "String"
101
+ }
102
+ },
103
+ details: {
104
+ serializedName: "details",
105
+ type: {
106
+ name: "Sequence",
107
+ element: {
108
+ type: {
109
+ name: "Composite",
110
+ className: "CloudErrorBody"
111
+ }
112
+ }
113
+ }
114
+ }
115
+ }
116
+ }
117
+ };
118
+ const PrivateZoneListResult = {
119
+ type: {
120
+ name: "Composite",
121
+ className: "PrivateZoneListResult",
122
+ modelProperties: {
123
+ value: {
124
+ serializedName: "value",
125
+ type: {
126
+ name: "Sequence",
127
+ element: {
128
+ type: {
129
+ name: "Composite",
130
+ className: "PrivateZone"
131
+ }
132
+ }
133
+ }
134
+ },
135
+ nextLink: {
136
+ serializedName: "nextLink",
137
+ readOnly: true,
138
+ type: {
139
+ name: "String"
140
+ }
141
+ }
142
+ }
143
+ }
144
+ };
145
+ const SubResource = {
146
+ type: {
147
+ name: "Composite",
148
+ className: "SubResource",
149
+ modelProperties: {
150
+ id: {
151
+ serializedName: "id",
152
+ type: {
153
+ name: "String"
154
+ }
155
+ }
156
+ }
157
+ }
158
+ };
159
+ const VirtualNetworkLinkListResult = {
160
+ type: {
161
+ name: "Composite",
162
+ className: "VirtualNetworkLinkListResult",
163
+ modelProperties: {
164
+ value: {
165
+ serializedName: "value",
166
+ type: {
167
+ name: "Sequence",
168
+ element: {
169
+ type: {
170
+ name: "Composite",
171
+ className: "VirtualNetworkLink"
172
+ }
173
+ }
174
+ }
175
+ },
176
+ nextLink: {
177
+ serializedName: "nextLink",
178
+ readOnly: true,
179
+ type: {
180
+ name: "String"
181
+ }
182
+ }
183
+ }
184
+ }
185
+ };
186
+ const ARecord = {
187
+ type: {
188
+ name: "Composite",
189
+ className: "ARecord",
190
+ modelProperties: {
191
+ ipv4Address: {
192
+ serializedName: "ipv4Address",
193
+ type: {
194
+ name: "String"
195
+ }
196
+ }
197
+ }
198
+ }
199
+ };
200
+ const AaaaRecord = {
201
+ type: {
202
+ name: "Composite",
203
+ className: "AaaaRecord",
204
+ modelProperties: {
205
+ ipv6Address: {
206
+ serializedName: "ipv6Address",
207
+ type: {
208
+ name: "String"
209
+ }
210
+ }
211
+ }
212
+ }
213
+ };
214
+ const CnameRecord = {
215
+ type: {
216
+ name: "Composite",
217
+ className: "CnameRecord",
218
+ modelProperties: {
219
+ cname: {
220
+ serializedName: "cname",
221
+ type: {
222
+ name: "String"
223
+ }
224
+ }
225
+ }
226
+ }
227
+ };
228
+ const MxRecord = {
229
+ type: {
230
+ name: "Composite",
231
+ className: "MxRecord",
232
+ modelProperties: {
233
+ preference: {
234
+ serializedName: "preference",
235
+ type: {
236
+ name: "Number"
237
+ }
238
+ },
239
+ exchange: {
240
+ serializedName: "exchange",
241
+ type: {
242
+ name: "String"
243
+ }
244
+ }
245
+ }
246
+ }
247
+ };
248
+ const PtrRecord = {
249
+ type: {
250
+ name: "Composite",
251
+ className: "PtrRecord",
252
+ modelProperties: {
253
+ ptrdname: {
254
+ serializedName: "ptrdname",
255
+ type: {
256
+ name: "String"
257
+ }
258
+ }
259
+ }
260
+ }
261
+ };
262
+ const SoaRecord = {
263
+ type: {
264
+ name: "Composite",
265
+ className: "SoaRecord",
266
+ modelProperties: {
267
+ host: {
268
+ serializedName: "host",
269
+ type: {
270
+ name: "String"
271
+ }
272
+ },
273
+ email: {
274
+ serializedName: "email",
275
+ type: {
276
+ name: "String"
277
+ }
278
+ },
279
+ serialNumber: {
280
+ serializedName: "serialNumber",
281
+ type: {
282
+ name: "Number"
283
+ }
284
+ },
285
+ refreshTime: {
286
+ serializedName: "refreshTime",
287
+ type: {
288
+ name: "Number"
289
+ }
290
+ },
291
+ retryTime: {
292
+ serializedName: "retryTime",
293
+ type: {
294
+ name: "Number"
295
+ }
296
+ },
297
+ expireTime: {
298
+ serializedName: "expireTime",
299
+ type: {
300
+ name: "Number"
301
+ }
302
+ },
303
+ minimumTtl: {
304
+ serializedName: "minimumTtl",
305
+ type: {
306
+ name: "Number"
307
+ }
308
+ }
309
+ }
310
+ }
311
+ };
312
+ const SrvRecord = {
313
+ type: {
314
+ name: "Composite",
315
+ className: "SrvRecord",
316
+ modelProperties: {
317
+ priority: {
318
+ serializedName: "priority",
319
+ type: {
320
+ name: "Number"
321
+ }
322
+ },
323
+ weight: {
324
+ serializedName: "weight",
325
+ type: {
326
+ name: "Number"
327
+ }
328
+ },
329
+ port: {
330
+ serializedName: "port",
331
+ type: {
332
+ name: "Number"
333
+ }
334
+ },
335
+ target: {
336
+ serializedName: "target",
337
+ type: {
338
+ name: "String"
339
+ }
340
+ }
341
+ }
342
+ }
343
+ };
344
+ const TxtRecord = {
345
+ type: {
346
+ name: "Composite",
347
+ className: "TxtRecord",
348
+ modelProperties: {
349
+ value: {
350
+ serializedName: "value",
351
+ type: {
352
+ name: "Sequence",
353
+ element: {
354
+ type: {
355
+ name: "String"
356
+ }
357
+ }
358
+ }
359
+ }
360
+ }
361
+ }
362
+ };
363
+ const RecordSetListResult = {
364
+ type: {
365
+ name: "Composite",
366
+ className: "RecordSetListResult",
367
+ modelProperties: {
368
+ value: {
369
+ serializedName: "value",
370
+ type: {
371
+ name: "Sequence",
372
+ element: {
373
+ type: {
374
+ name: "Composite",
375
+ className: "RecordSet"
376
+ }
377
+ }
378
+ }
379
+ },
380
+ nextLink: {
381
+ serializedName: "nextLink",
382
+ readOnly: true,
383
+ type: {
384
+ name: "String"
385
+ }
386
+ }
387
+ }
388
+ }
389
+ };
390
+ const TrackedResource = {
391
+ type: {
392
+ name: "Composite",
393
+ className: "TrackedResource",
394
+ modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { tags: {
395
+ serializedName: "tags",
396
+ type: {
397
+ name: "Dictionary",
398
+ value: { type: { name: "String" } }
399
+ }
400
+ }, location: {
401
+ serializedName: "location",
402
+ type: {
403
+ name: "String"
404
+ }
405
+ } })
406
+ }
407
+ };
408
+ const ProxyResource = {
409
+ type: {
410
+ name: "Composite",
411
+ className: "ProxyResource",
412
+ modelProperties: Object.assign({}, Resource.type.modelProperties)
413
+ }
414
+ };
415
+ const PrivateZone = {
416
+ type: {
417
+ name: "Composite",
418
+ className: "PrivateZone",
419
+ modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { etag: {
420
+ serializedName: "etag",
421
+ type: {
422
+ name: "String"
423
+ }
424
+ }, maxNumberOfRecordSets: {
425
+ serializedName: "properties.maxNumberOfRecordSets",
426
+ readOnly: true,
427
+ type: {
428
+ name: "Number"
429
+ }
430
+ }, numberOfRecordSets: {
431
+ serializedName: "properties.numberOfRecordSets",
432
+ readOnly: true,
433
+ type: {
434
+ name: "Number"
435
+ }
436
+ }, maxNumberOfVirtualNetworkLinks: {
437
+ serializedName: "properties.maxNumberOfVirtualNetworkLinks",
438
+ readOnly: true,
439
+ type: {
440
+ name: "Number"
441
+ }
442
+ }, numberOfVirtualNetworkLinks: {
443
+ serializedName: "properties.numberOfVirtualNetworkLinks",
444
+ readOnly: true,
445
+ type: {
446
+ name: "Number"
447
+ }
448
+ }, maxNumberOfVirtualNetworkLinksWithRegistration: {
449
+ serializedName: "properties.maxNumberOfVirtualNetworkLinksWithRegistration",
450
+ readOnly: true,
451
+ type: {
452
+ name: "Number"
453
+ }
454
+ }, numberOfVirtualNetworkLinksWithRegistration: {
455
+ serializedName: "properties.numberOfVirtualNetworkLinksWithRegistration",
456
+ readOnly: true,
457
+ type: {
458
+ name: "Number"
459
+ }
460
+ }, provisioningState: {
461
+ serializedName: "properties.provisioningState",
462
+ readOnly: true,
463
+ type: {
464
+ name: "String"
465
+ }
466
+ }, internalId: {
467
+ serializedName: "properties.internalId",
468
+ readOnly: true,
469
+ type: {
470
+ name: "String"
471
+ }
472
+ } })
473
+ }
474
+ };
475
+ const VirtualNetworkLink = {
476
+ type: {
477
+ name: "Composite",
478
+ className: "VirtualNetworkLink",
479
+ modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { etag: {
480
+ serializedName: "etag",
481
+ type: {
482
+ name: "String"
483
+ }
484
+ }, virtualNetwork: {
485
+ serializedName: "properties.virtualNetwork",
486
+ type: {
487
+ name: "Composite",
488
+ className: "SubResource"
489
+ }
490
+ }, registrationEnabled: {
491
+ serializedName: "properties.registrationEnabled",
492
+ type: {
493
+ name: "Boolean"
494
+ }
495
+ }, virtualNetworkLinkState: {
496
+ serializedName: "properties.virtualNetworkLinkState",
497
+ readOnly: true,
498
+ type: {
499
+ name: "String"
500
+ }
501
+ }, provisioningState: {
502
+ serializedName: "properties.provisioningState",
503
+ readOnly: true,
504
+ type: {
505
+ name: "String"
506
+ }
507
+ } })
508
+ }
509
+ };
510
+ const RecordSet = {
511
+ type: {
512
+ name: "Composite",
513
+ className: "RecordSet",
514
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { etag: {
515
+ serializedName: "etag",
516
+ type: {
517
+ name: "String"
518
+ }
519
+ }, metadata: {
520
+ serializedName: "properties.metadata",
521
+ type: {
522
+ name: "Dictionary",
523
+ value: { type: { name: "String" } }
524
+ }
525
+ }, ttl: {
526
+ serializedName: "properties.ttl",
527
+ type: {
528
+ name: "Number"
529
+ }
530
+ }, fqdn: {
531
+ serializedName: "properties.fqdn",
532
+ readOnly: true,
533
+ type: {
534
+ name: "String"
535
+ }
536
+ }, isAutoRegistered: {
537
+ serializedName: "properties.isAutoRegistered",
538
+ readOnly: true,
539
+ type: {
540
+ name: "Boolean"
541
+ }
542
+ }, aRecords: {
543
+ serializedName: "properties.aRecords",
544
+ type: {
545
+ name: "Sequence",
546
+ element: {
547
+ type: {
548
+ name: "Composite",
549
+ className: "ARecord"
550
+ }
551
+ }
552
+ }
553
+ }, aaaaRecords: {
554
+ serializedName: "properties.aaaaRecords",
555
+ type: {
556
+ name: "Sequence",
557
+ element: {
558
+ type: {
559
+ name: "Composite",
560
+ className: "AaaaRecord"
561
+ }
562
+ }
563
+ }
564
+ }, cnameRecord: {
565
+ serializedName: "properties.cnameRecord",
566
+ type: {
567
+ name: "Composite",
568
+ className: "CnameRecord"
569
+ }
570
+ }, mxRecords: {
571
+ serializedName: "properties.mxRecords",
572
+ type: {
573
+ name: "Sequence",
574
+ element: {
575
+ type: {
576
+ name: "Composite",
577
+ className: "MxRecord"
578
+ }
579
+ }
580
+ }
581
+ }, ptrRecords: {
582
+ serializedName: "properties.ptrRecords",
583
+ type: {
584
+ name: "Sequence",
585
+ element: {
586
+ type: {
587
+ name: "Composite",
588
+ className: "PtrRecord"
589
+ }
590
+ }
591
+ }
592
+ }, soaRecord: {
593
+ serializedName: "properties.soaRecord",
594
+ type: {
595
+ name: "Composite",
596
+ className: "SoaRecord"
597
+ }
598
+ }, srvRecords: {
599
+ serializedName: "properties.srvRecords",
600
+ type: {
601
+ name: "Sequence",
602
+ element: {
603
+ type: {
604
+ name: "Composite",
605
+ className: "SrvRecord"
606
+ }
607
+ }
608
+ }
609
+ }, txtRecords: {
610
+ serializedName: "properties.txtRecords",
611
+ type: {
612
+ name: "Sequence",
613
+ element: {
614
+ type: {
615
+ name: "Composite",
616
+ className: "TxtRecord"
617
+ }
618
+ }
619
+ }
620
+ } })
621
+ }
622
+ };
623
+
624
+ var Mappers = /*#__PURE__*/Object.freeze({
625
+ __proto__: null,
626
+ Resource: Resource,
627
+ CloudError: CloudError,
628
+ CloudErrorBody: CloudErrorBody,
629
+ PrivateZoneListResult: PrivateZoneListResult,
630
+ SubResource: SubResource,
631
+ VirtualNetworkLinkListResult: VirtualNetworkLinkListResult,
632
+ ARecord: ARecord,
633
+ AaaaRecord: AaaaRecord,
634
+ CnameRecord: CnameRecord,
635
+ MxRecord: MxRecord,
636
+ PtrRecord: PtrRecord,
637
+ SoaRecord: SoaRecord,
638
+ SrvRecord: SrvRecord,
639
+ TxtRecord: TxtRecord,
640
+ RecordSetListResult: RecordSetListResult,
641
+ TrackedResource: TrackedResource,
642
+ ProxyResource: ProxyResource,
643
+ PrivateZone: PrivateZone,
644
+ VirtualNetworkLink: VirtualNetworkLink,
645
+ RecordSet: RecordSet
646
+ });
647
+
648
+ /*
649
+ * Copyright (c) Microsoft Corporation.
650
+ * Licensed under the MIT License.
651
+ *
652
+ * Code generated by Microsoft (R) AutoRest Code Generator.
653
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
654
+ */
655
+ const contentType = {
656
+ parameterPath: ["options", "contentType"],
657
+ mapper: {
658
+ defaultValue: "application/json",
659
+ isConstant: true,
660
+ serializedName: "Content-Type",
661
+ type: {
662
+ name: "String"
663
+ }
664
+ }
665
+ };
666
+ const parameters = {
667
+ parameterPath: "parameters",
668
+ mapper: PrivateZone
669
+ };
670
+ const accept = {
671
+ parameterPath: "accept",
672
+ mapper: {
673
+ defaultValue: "application/json",
674
+ isConstant: true,
675
+ serializedName: "Accept",
676
+ type: {
677
+ name: "String"
678
+ }
679
+ }
680
+ };
681
+ const $host = {
682
+ parameterPath: "$host",
683
+ mapper: {
684
+ serializedName: "$host",
685
+ required: true,
686
+ type: {
687
+ name: "String"
688
+ }
689
+ },
690
+ skipEncoding: true
691
+ };
692
+ const resourceGroupName = {
693
+ parameterPath: "resourceGroupName",
694
+ mapper: {
695
+ serializedName: "resourceGroupName",
696
+ required: true,
697
+ type: {
698
+ name: "String"
699
+ }
700
+ }
701
+ };
702
+ const privateZoneName = {
703
+ parameterPath: "privateZoneName",
704
+ mapper: {
705
+ serializedName: "privateZoneName",
706
+ required: true,
707
+ type: {
708
+ name: "String"
709
+ }
710
+ }
711
+ };
712
+ const ifMatch = {
713
+ parameterPath: ["options", "ifMatch"],
714
+ mapper: {
715
+ serializedName: "If-Match",
716
+ type: {
717
+ name: "String"
718
+ }
719
+ }
720
+ };
721
+ const ifNoneMatch = {
722
+ parameterPath: ["options", "ifNoneMatch"],
723
+ mapper: {
724
+ serializedName: "If-None-Match",
725
+ type: {
726
+ name: "String"
727
+ }
728
+ }
729
+ };
730
+ const apiVersion = {
731
+ parameterPath: "apiVersion",
732
+ mapper: {
733
+ defaultValue: "2020-06-01",
734
+ isConstant: true,
735
+ serializedName: "api-version",
736
+ type: {
737
+ name: "String"
738
+ }
739
+ }
740
+ };
741
+ const subscriptionId = {
742
+ parameterPath: "subscriptionId",
743
+ mapper: {
744
+ serializedName: "subscriptionId",
745
+ required: true,
746
+ type: {
747
+ name: "String"
748
+ }
749
+ }
750
+ };
751
+ const top = {
752
+ parameterPath: ["options", "top"],
753
+ mapper: {
754
+ serializedName: "$top",
755
+ type: {
756
+ name: "Number"
757
+ }
758
+ }
759
+ };
760
+ const nextLink = {
761
+ parameterPath: "nextLink",
762
+ mapper: {
763
+ serializedName: "nextLink",
764
+ required: true,
765
+ type: {
766
+ name: "String"
767
+ }
768
+ },
769
+ skipEncoding: true
770
+ };
771
+ const parameters1 = {
772
+ parameterPath: "parameters",
773
+ mapper: VirtualNetworkLink
774
+ };
775
+ const virtualNetworkLinkName = {
776
+ parameterPath: "virtualNetworkLinkName",
777
+ mapper: {
778
+ serializedName: "virtualNetworkLinkName",
779
+ required: true,
780
+ type: {
781
+ name: "String"
782
+ }
783
+ }
784
+ };
785
+ const parameters2 = {
786
+ parameterPath: "parameters",
787
+ mapper: RecordSet
788
+ };
789
+ const recordType = {
790
+ parameterPath: "recordType",
791
+ mapper: {
792
+ serializedName: "recordType",
793
+ required: true,
794
+ type: {
795
+ name: "Enum",
796
+ allowedValues: ["A", "AAAA", "CNAME", "MX", "PTR", "SOA", "SRV", "TXT"]
797
+ }
798
+ }
799
+ };
800
+ const relativeRecordSetName = {
801
+ parameterPath: "relativeRecordSetName",
802
+ mapper: {
803
+ serializedName: "relativeRecordSetName",
804
+ required: true,
805
+ type: {
806
+ name: "String"
807
+ }
808
+ },
809
+ skipEncoding: true
810
+ };
811
+ const recordsetnamesuffix = {
812
+ parameterPath: ["options", "recordsetnamesuffix"],
813
+ mapper: {
814
+ serializedName: "$recordsetnamesuffix",
815
+ type: {
816
+ name: "String"
817
+ }
818
+ }
819
+ };
820
+
821
+ /*
822
+ * Copyright (c) Microsoft Corporation.
823
+ * Licensed under the MIT License.
824
+ *
825
+ * Code generated by Microsoft (R) AutoRest Code Generator.
826
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
827
+ */
828
+ class LroImpl {
829
+ constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
830
+ this.sendOperationFn = sendOperationFn;
831
+ this.args = args;
832
+ this.spec = spec;
833
+ this.requestPath = requestPath;
834
+ this.requestMethod = requestMethod;
835
+ }
836
+ sendInitialRequest() {
837
+ return tslib.__awaiter(this, void 0, void 0, function* () {
838
+ return this.sendOperationFn(this.args, this.spec);
839
+ });
840
+ }
841
+ sendPollRequest(path) {
842
+ return tslib.__awaiter(this, void 0, void 0, function* () {
843
+ const _a = this.spec, restSpec = tslib.__rest(_a, ["requestBody"]);
844
+ return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
845
+ });
846
+ }
847
+ }
848
+
849
+ /*
850
+ * Copyright (c) Microsoft Corporation.
851
+ * Licensed under the MIT License.
852
+ *
853
+ * Code generated by Microsoft (R) AutoRest Code Generator.
854
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
855
+ */
856
+ /// <reference lib="esnext.asynciterable" />
857
+ /** Class containing PrivateZones operations. */
858
+ class PrivateZonesImpl {
859
+ /**
860
+ * Initialize a new instance of the class PrivateZones class.
861
+ * @param client Reference to the service client
862
+ */
863
+ constructor(client) {
864
+ this.client = client;
865
+ }
866
+ /**
867
+ * Lists the Private DNS zones in all resource groups in a subscription.
868
+ * @param options The options parameters.
869
+ */
870
+ list(options) {
871
+ const iter = this.listPagingAll(options);
872
+ return {
873
+ next() {
874
+ return iter.next();
875
+ },
876
+ [Symbol.asyncIterator]() {
877
+ return this;
878
+ },
879
+ byPage: () => {
880
+ return this.listPagingPage(options);
881
+ }
882
+ };
883
+ }
884
+ listPagingPage(options) {
885
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
886
+ let result = yield tslib.__await(this._list(options));
887
+ yield yield tslib.__await(result.value || []);
888
+ let continuationToken = result.nextLink;
889
+ while (continuationToken) {
890
+ result = yield tslib.__await(this._listNext(continuationToken, options));
891
+ continuationToken = result.nextLink;
892
+ yield yield tslib.__await(result.value || []);
893
+ }
894
+ });
895
+ }
896
+ listPagingAll(options) {
897
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
898
+ var e_1, _a;
899
+ try {
900
+ for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
901
+ const page = _c.value;
902
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
903
+ }
904
+ }
905
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
906
+ finally {
907
+ try {
908
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
909
+ }
910
+ finally { if (e_1) throw e_1.error; }
911
+ }
912
+ });
913
+ }
914
+ /**
915
+ * Lists the Private DNS zones within a resource group.
916
+ * @param resourceGroupName The name of the resource group.
917
+ * @param options The options parameters.
918
+ */
919
+ listByResourceGroup(resourceGroupName, options) {
920
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
921
+ return {
922
+ next() {
923
+ return iter.next();
924
+ },
925
+ [Symbol.asyncIterator]() {
926
+ return this;
927
+ },
928
+ byPage: () => {
929
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
930
+ }
931
+ };
932
+ }
933
+ listByResourceGroupPagingPage(resourceGroupName, options) {
934
+ return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
935
+ let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
936
+ yield yield tslib.__await(result.value || []);
937
+ let continuationToken = result.nextLink;
938
+ while (continuationToken) {
939
+ result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
940
+ continuationToken = result.nextLink;
941
+ yield yield tslib.__await(result.value || []);
942
+ }
943
+ });
944
+ }
945
+ listByResourceGroupPagingAll(resourceGroupName, options) {
946
+ return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
947
+ var e_2, _a;
948
+ try {
949
+ for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
950
+ const page = _c.value;
951
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
952
+ }
953
+ }
954
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
955
+ finally {
956
+ try {
957
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
958
+ }
959
+ finally { if (e_2) throw e_2.error; }
960
+ }
961
+ });
962
+ }
963
+ /**
964
+ * Creates or updates a Private DNS zone. Does not modify Links to virtual networks or DNS records
965
+ * within the zone.
966
+ * @param resourceGroupName The name of the resource group.
967
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
968
+ * @param parameters Parameters supplied to the CreateOrUpdate operation.
969
+ * @param options The options parameters.
970
+ */
971
+ beginCreateOrUpdate(resourceGroupName, privateZoneName, parameters, options) {
972
+ return tslib.__awaiter(this, void 0, void 0, function* () {
973
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
974
+ return this.client.sendOperationRequest(args, spec);
975
+ });
976
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
977
+ var _a;
978
+ let currentRawResponse = undefined;
979
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
980
+ const callback = (rawResponse, flatResponse) => {
981
+ currentRawResponse = rawResponse;
982
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
983
+ };
984
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
985
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
986
+ return {
987
+ flatResponse,
988
+ rawResponse: {
989
+ statusCode: currentRawResponse.status,
990
+ body: currentRawResponse.parsedBody,
991
+ headers: currentRawResponse.headers.toJSON()
992
+ }
993
+ };
994
+ });
995
+ const lro = new LroImpl(sendOperation, { resourceGroupName, privateZoneName, parameters, options }, createOrUpdateOperationSpec);
996
+ return new coreLro.LroEngine(lro, {
997
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
998
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
999
+ });
1000
+ });
1001
+ }
1002
+ /**
1003
+ * Creates or updates a Private DNS zone. Does not modify Links to virtual networks or DNS records
1004
+ * within the zone.
1005
+ * @param resourceGroupName The name of the resource group.
1006
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
1007
+ * @param parameters Parameters supplied to the CreateOrUpdate operation.
1008
+ * @param options The options parameters.
1009
+ */
1010
+ beginCreateOrUpdateAndWait(resourceGroupName, privateZoneName, parameters, options) {
1011
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1012
+ const poller = yield this.beginCreateOrUpdate(resourceGroupName, privateZoneName, parameters, options);
1013
+ return poller.pollUntilDone();
1014
+ });
1015
+ }
1016
+ /**
1017
+ * Updates a Private DNS zone. Does not modify virtual network links or DNS records within the zone.
1018
+ * @param resourceGroupName The name of the resource group.
1019
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
1020
+ * @param parameters Parameters supplied to the Update operation.
1021
+ * @param options The options parameters.
1022
+ */
1023
+ beginUpdate(resourceGroupName, privateZoneName, parameters, options) {
1024
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1025
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1026
+ return this.client.sendOperationRequest(args, spec);
1027
+ });
1028
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1029
+ var _a;
1030
+ let currentRawResponse = undefined;
1031
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1032
+ const callback = (rawResponse, flatResponse) => {
1033
+ currentRawResponse = rawResponse;
1034
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1035
+ };
1036
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1037
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
1038
+ return {
1039
+ flatResponse,
1040
+ rawResponse: {
1041
+ statusCode: currentRawResponse.status,
1042
+ body: currentRawResponse.parsedBody,
1043
+ headers: currentRawResponse.headers.toJSON()
1044
+ }
1045
+ };
1046
+ });
1047
+ const lro = new LroImpl(sendOperation, { resourceGroupName, privateZoneName, parameters, options }, updateOperationSpec);
1048
+ return new coreLro.LroEngine(lro, {
1049
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1050
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1051
+ });
1052
+ });
1053
+ }
1054
+ /**
1055
+ * Updates a Private DNS zone. Does not modify virtual network links or DNS records within the zone.
1056
+ * @param resourceGroupName The name of the resource group.
1057
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
1058
+ * @param parameters Parameters supplied to the Update operation.
1059
+ * @param options The options parameters.
1060
+ */
1061
+ beginUpdateAndWait(resourceGroupName, privateZoneName, parameters, options) {
1062
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1063
+ const poller = yield this.beginUpdate(resourceGroupName, privateZoneName, parameters, options);
1064
+ return poller.pollUntilDone();
1065
+ });
1066
+ }
1067
+ /**
1068
+ * Deletes a Private DNS zone. WARNING: All DNS records in the zone will also be deleted. This
1069
+ * operation cannot be undone. Private DNS zone cannot be deleted unless all virtual network links to
1070
+ * it are removed.
1071
+ * @param resourceGroupName The name of the resource group.
1072
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
1073
+ * @param options The options parameters.
1074
+ */
1075
+ beginDelete(resourceGroupName, privateZoneName, options) {
1076
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1077
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1078
+ return this.client.sendOperationRequest(args, spec);
1079
+ });
1080
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1081
+ var _a;
1082
+ let currentRawResponse = undefined;
1083
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1084
+ const callback = (rawResponse, flatResponse) => {
1085
+ currentRawResponse = rawResponse;
1086
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1087
+ };
1088
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1089
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
1090
+ return {
1091
+ flatResponse,
1092
+ rawResponse: {
1093
+ statusCode: currentRawResponse.status,
1094
+ body: currentRawResponse.parsedBody,
1095
+ headers: currentRawResponse.headers.toJSON()
1096
+ }
1097
+ };
1098
+ });
1099
+ const lro = new LroImpl(sendOperation, { resourceGroupName, privateZoneName, options }, deleteOperationSpec);
1100
+ return new coreLro.LroEngine(lro, {
1101
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1102
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1103
+ });
1104
+ });
1105
+ }
1106
+ /**
1107
+ * Deletes a Private DNS zone. WARNING: All DNS records in the zone will also be deleted. This
1108
+ * operation cannot be undone. Private DNS zone cannot be deleted unless all virtual network links to
1109
+ * it are removed.
1110
+ * @param resourceGroupName The name of the resource group.
1111
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
1112
+ * @param options The options parameters.
1113
+ */
1114
+ beginDeleteAndWait(resourceGroupName, privateZoneName, options) {
1115
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1116
+ const poller = yield this.beginDelete(resourceGroupName, privateZoneName, options);
1117
+ return poller.pollUntilDone();
1118
+ });
1119
+ }
1120
+ /**
1121
+ * Gets a Private DNS zone. Retrieves the zone properties, but not the virtual networks links or the
1122
+ * record sets within the zone.
1123
+ * @param resourceGroupName The name of the resource group.
1124
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
1125
+ * @param options The options parameters.
1126
+ */
1127
+ get(resourceGroupName, privateZoneName, options) {
1128
+ return this.client.sendOperationRequest({ resourceGroupName, privateZoneName, options }, getOperationSpec);
1129
+ }
1130
+ /**
1131
+ * Lists the Private DNS zones in all resource groups in a subscription.
1132
+ * @param options The options parameters.
1133
+ */
1134
+ _list(options) {
1135
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
1136
+ }
1137
+ /**
1138
+ * Lists the Private DNS zones within a resource group.
1139
+ * @param resourceGroupName The name of the resource group.
1140
+ * @param options The options parameters.
1141
+ */
1142
+ _listByResourceGroup(resourceGroupName, options) {
1143
+ return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
1144
+ }
1145
+ /**
1146
+ * ListNext
1147
+ * @param nextLink The nextLink from the previous successful call to the List method.
1148
+ * @param options The options parameters.
1149
+ */
1150
+ _listNext(nextLink, options) {
1151
+ return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
1152
+ }
1153
+ /**
1154
+ * ListByResourceGroupNext
1155
+ * @param resourceGroupName The name of the resource group.
1156
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
1157
+ * @param options The options parameters.
1158
+ */
1159
+ _listByResourceGroupNext(resourceGroupName, nextLink, options) {
1160
+ return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec);
1161
+ }
1162
+ }
1163
+ // Operation Specifications
1164
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
1165
+ const createOrUpdateOperationSpec = {
1166
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}",
1167
+ httpMethod: "PUT",
1168
+ responses: {
1169
+ 200: {
1170
+ bodyMapper: PrivateZone
1171
+ },
1172
+ 201: {
1173
+ bodyMapper: PrivateZone
1174
+ },
1175
+ 202: {
1176
+ bodyMapper: PrivateZone
1177
+ },
1178
+ 204: {
1179
+ bodyMapper: PrivateZone
1180
+ },
1181
+ default: {
1182
+ bodyMapper: CloudError
1183
+ }
1184
+ },
1185
+ requestBody: parameters,
1186
+ queryParameters: [apiVersion],
1187
+ urlParameters: [
1188
+ $host,
1189
+ resourceGroupName,
1190
+ privateZoneName,
1191
+ subscriptionId
1192
+ ],
1193
+ headerParameters: [
1194
+ contentType,
1195
+ accept,
1196
+ ifMatch,
1197
+ ifNoneMatch
1198
+ ],
1199
+ mediaType: "json",
1200
+ serializer
1201
+ };
1202
+ const updateOperationSpec = {
1203
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}",
1204
+ httpMethod: "PATCH",
1205
+ responses: {
1206
+ 200: {
1207
+ bodyMapper: PrivateZone
1208
+ },
1209
+ 201: {
1210
+ bodyMapper: PrivateZone
1211
+ },
1212
+ 202: {
1213
+ bodyMapper: PrivateZone
1214
+ },
1215
+ 204: {
1216
+ bodyMapper: PrivateZone
1217
+ },
1218
+ default: {
1219
+ bodyMapper: CloudError
1220
+ }
1221
+ },
1222
+ requestBody: parameters,
1223
+ queryParameters: [apiVersion],
1224
+ urlParameters: [
1225
+ $host,
1226
+ resourceGroupName,
1227
+ privateZoneName,
1228
+ subscriptionId
1229
+ ],
1230
+ headerParameters: [
1231
+ contentType,
1232
+ accept,
1233
+ ifMatch
1234
+ ],
1235
+ mediaType: "json",
1236
+ serializer
1237
+ };
1238
+ const deleteOperationSpec = {
1239
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}",
1240
+ httpMethod: "DELETE",
1241
+ responses: {
1242
+ 200: {},
1243
+ 201: {},
1244
+ 202: {},
1245
+ 204: {},
1246
+ default: {
1247
+ bodyMapper: CloudError
1248
+ }
1249
+ },
1250
+ queryParameters: [apiVersion],
1251
+ urlParameters: [
1252
+ $host,
1253
+ resourceGroupName,
1254
+ privateZoneName,
1255
+ subscriptionId
1256
+ ],
1257
+ headerParameters: [accept, ifMatch],
1258
+ serializer
1259
+ };
1260
+ const getOperationSpec = {
1261
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}",
1262
+ httpMethod: "GET",
1263
+ responses: {
1264
+ 200: {
1265
+ bodyMapper: PrivateZone
1266
+ },
1267
+ default: {
1268
+ bodyMapper: CloudError
1269
+ }
1270
+ },
1271
+ queryParameters: [apiVersion],
1272
+ urlParameters: [
1273
+ $host,
1274
+ resourceGroupName,
1275
+ privateZoneName,
1276
+ subscriptionId
1277
+ ],
1278
+ headerParameters: [accept],
1279
+ serializer
1280
+ };
1281
+ const listOperationSpec = {
1282
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateDnsZones",
1283
+ httpMethod: "GET",
1284
+ responses: {
1285
+ 200: {
1286
+ bodyMapper: PrivateZoneListResult
1287
+ },
1288
+ default: {
1289
+ bodyMapper: CloudError
1290
+ }
1291
+ },
1292
+ queryParameters: [apiVersion, top],
1293
+ urlParameters: [$host, subscriptionId],
1294
+ headerParameters: [accept],
1295
+ serializer
1296
+ };
1297
+ const listByResourceGroupOperationSpec = {
1298
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones",
1299
+ httpMethod: "GET",
1300
+ responses: {
1301
+ 200: {
1302
+ bodyMapper: PrivateZoneListResult
1303
+ },
1304
+ default: {
1305
+ bodyMapper: CloudError
1306
+ }
1307
+ },
1308
+ queryParameters: [apiVersion, top],
1309
+ urlParameters: [
1310
+ $host,
1311
+ resourceGroupName,
1312
+ subscriptionId
1313
+ ],
1314
+ headerParameters: [accept],
1315
+ serializer
1316
+ };
1317
+ const listNextOperationSpec = {
1318
+ path: "{nextLink}",
1319
+ httpMethod: "GET",
1320
+ responses: {
1321
+ 200: {
1322
+ bodyMapper: PrivateZoneListResult
1323
+ },
1324
+ default: {
1325
+ bodyMapper: CloudError
1326
+ }
1327
+ },
1328
+ queryParameters: [apiVersion, top],
1329
+ urlParameters: [
1330
+ $host,
1331
+ subscriptionId,
1332
+ nextLink
1333
+ ],
1334
+ headerParameters: [accept],
1335
+ serializer
1336
+ };
1337
+ const listByResourceGroupNextOperationSpec = {
1338
+ path: "{nextLink}",
1339
+ httpMethod: "GET",
1340
+ responses: {
1341
+ 200: {
1342
+ bodyMapper: PrivateZoneListResult
1343
+ },
1344
+ default: {
1345
+ bodyMapper: CloudError
1346
+ }
1347
+ },
1348
+ queryParameters: [apiVersion, top],
1349
+ urlParameters: [
1350
+ $host,
1351
+ resourceGroupName,
1352
+ subscriptionId,
1353
+ nextLink
1354
+ ],
1355
+ headerParameters: [accept],
1356
+ serializer
1357
+ };
1358
+
1359
+ /*
1360
+ * Copyright (c) Microsoft Corporation.
1361
+ * Licensed under the MIT License.
1362
+ *
1363
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1364
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1365
+ */
1366
+ /// <reference lib="esnext.asynciterable" />
1367
+ /** Class containing VirtualNetworkLinks operations. */
1368
+ class VirtualNetworkLinksImpl {
1369
+ /**
1370
+ * Initialize a new instance of the class VirtualNetworkLinks class.
1371
+ * @param client Reference to the service client
1372
+ */
1373
+ constructor(client) {
1374
+ this.client = client;
1375
+ }
1376
+ /**
1377
+ * Lists the virtual network links to the specified Private DNS zone.
1378
+ * @param resourceGroupName The name of the resource group.
1379
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
1380
+ * @param options The options parameters.
1381
+ */
1382
+ list(resourceGroupName, privateZoneName, options) {
1383
+ const iter = this.listPagingAll(resourceGroupName, privateZoneName, options);
1384
+ return {
1385
+ next() {
1386
+ return iter.next();
1387
+ },
1388
+ [Symbol.asyncIterator]() {
1389
+ return this;
1390
+ },
1391
+ byPage: () => {
1392
+ return this.listPagingPage(resourceGroupName, privateZoneName, options);
1393
+ }
1394
+ };
1395
+ }
1396
+ listPagingPage(resourceGroupName, privateZoneName, options) {
1397
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
1398
+ let result = yield tslib.__await(this._list(resourceGroupName, privateZoneName, options));
1399
+ yield yield tslib.__await(result.value || []);
1400
+ let continuationToken = result.nextLink;
1401
+ while (continuationToken) {
1402
+ result = yield tslib.__await(this._listNext(resourceGroupName, privateZoneName, continuationToken, options));
1403
+ continuationToken = result.nextLink;
1404
+ yield yield tslib.__await(result.value || []);
1405
+ }
1406
+ });
1407
+ }
1408
+ listPagingAll(resourceGroupName, privateZoneName, options) {
1409
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
1410
+ var e_1, _a;
1411
+ try {
1412
+ for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, privateZoneName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1413
+ const page = _c.value;
1414
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1415
+ }
1416
+ }
1417
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1418
+ finally {
1419
+ try {
1420
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1421
+ }
1422
+ finally { if (e_1) throw e_1.error; }
1423
+ }
1424
+ });
1425
+ }
1426
+ /**
1427
+ * Creates or updates a virtual network link to the specified Private DNS zone.
1428
+ * @param resourceGroupName The name of the resource group.
1429
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
1430
+ * @param virtualNetworkLinkName The name of the virtual network link.
1431
+ * @param parameters Parameters supplied to the CreateOrUpdate operation.
1432
+ * @param options The options parameters.
1433
+ */
1434
+ beginCreateOrUpdate(resourceGroupName, privateZoneName, virtualNetworkLinkName, parameters, options) {
1435
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1436
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1437
+ return this.client.sendOperationRequest(args, spec);
1438
+ });
1439
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1440
+ var _a;
1441
+ let currentRawResponse = undefined;
1442
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1443
+ const callback = (rawResponse, flatResponse) => {
1444
+ currentRawResponse = rawResponse;
1445
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1446
+ };
1447
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1448
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
1449
+ return {
1450
+ flatResponse,
1451
+ rawResponse: {
1452
+ statusCode: currentRawResponse.status,
1453
+ body: currentRawResponse.parsedBody,
1454
+ headers: currentRawResponse.headers.toJSON()
1455
+ }
1456
+ };
1457
+ });
1458
+ const lro = new LroImpl(sendOperation, {
1459
+ resourceGroupName,
1460
+ privateZoneName,
1461
+ virtualNetworkLinkName,
1462
+ parameters,
1463
+ options
1464
+ }, createOrUpdateOperationSpec$1);
1465
+ return new coreLro.LroEngine(lro, {
1466
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1467
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1468
+ });
1469
+ });
1470
+ }
1471
+ /**
1472
+ * Creates or updates a virtual network link to the specified Private DNS zone.
1473
+ * @param resourceGroupName The name of the resource group.
1474
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
1475
+ * @param virtualNetworkLinkName The name of the virtual network link.
1476
+ * @param parameters Parameters supplied to the CreateOrUpdate operation.
1477
+ * @param options The options parameters.
1478
+ */
1479
+ beginCreateOrUpdateAndWait(resourceGroupName, privateZoneName, virtualNetworkLinkName, parameters, options) {
1480
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1481
+ const poller = yield this.beginCreateOrUpdate(resourceGroupName, privateZoneName, virtualNetworkLinkName, parameters, options);
1482
+ return poller.pollUntilDone();
1483
+ });
1484
+ }
1485
+ /**
1486
+ * Updates a virtual network link to the specified Private DNS zone.
1487
+ * @param resourceGroupName The name of the resource group.
1488
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
1489
+ * @param virtualNetworkLinkName The name of the virtual network link.
1490
+ * @param parameters Parameters supplied to the Update operation.
1491
+ * @param options The options parameters.
1492
+ */
1493
+ beginUpdate(resourceGroupName, privateZoneName, virtualNetworkLinkName, parameters, options) {
1494
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1495
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1496
+ return this.client.sendOperationRequest(args, spec);
1497
+ });
1498
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1499
+ var _a;
1500
+ let currentRawResponse = undefined;
1501
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1502
+ const callback = (rawResponse, flatResponse) => {
1503
+ currentRawResponse = rawResponse;
1504
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1505
+ };
1506
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1507
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
1508
+ return {
1509
+ flatResponse,
1510
+ rawResponse: {
1511
+ statusCode: currentRawResponse.status,
1512
+ body: currentRawResponse.parsedBody,
1513
+ headers: currentRawResponse.headers.toJSON()
1514
+ }
1515
+ };
1516
+ });
1517
+ const lro = new LroImpl(sendOperation, {
1518
+ resourceGroupName,
1519
+ privateZoneName,
1520
+ virtualNetworkLinkName,
1521
+ parameters,
1522
+ options
1523
+ }, updateOperationSpec$1);
1524
+ return new coreLro.LroEngine(lro, {
1525
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1526
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1527
+ });
1528
+ });
1529
+ }
1530
+ /**
1531
+ * Updates a virtual network link to the specified Private DNS zone.
1532
+ * @param resourceGroupName The name of the resource group.
1533
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
1534
+ * @param virtualNetworkLinkName The name of the virtual network link.
1535
+ * @param parameters Parameters supplied to the Update operation.
1536
+ * @param options The options parameters.
1537
+ */
1538
+ beginUpdateAndWait(resourceGroupName, privateZoneName, virtualNetworkLinkName, parameters, options) {
1539
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1540
+ const poller = yield this.beginUpdate(resourceGroupName, privateZoneName, virtualNetworkLinkName, parameters, options);
1541
+ return poller.pollUntilDone();
1542
+ });
1543
+ }
1544
+ /**
1545
+ * Deletes a virtual network link to the specified Private DNS zone. WARNING: In case of a registration
1546
+ * virtual network, all auto-registered DNS records in the zone for the virtual network will also be
1547
+ * deleted. This operation cannot be undone.
1548
+ * @param resourceGroupName The name of the resource group.
1549
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
1550
+ * @param virtualNetworkLinkName The name of the virtual network link.
1551
+ * @param options The options parameters.
1552
+ */
1553
+ beginDelete(resourceGroupName, privateZoneName, virtualNetworkLinkName, options) {
1554
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1555
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1556
+ return this.client.sendOperationRequest(args, spec);
1557
+ });
1558
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1559
+ var _a;
1560
+ let currentRawResponse = undefined;
1561
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1562
+ const callback = (rawResponse, flatResponse) => {
1563
+ currentRawResponse = rawResponse;
1564
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1565
+ };
1566
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1567
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
1568
+ return {
1569
+ flatResponse,
1570
+ rawResponse: {
1571
+ statusCode: currentRawResponse.status,
1572
+ body: currentRawResponse.parsedBody,
1573
+ headers: currentRawResponse.headers.toJSON()
1574
+ }
1575
+ };
1576
+ });
1577
+ const lro = new LroImpl(sendOperation, { resourceGroupName, privateZoneName, virtualNetworkLinkName, options }, deleteOperationSpec$1);
1578
+ return new coreLro.LroEngine(lro, {
1579
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1580
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1581
+ });
1582
+ });
1583
+ }
1584
+ /**
1585
+ * Deletes a virtual network link to the specified Private DNS zone. WARNING: In case of a registration
1586
+ * virtual network, all auto-registered DNS records in the zone for the virtual network will also be
1587
+ * deleted. This operation cannot be undone.
1588
+ * @param resourceGroupName The name of the resource group.
1589
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
1590
+ * @param virtualNetworkLinkName The name of the virtual network link.
1591
+ * @param options The options parameters.
1592
+ */
1593
+ beginDeleteAndWait(resourceGroupName, privateZoneName, virtualNetworkLinkName, options) {
1594
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1595
+ const poller = yield this.beginDelete(resourceGroupName, privateZoneName, virtualNetworkLinkName, options);
1596
+ return poller.pollUntilDone();
1597
+ });
1598
+ }
1599
+ /**
1600
+ * Gets a virtual network link to the specified Private DNS zone.
1601
+ * @param resourceGroupName The name of the resource group.
1602
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
1603
+ * @param virtualNetworkLinkName The name of the virtual network link.
1604
+ * @param options The options parameters.
1605
+ */
1606
+ get(resourceGroupName, privateZoneName, virtualNetworkLinkName, options) {
1607
+ return this.client.sendOperationRequest({ resourceGroupName, privateZoneName, virtualNetworkLinkName, options }, getOperationSpec$1);
1608
+ }
1609
+ /**
1610
+ * Lists the virtual network links to the specified Private DNS zone.
1611
+ * @param resourceGroupName The name of the resource group.
1612
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
1613
+ * @param options The options parameters.
1614
+ */
1615
+ _list(resourceGroupName, privateZoneName, options) {
1616
+ return this.client.sendOperationRequest({ resourceGroupName, privateZoneName, options }, listOperationSpec$1);
1617
+ }
1618
+ /**
1619
+ * ListNext
1620
+ * @param resourceGroupName The name of the resource group.
1621
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
1622
+ * @param nextLink The nextLink from the previous successful call to the List method.
1623
+ * @param options The options parameters.
1624
+ */
1625
+ _listNext(resourceGroupName, privateZoneName, nextLink, options) {
1626
+ return this.client.sendOperationRequest({ resourceGroupName, privateZoneName, nextLink, options }, listNextOperationSpec$1);
1627
+ }
1628
+ }
1629
+ // Operation Specifications
1630
+ const serializer$1 = coreClient.createSerializer(Mappers, /* isXml */ false);
1631
+ const createOrUpdateOperationSpec$1 = {
1632
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/virtualNetworkLinks/{virtualNetworkLinkName}",
1633
+ httpMethod: "PUT",
1634
+ responses: {
1635
+ 200: {
1636
+ bodyMapper: VirtualNetworkLink
1637
+ },
1638
+ 201: {
1639
+ bodyMapper: VirtualNetworkLink
1640
+ },
1641
+ 202: {
1642
+ bodyMapper: VirtualNetworkLink
1643
+ },
1644
+ 204: {
1645
+ bodyMapper: VirtualNetworkLink
1646
+ },
1647
+ default: {
1648
+ bodyMapper: CloudError
1649
+ }
1650
+ },
1651
+ requestBody: parameters1,
1652
+ queryParameters: [apiVersion],
1653
+ urlParameters: [
1654
+ $host,
1655
+ resourceGroupName,
1656
+ privateZoneName,
1657
+ subscriptionId,
1658
+ virtualNetworkLinkName
1659
+ ],
1660
+ headerParameters: [
1661
+ contentType,
1662
+ accept,
1663
+ ifMatch,
1664
+ ifNoneMatch
1665
+ ],
1666
+ mediaType: "json",
1667
+ serializer: serializer$1
1668
+ };
1669
+ const updateOperationSpec$1 = {
1670
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/virtualNetworkLinks/{virtualNetworkLinkName}",
1671
+ httpMethod: "PATCH",
1672
+ responses: {
1673
+ 200: {
1674
+ bodyMapper: VirtualNetworkLink
1675
+ },
1676
+ 201: {
1677
+ bodyMapper: VirtualNetworkLink
1678
+ },
1679
+ 202: {
1680
+ bodyMapper: VirtualNetworkLink
1681
+ },
1682
+ 204: {
1683
+ bodyMapper: VirtualNetworkLink
1684
+ },
1685
+ default: {
1686
+ bodyMapper: CloudError
1687
+ }
1688
+ },
1689
+ requestBody: parameters1,
1690
+ queryParameters: [apiVersion],
1691
+ urlParameters: [
1692
+ $host,
1693
+ resourceGroupName,
1694
+ privateZoneName,
1695
+ subscriptionId,
1696
+ virtualNetworkLinkName
1697
+ ],
1698
+ headerParameters: [
1699
+ contentType,
1700
+ accept,
1701
+ ifMatch
1702
+ ],
1703
+ mediaType: "json",
1704
+ serializer: serializer$1
1705
+ };
1706
+ const deleteOperationSpec$1 = {
1707
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/virtualNetworkLinks/{virtualNetworkLinkName}",
1708
+ httpMethod: "DELETE",
1709
+ responses: {
1710
+ 200: {},
1711
+ 201: {},
1712
+ 202: {},
1713
+ 204: {},
1714
+ default: {
1715
+ bodyMapper: CloudError
1716
+ }
1717
+ },
1718
+ queryParameters: [apiVersion],
1719
+ urlParameters: [
1720
+ $host,
1721
+ resourceGroupName,
1722
+ privateZoneName,
1723
+ subscriptionId,
1724
+ virtualNetworkLinkName
1725
+ ],
1726
+ headerParameters: [accept, ifMatch],
1727
+ serializer: serializer$1
1728
+ };
1729
+ const getOperationSpec$1 = {
1730
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/virtualNetworkLinks/{virtualNetworkLinkName}",
1731
+ httpMethod: "GET",
1732
+ responses: {
1733
+ 200: {
1734
+ bodyMapper: VirtualNetworkLink
1735
+ },
1736
+ default: {
1737
+ bodyMapper: CloudError
1738
+ }
1739
+ },
1740
+ queryParameters: [apiVersion],
1741
+ urlParameters: [
1742
+ $host,
1743
+ resourceGroupName,
1744
+ privateZoneName,
1745
+ subscriptionId,
1746
+ virtualNetworkLinkName
1747
+ ],
1748
+ headerParameters: [accept],
1749
+ serializer: serializer$1
1750
+ };
1751
+ const listOperationSpec$1 = {
1752
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/virtualNetworkLinks",
1753
+ httpMethod: "GET",
1754
+ responses: {
1755
+ 200: {
1756
+ bodyMapper: VirtualNetworkLinkListResult
1757
+ },
1758
+ default: {
1759
+ bodyMapper: CloudError
1760
+ }
1761
+ },
1762
+ queryParameters: [apiVersion, top],
1763
+ urlParameters: [
1764
+ $host,
1765
+ resourceGroupName,
1766
+ privateZoneName,
1767
+ subscriptionId
1768
+ ],
1769
+ headerParameters: [accept],
1770
+ serializer: serializer$1
1771
+ };
1772
+ const listNextOperationSpec$1 = {
1773
+ path: "{nextLink}",
1774
+ httpMethod: "GET",
1775
+ responses: {
1776
+ 200: {
1777
+ bodyMapper: VirtualNetworkLinkListResult
1778
+ },
1779
+ default: {
1780
+ bodyMapper: CloudError
1781
+ }
1782
+ },
1783
+ queryParameters: [apiVersion, top],
1784
+ urlParameters: [
1785
+ $host,
1786
+ resourceGroupName,
1787
+ privateZoneName,
1788
+ subscriptionId,
1789
+ nextLink
1790
+ ],
1791
+ headerParameters: [accept],
1792
+ serializer: serializer$1
1793
+ };
1794
+
1795
+ /*
1796
+ * Copyright (c) Microsoft Corporation.
1797
+ * Licensed under the MIT License.
1798
+ *
1799
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1800
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1801
+ */
1802
+ /// <reference lib="esnext.asynciterable" />
1803
+ /** Class containing RecordSets operations. */
1804
+ class RecordSetsImpl {
1805
+ /**
1806
+ * Initialize a new instance of the class RecordSets class.
1807
+ * @param client Reference to the service client
1808
+ */
1809
+ constructor(client) {
1810
+ this.client = client;
1811
+ }
1812
+ /**
1813
+ * Lists the record sets of a specified type in a Private DNS zone.
1814
+ * @param resourceGroupName The name of the resource group.
1815
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
1816
+ * @param recordType The type of record sets to enumerate.
1817
+ * @param options The options parameters.
1818
+ */
1819
+ listByType(resourceGroupName, privateZoneName, recordType, options) {
1820
+ const iter = this.listByTypePagingAll(resourceGroupName, privateZoneName, recordType, options);
1821
+ return {
1822
+ next() {
1823
+ return iter.next();
1824
+ },
1825
+ [Symbol.asyncIterator]() {
1826
+ return this;
1827
+ },
1828
+ byPage: () => {
1829
+ return this.listByTypePagingPage(resourceGroupName, privateZoneName, recordType, options);
1830
+ }
1831
+ };
1832
+ }
1833
+ listByTypePagingPage(resourceGroupName, privateZoneName, recordType, options) {
1834
+ return tslib.__asyncGenerator(this, arguments, function* listByTypePagingPage_1() {
1835
+ let result = yield tslib.__await(this._listByType(resourceGroupName, privateZoneName, recordType, options));
1836
+ yield yield tslib.__await(result.value || []);
1837
+ let continuationToken = result.nextLink;
1838
+ while (continuationToken) {
1839
+ result = yield tslib.__await(this._listByTypeNext(resourceGroupName, privateZoneName, recordType, continuationToken, options));
1840
+ continuationToken = result.nextLink;
1841
+ yield yield tslib.__await(result.value || []);
1842
+ }
1843
+ });
1844
+ }
1845
+ listByTypePagingAll(resourceGroupName, privateZoneName, recordType, options) {
1846
+ return tslib.__asyncGenerator(this, arguments, function* listByTypePagingAll_1() {
1847
+ var e_1, _a;
1848
+ try {
1849
+ for (var _b = tslib.__asyncValues(this.listByTypePagingPage(resourceGroupName, privateZoneName, recordType, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1850
+ const page = _c.value;
1851
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1852
+ }
1853
+ }
1854
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1855
+ finally {
1856
+ try {
1857
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1858
+ }
1859
+ finally { if (e_1) throw e_1.error; }
1860
+ }
1861
+ });
1862
+ }
1863
+ /**
1864
+ * Lists all record sets in a Private DNS zone.
1865
+ * @param resourceGroupName The name of the resource group.
1866
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
1867
+ * @param options The options parameters.
1868
+ */
1869
+ list(resourceGroupName, privateZoneName, options) {
1870
+ const iter = this.listPagingAll(resourceGroupName, privateZoneName, options);
1871
+ return {
1872
+ next() {
1873
+ return iter.next();
1874
+ },
1875
+ [Symbol.asyncIterator]() {
1876
+ return this;
1877
+ },
1878
+ byPage: () => {
1879
+ return this.listPagingPage(resourceGroupName, privateZoneName, options);
1880
+ }
1881
+ };
1882
+ }
1883
+ listPagingPage(resourceGroupName, privateZoneName, options) {
1884
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
1885
+ let result = yield tslib.__await(this._list(resourceGroupName, privateZoneName, options));
1886
+ yield yield tslib.__await(result.value || []);
1887
+ let continuationToken = result.nextLink;
1888
+ while (continuationToken) {
1889
+ result = yield tslib.__await(this._listNext(resourceGroupName, privateZoneName, continuationToken, options));
1890
+ continuationToken = result.nextLink;
1891
+ yield yield tslib.__await(result.value || []);
1892
+ }
1893
+ });
1894
+ }
1895
+ listPagingAll(resourceGroupName, privateZoneName, options) {
1896
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
1897
+ var e_2, _a;
1898
+ try {
1899
+ for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, privateZoneName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1900
+ const page = _c.value;
1901
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1902
+ }
1903
+ }
1904
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
1905
+ finally {
1906
+ try {
1907
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1908
+ }
1909
+ finally { if (e_2) throw e_2.error; }
1910
+ }
1911
+ });
1912
+ }
1913
+ /**
1914
+ * Creates or updates a record set within a Private DNS zone.
1915
+ * @param resourceGroupName The name of the resource group.
1916
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
1917
+ * @param recordType The type of DNS record in this record set. Record sets of type SOA can be updated
1918
+ * but not created (they are created when the Private DNS zone is created).
1919
+ * @param relativeRecordSetName The name of the record set, relative to the name of the zone.
1920
+ * @param parameters Parameters supplied to the CreateOrUpdate operation.
1921
+ * @param options The options parameters.
1922
+ */
1923
+ createOrUpdate(resourceGroupName, privateZoneName, recordType, relativeRecordSetName, parameters, options) {
1924
+ return this.client.sendOperationRequest({
1925
+ resourceGroupName,
1926
+ privateZoneName,
1927
+ recordType,
1928
+ relativeRecordSetName,
1929
+ parameters,
1930
+ options
1931
+ }, createOrUpdateOperationSpec$2);
1932
+ }
1933
+ /**
1934
+ * Updates a record set within a Private DNS zone.
1935
+ * @param resourceGroupName The name of the resource group.
1936
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
1937
+ * @param recordType The type of DNS record in this record set.
1938
+ * @param relativeRecordSetName The name of the record set, relative to the name of the zone.
1939
+ * @param parameters Parameters supplied to the Update operation.
1940
+ * @param options The options parameters.
1941
+ */
1942
+ update(resourceGroupName, privateZoneName, recordType, relativeRecordSetName, parameters, options) {
1943
+ return this.client.sendOperationRequest({
1944
+ resourceGroupName,
1945
+ privateZoneName,
1946
+ recordType,
1947
+ relativeRecordSetName,
1948
+ parameters,
1949
+ options
1950
+ }, updateOperationSpec$2);
1951
+ }
1952
+ /**
1953
+ * Deletes a record set from a Private DNS zone. This operation cannot be undone.
1954
+ * @param resourceGroupName The name of the resource group.
1955
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
1956
+ * @param recordType The type of DNS record in this record set. Record sets of type SOA cannot be
1957
+ * deleted (they are deleted when the Private DNS zone is deleted).
1958
+ * @param relativeRecordSetName The name of the record set, relative to the name of the zone.
1959
+ * @param options The options parameters.
1960
+ */
1961
+ delete(resourceGroupName, privateZoneName, recordType, relativeRecordSetName, options) {
1962
+ return this.client.sendOperationRequest({
1963
+ resourceGroupName,
1964
+ privateZoneName,
1965
+ recordType,
1966
+ relativeRecordSetName,
1967
+ options
1968
+ }, deleteOperationSpec$2);
1969
+ }
1970
+ /**
1971
+ * Gets a record set.
1972
+ * @param resourceGroupName The name of the resource group.
1973
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
1974
+ * @param recordType The type of DNS record in this record set.
1975
+ * @param relativeRecordSetName The name of the record set, relative to the name of the zone.
1976
+ * @param options The options parameters.
1977
+ */
1978
+ get(resourceGroupName, privateZoneName, recordType, relativeRecordSetName, options) {
1979
+ return this.client.sendOperationRequest({
1980
+ resourceGroupName,
1981
+ privateZoneName,
1982
+ recordType,
1983
+ relativeRecordSetName,
1984
+ options
1985
+ }, getOperationSpec$2);
1986
+ }
1987
+ /**
1988
+ * Lists the record sets of a specified type in a Private DNS zone.
1989
+ * @param resourceGroupName The name of the resource group.
1990
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
1991
+ * @param recordType The type of record sets to enumerate.
1992
+ * @param options The options parameters.
1993
+ */
1994
+ _listByType(resourceGroupName, privateZoneName, recordType, options) {
1995
+ return this.client.sendOperationRequest({ resourceGroupName, privateZoneName, recordType, options }, listByTypeOperationSpec);
1996
+ }
1997
+ /**
1998
+ * Lists all record sets in a Private DNS zone.
1999
+ * @param resourceGroupName The name of the resource group.
2000
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
2001
+ * @param options The options parameters.
2002
+ */
2003
+ _list(resourceGroupName, privateZoneName, options) {
2004
+ return this.client.sendOperationRequest({ resourceGroupName, privateZoneName, options }, listOperationSpec$2);
2005
+ }
2006
+ /**
2007
+ * ListByTypeNext
2008
+ * @param resourceGroupName The name of the resource group.
2009
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
2010
+ * @param recordType The type of record sets to enumerate.
2011
+ * @param nextLink The nextLink from the previous successful call to the ListByType method.
2012
+ * @param options The options parameters.
2013
+ */
2014
+ _listByTypeNext(resourceGroupName, privateZoneName, recordType, nextLink, options) {
2015
+ return this.client.sendOperationRequest({ resourceGroupName, privateZoneName, recordType, nextLink, options }, listByTypeNextOperationSpec);
2016
+ }
2017
+ /**
2018
+ * ListNext
2019
+ * @param resourceGroupName The name of the resource group.
2020
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
2021
+ * @param nextLink The nextLink from the previous successful call to the List method.
2022
+ * @param options The options parameters.
2023
+ */
2024
+ _listNext(resourceGroupName, privateZoneName, nextLink, options) {
2025
+ return this.client.sendOperationRequest({ resourceGroupName, privateZoneName, nextLink, options }, listNextOperationSpec$2);
2026
+ }
2027
+ }
2028
+ // Operation Specifications
2029
+ const serializer$2 = coreClient.createSerializer(Mappers, /* isXml */ false);
2030
+ const createOrUpdateOperationSpec$2 = {
2031
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/{recordType}/{relativeRecordSetName}",
2032
+ httpMethod: "PUT",
2033
+ responses: {
2034
+ 200: {
2035
+ bodyMapper: RecordSet
2036
+ },
2037
+ 201: {
2038
+ bodyMapper: RecordSet
2039
+ },
2040
+ default: {
2041
+ bodyMapper: CloudError
2042
+ }
2043
+ },
2044
+ requestBody: parameters2,
2045
+ queryParameters: [apiVersion],
2046
+ urlParameters: [
2047
+ $host,
2048
+ resourceGroupName,
2049
+ privateZoneName,
2050
+ subscriptionId,
2051
+ recordType,
2052
+ relativeRecordSetName
2053
+ ],
2054
+ headerParameters: [
2055
+ contentType,
2056
+ accept,
2057
+ ifMatch,
2058
+ ifNoneMatch
2059
+ ],
2060
+ mediaType: "json",
2061
+ serializer: serializer$2
2062
+ };
2063
+ const updateOperationSpec$2 = {
2064
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/{recordType}/{relativeRecordSetName}",
2065
+ httpMethod: "PATCH",
2066
+ responses: {
2067
+ 200: {
2068
+ bodyMapper: RecordSet
2069
+ },
2070
+ default: {
2071
+ bodyMapper: CloudError
2072
+ }
2073
+ },
2074
+ requestBody: parameters2,
2075
+ queryParameters: [apiVersion],
2076
+ urlParameters: [
2077
+ $host,
2078
+ resourceGroupName,
2079
+ privateZoneName,
2080
+ subscriptionId,
2081
+ recordType,
2082
+ relativeRecordSetName
2083
+ ],
2084
+ headerParameters: [
2085
+ contentType,
2086
+ accept,
2087
+ ifMatch
2088
+ ],
2089
+ mediaType: "json",
2090
+ serializer: serializer$2
2091
+ };
2092
+ const deleteOperationSpec$2 = {
2093
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/{recordType}/{relativeRecordSetName}",
2094
+ httpMethod: "DELETE",
2095
+ responses: {
2096
+ 200: {},
2097
+ 204: {},
2098
+ default: {
2099
+ bodyMapper: CloudError
2100
+ }
2101
+ },
2102
+ queryParameters: [apiVersion],
2103
+ urlParameters: [
2104
+ $host,
2105
+ resourceGroupName,
2106
+ privateZoneName,
2107
+ subscriptionId,
2108
+ recordType,
2109
+ relativeRecordSetName
2110
+ ],
2111
+ headerParameters: [accept, ifMatch],
2112
+ serializer: serializer$2
2113
+ };
2114
+ const getOperationSpec$2 = {
2115
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/{recordType}/{relativeRecordSetName}",
2116
+ httpMethod: "GET",
2117
+ responses: {
2118
+ 200: {
2119
+ bodyMapper: RecordSet
2120
+ },
2121
+ default: {
2122
+ bodyMapper: CloudError
2123
+ }
2124
+ },
2125
+ queryParameters: [apiVersion],
2126
+ urlParameters: [
2127
+ $host,
2128
+ resourceGroupName,
2129
+ privateZoneName,
2130
+ subscriptionId,
2131
+ recordType,
2132
+ relativeRecordSetName
2133
+ ],
2134
+ headerParameters: [accept],
2135
+ serializer: serializer$2
2136
+ };
2137
+ const listByTypeOperationSpec = {
2138
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/{recordType}",
2139
+ httpMethod: "GET",
2140
+ responses: {
2141
+ 200: {
2142
+ bodyMapper: RecordSetListResult
2143
+ },
2144
+ default: {
2145
+ bodyMapper: CloudError
2146
+ }
2147
+ },
2148
+ queryParameters: [
2149
+ apiVersion,
2150
+ top,
2151
+ recordsetnamesuffix
2152
+ ],
2153
+ urlParameters: [
2154
+ $host,
2155
+ resourceGroupName,
2156
+ privateZoneName,
2157
+ subscriptionId,
2158
+ recordType
2159
+ ],
2160
+ headerParameters: [accept],
2161
+ serializer: serializer$2
2162
+ };
2163
+ const listOperationSpec$2 = {
2164
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/ALL",
2165
+ httpMethod: "GET",
2166
+ responses: {
2167
+ 200: {
2168
+ bodyMapper: RecordSetListResult
2169
+ },
2170
+ default: {
2171
+ bodyMapper: CloudError
2172
+ }
2173
+ },
2174
+ queryParameters: [
2175
+ apiVersion,
2176
+ top,
2177
+ recordsetnamesuffix
2178
+ ],
2179
+ urlParameters: [
2180
+ $host,
2181
+ resourceGroupName,
2182
+ privateZoneName,
2183
+ subscriptionId
2184
+ ],
2185
+ headerParameters: [accept],
2186
+ serializer: serializer$2
2187
+ };
2188
+ const listByTypeNextOperationSpec = {
2189
+ path: "{nextLink}",
2190
+ httpMethod: "GET",
2191
+ responses: {
2192
+ 200: {
2193
+ bodyMapper: RecordSetListResult
2194
+ },
2195
+ default: {
2196
+ bodyMapper: CloudError
2197
+ }
2198
+ },
2199
+ queryParameters: [
2200
+ apiVersion,
2201
+ top,
2202
+ recordsetnamesuffix
2203
+ ],
2204
+ urlParameters: [
2205
+ $host,
2206
+ resourceGroupName,
2207
+ privateZoneName,
2208
+ subscriptionId,
2209
+ nextLink,
2210
+ recordType
2211
+ ],
2212
+ headerParameters: [accept],
2213
+ serializer: serializer$2
2214
+ };
2215
+ const listNextOperationSpec$2 = {
2216
+ path: "{nextLink}",
2217
+ httpMethod: "GET",
2218
+ responses: {
2219
+ 200: {
2220
+ bodyMapper: RecordSetListResult
2221
+ },
2222
+ default: {
2223
+ bodyMapper: CloudError
2224
+ }
2225
+ },
2226
+ queryParameters: [
2227
+ apiVersion,
2228
+ top,
2229
+ recordsetnamesuffix
2230
+ ],
2231
+ urlParameters: [
2232
+ $host,
2233
+ resourceGroupName,
2234
+ privateZoneName,
2235
+ subscriptionId,
2236
+ nextLink
2237
+ ],
2238
+ headerParameters: [accept],
2239
+ serializer: serializer$2
2240
+ };
2241
+
2242
+ /*
2243
+ * Copyright (c) Microsoft Corporation.
2244
+ * Licensed under the MIT License.
2245
+ *
2246
+ * Code generated by Microsoft (R) AutoRest Code Generator.
2247
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2248
+ */
2249
+ class PrivateDnsManagementClient extends coreClient.ServiceClient {
2250
+ /**
2251
+ * Initializes a new instance of the PrivateDnsManagementClient class.
2252
+ * @param credentials Subscription credentials which uniquely identify client subscription.
2253
+ * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure
2254
+ * subscription. The subscription ID forms part of the URI for every service call.
2255
+ * @param options The parameter options
2256
+ */
2257
+ constructor(credentials, subscriptionId, options) {
2258
+ if (credentials === undefined) {
2259
+ throw new Error("'credentials' cannot be null");
2260
+ }
2261
+ if (subscriptionId === undefined) {
2262
+ throw new Error("'subscriptionId' cannot be null");
2263
+ }
2264
+ // Initializing default values for options
2265
+ if (!options) {
2266
+ options = {};
2267
+ }
2268
+ const defaults = {
2269
+ requestContentType: "application/json; charset=utf-8",
2270
+ credential: credentials
2271
+ };
2272
+ const packageDetails = `azsdk-js-arm-privatedns/3.0.0`;
2273
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
2274
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
2275
+ : `${packageDetails}`;
2276
+ if (!options.credentialScopes) {
2277
+ options.credentialScopes = ["https://management.azure.com/.default"];
2278
+ }
2279
+ const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
2280
+ userAgentPrefix
2281
+ }, baseUri: options.endpoint || "https://management.azure.com" });
2282
+ super(optionsWithDefaults);
2283
+ // Parameter assignments
2284
+ this.subscriptionId = subscriptionId;
2285
+ // Assigning values to Constant parameters
2286
+ this.$host = options.$host || "https://management.azure.com";
2287
+ this.apiVersion = options.apiVersion || "2020-06-01";
2288
+ this.privateZones = new PrivateZonesImpl(this);
2289
+ this.virtualNetworkLinks = new VirtualNetworkLinksImpl(this);
2290
+ this.recordSets = new RecordSetsImpl(this);
2291
+ }
2292
+ }
2293
+
2294
+ exports.PrivateDnsManagementClient = PrivateDnsManagementClient;
2295
+ //# sourceMappingURL=index.js.map