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