@azure/arm-domainservices 4.0.1-alpha.20220412.1 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. package/CHANGELOG.md +3 -7
  2. package/README.md +11 -0
  3. package/dist/index.js +138 -59
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist-esm/samples-dev/domainServiceOperationsListSample.d.ts +2 -0
  8. package/dist-esm/samples-dev/domainServiceOperationsListSample.d.ts.map +1 -0
  9. package/dist-esm/samples-dev/domainServiceOperationsListSample.js +43 -0
  10. package/dist-esm/samples-dev/domainServiceOperationsListSample.js.map +1 -0
  11. package/dist-esm/samples-dev/domainServicesCreateOrUpdateSample.d.ts +2 -0
  12. package/dist-esm/samples-dev/domainServicesCreateOrUpdateSample.d.ts.map +1 -0
  13. package/dist-esm/samples-dev/domainServicesCreateOrUpdateSample.js +57 -0
  14. package/dist-esm/samples-dev/domainServicesCreateOrUpdateSample.js.map +1 -0
  15. package/dist-esm/samples-dev/domainServicesDeleteSample.d.ts +2 -0
  16. package/dist-esm/samples-dev/domainServicesDeleteSample.d.ts.map +1 -0
  17. package/dist-esm/samples-dev/domainServicesDeleteSample.js +31 -0
  18. package/dist-esm/samples-dev/domainServicesDeleteSample.js.map +1 -0
  19. package/dist-esm/samples-dev/domainServicesGetSample.d.ts +2 -0
  20. package/dist-esm/samples-dev/domainServicesGetSample.d.ts.map +1 -0
  21. package/dist-esm/samples-dev/domainServicesGetSample.js +31 -0
  22. package/dist-esm/samples-dev/domainServicesGetSample.js.map +1 -0
  23. package/dist-esm/samples-dev/domainServicesListByResourceGroupSample.d.ts +2 -0
  24. package/dist-esm/samples-dev/domainServicesListByResourceGroupSample.d.ts.map +1 -0
  25. package/dist-esm/samples-dev/domainServicesListByResourceGroupSample.js +44 -0
  26. package/dist-esm/samples-dev/domainServicesListByResourceGroupSample.js.map +1 -0
  27. package/dist-esm/samples-dev/domainServicesListSample.d.ts +2 -0
  28. package/dist-esm/samples-dev/domainServicesListSample.d.ts.map +1 -0
  29. package/dist-esm/samples-dev/domainServicesListSample.js +43 -0
  30. package/dist-esm/samples-dev/domainServicesListSample.js.map +1 -0
  31. package/dist-esm/samples-dev/domainServicesUpdateSample.d.ts +2 -0
  32. package/dist-esm/samples-dev/domainServicesUpdateSample.d.ts.map +1 -0
  33. package/dist-esm/samples-dev/domainServicesUpdateSample.js +71 -0
  34. package/dist-esm/samples-dev/domainServicesUpdateSample.js.map +1 -0
  35. package/dist-esm/samples-dev/ouContainerCreateSample.d.ts +2 -0
  36. package/dist-esm/samples-dev/ouContainerCreateSample.d.ts.map +1 -0
  37. package/dist-esm/samples-dev/ouContainerCreateSample.js +37 -0
  38. package/dist-esm/samples-dev/ouContainerCreateSample.js.map +1 -0
  39. package/dist-esm/samples-dev/ouContainerDeleteSample.d.ts +2 -0
  40. package/dist-esm/samples-dev/ouContainerDeleteSample.d.ts.map +1 -0
  41. package/dist-esm/samples-dev/ouContainerDeleteSample.js +32 -0
  42. package/dist-esm/samples-dev/ouContainerDeleteSample.js.map +1 -0
  43. package/dist-esm/samples-dev/ouContainerGetSample.d.ts +2 -0
  44. package/dist-esm/samples-dev/ouContainerGetSample.d.ts.map +1 -0
  45. package/dist-esm/samples-dev/ouContainerGetSample.js +32 -0
  46. package/dist-esm/samples-dev/ouContainerGetSample.js.map +1 -0
  47. package/dist-esm/samples-dev/ouContainerListSample.d.ts +2 -0
  48. package/dist-esm/samples-dev/ouContainerListSample.d.ts.map +1 -0
  49. package/dist-esm/samples-dev/ouContainerListSample.js +45 -0
  50. package/dist-esm/samples-dev/ouContainerListSample.js.map +1 -0
  51. package/dist-esm/samples-dev/ouContainerOperationsListSample.d.ts +2 -0
  52. package/dist-esm/samples-dev/ouContainerOperationsListSample.d.ts.map +1 -0
  53. package/dist-esm/samples-dev/ouContainerOperationsListSample.js +43 -0
  54. package/dist-esm/samples-dev/ouContainerOperationsListSample.js.map +1 -0
  55. package/dist-esm/samples-dev/ouContainerUpdateSample.d.ts +2 -0
  56. package/dist-esm/samples-dev/ouContainerUpdateSample.d.ts.map +1 -0
  57. package/dist-esm/samples-dev/ouContainerUpdateSample.js +37 -0
  58. package/dist-esm/samples-dev/ouContainerUpdateSample.js.map +1 -0
  59. package/dist-esm/src/domainServicesResourceProvider.d.ts.map +1 -1
  60. package/dist-esm/src/domainServicesResourceProvider.js +20 -2
  61. package/dist-esm/src/domainServicesResourceProvider.js.map +1 -1
  62. package/dist-esm/src/operations/domainServices.d.ts.map +1 -1
  63. package/dist-esm/src/operations/domainServices.js +9 -3
  64. package/dist-esm/src/operations/domainServices.js.map +1 -1
  65. package/dist-esm/src/operations/ouContainerOperationGrp.d.ts.map +1 -1
  66. package/dist-esm/src/operations/ouContainerOperationGrp.js +9 -3
  67. package/dist-esm/src/operations/ouContainerOperationGrp.js.map +1 -1
  68. package/package.json +26 -10
  69. package/rollup.config.js +6 -72
  70. package/src/domainServicesResourceProvider.ts +27 -2
  71. package/src/operations/domainServices.ts +9 -3
  72. package/src/operations/ouContainerOperationGrp.ts +9 -3
  73. package/tsconfig.json +19 -5
  74. package/types/tsdoc-metadata.json +1 -1
  75. package/LICENSE.txt +0 -21
package/CHANGELOG.md CHANGED
@@ -1,14 +1,10 @@
1
1
  # Release History
2
2
 
3
- ## 4.0.1 (Unreleased)
3
+ ## 4.0.1 (2022-04-18)
4
4
 
5
- ### Features Added
5
+ **features**
6
6
 
7
- ### Breaking Changes
8
-
9
- ### Bugs Fixed
10
-
11
- ### Other Changes
7
+ - Bug fix
12
8
 
13
9
  ## 4.0.0 (2022-01-13)
14
10
 
package/README.md CHANGED
@@ -16,6 +16,8 @@ The AAD Domain Services API.
16
16
  - [LTS versions of Node.js](https://nodejs.org/about/releases/)
17
17
  - Latest versions of Safari, Chrome, Edge and Firefox.
18
18
 
19
+ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
20
+
19
21
  ### Prerequisites
20
22
 
21
23
  - An [Azure subscription][azure_sub].
@@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this
49
51
  ```javascript
50
52
  const { DomainServicesResourceProvider } = require("@azure/arm-domainservices");
51
53
  const { DefaultAzureCredential } = require("@azure/identity");
54
+ // For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
55
+
52
56
  const subscriptionId = "00000000-0000-0000-0000-000000000000";
53
57
  const client = new DomainServicesResourceProvider(new DefaultAzureCredential(), subscriptionId);
58
+
59
+ // For client-side applications running in the browser, use this code instead:
60
+ // const credential = new InteractiveBrowserCredential({
61
+ // tenantId: "<YOUR_TENANT_ID>",
62
+ // clientId: "<YOUR_CLIENT_ID>"
63
+ // });
64
+ // const client = new DomainServicesResourceProvider(credential, subscriptionId);
54
65
  ```
55
66
 
56
67
 
package/dist/index.js CHANGED
@@ -3,9 +3,31 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var coreClient = require('@azure/core-client');
6
+ var coreRestPipeline = require('@azure/core-rest-pipeline');
6
7
  var tslib = require('tslib');
7
8
  var coreLro = require('@azure/core-lro');
8
9
 
10
+ function _interopNamespace(e) {
11
+ if (e && e.__esModule) return e;
12
+ var n = Object.create(null);
13
+ if (e) {
14
+ Object.keys(e).forEach(function (k) {
15
+ if (k !== 'default') {
16
+ var d = Object.getOwnPropertyDescriptor(e, k);
17
+ Object.defineProperty(n, k, d.get ? d : {
18
+ enumerable: true,
19
+ get: function () { return e[k]; }
20
+ });
21
+ }
22
+ });
23
+ }
24
+ n["default"] = e;
25
+ return Object.freeze(n);
26
+ }
27
+
28
+ var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
29
+ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
30
+
9
31
  /*
10
32
  * Copyright (c) Microsoft Corporation.
11
33
  * Licensed under the MIT License.
@@ -13,54 +35,80 @@ var coreLro = require('@azure/core-lro');
13
35
  * Code generated by Microsoft (R) AutoRest Code Generator.
14
36
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
15
37
  */
38
+ /** Known values of {@link Ldaps} that the service accepts. */
39
+ exports.KnownLdaps = void 0;
16
40
  (function (KnownLdaps) {
17
41
  KnownLdaps["Enabled"] = "Enabled";
18
42
  KnownLdaps["Disabled"] = "Disabled";
19
43
  })(exports.KnownLdaps || (exports.KnownLdaps = {}));
44
+ /** Known values of {@link ExternalAccess} that the service accepts. */
45
+ exports.KnownExternalAccess = void 0;
20
46
  (function (KnownExternalAccess) {
21
47
  KnownExternalAccess["Enabled"] = "Enabled";
22
48
  KnownExternalAccess["Disabled"] = "Disabled";
23
49
  })(exports.KnownExternalAccess || (exports.KnownExternalAccess = {}));
50
+ /** Known values of {@link NtlmV1} that the service accepts. */
51
+ exports.KnownNtlmV1 = void 0;
24
52
  (function (KnownNtlmV1) {
25
53
  KnownNtlmV1["Enabled"] = "Enabled";
26
54
  KnownNtlmV1["Disabled"] = "Disabled";
27
55
  })(exports.KnownNtlmV1 || (exports.KnownNtlmV1 = {}));
56
+ /** Known values of {@link TlsV1} that the service accepts. */
57
+ exports.KnownTlsV1 = void 0;
28
58
  (function (KnownTlsV1) {
29
59
  KnownTlsV1["Enabled"] = "Enabled";
30
60
  KnownTlsV1["Disabled"] = "Disabled";
31
61
  })(exports.KnownTlsV1 || (exports.KnownTlsV1 = {}));
62
+ /** Known values of {@link SyncNtlmPasswords} that the service accepts. */
63
+ exports.KnownSyncNtlmPasswords = void 0;
32
64
  (function (KnownSyncNtlmPasswords) {
33
65
  KnownSyncNtlmPasswords["Enabled"] = "Enabled";
34
66
  KnownSyncNtlmPasswords["Disabled"] = "Disabled";
35
67
  })(exports.KnownSyncNtlmPasswords || (exports.KnownSyncNtlmPasswords = {}));
68
+ /** Known values of {@link SyncKerberosPasswords} that the service accepts. */
69
+ exports.KnownSyncKerberosPasswords = void 0;
36
70
  (function (KnownSyncKerberosPasswords) {
37
71
  KnownSyncKerberosPasswords["Enabled"] = "Enabled";
38
72
  KnownSyncKerberosPasswords["Disabled"] = "Disabled";
39
73
  })(exports.KnownSyncKerberosPasswords || (exports.KnownSyncKerberosPasswords = {}));
74
+ /** Known values of {@link SyncOnPremPasswords} that the service accepts. */
75
+ exports.KnownSyncOnPremPasswords = void 0;
40
76
  (function (KnownSyncOnPremPasswords) {
41
77
  KnownSyncOnPremPasswords["Enabled"] = "Enabled";
42
78
  KnownSyncOnPremPasswords["Disabled"] = "Disabled";
43
79
  })(exports.KnownSyncOnPremPasswords || (exports.KnownSyncOnPremPasswords = {}));
80
+ /** Known values of {@link KerberosRc4Encryption} that the service accepts. */
81
+ exports.KnownKerberosRc4Encryption = void 0;
44
82
  (function (KnownKerberosRc4Encryption) {
45
83
  KnownKerberosRc4Encryption["Enabled"] = "Enabled";
46
84
  KnownKerberosRc4Encryption["Disabled"] = "Disabled";
47
85
  })(exports.KnownKerberosRc4Encryption || (exports.KnownKerberosRc4Encryption = {}));
86
+ /** Known values of {@link KerberosArmoring} that the service accepts. */
87
+ exports.KnownKerberosArmoring = void 0;
48
88
  (function (KnownKerberosArmoring) {
49
89
  KnownKerberosArmoring["Enabled"] = "Enabled";
50
90
  KnownKerberosArmoring["Disabled"] = "Disabled";
51
91
  })(exports.KnownKerberosArmoring || (exports.KnownKerberosArmoring = {}));
92
+ /** Known values of {@link FilteredSync} that the service accepts. */
93
+ exports.KnownFilteredSync = void 0;
52
94
  (function (KnownFilteredSync) {
53
95
  KnownFilteredSync["Enabled"] = "Enabled";
54
96
  KnownFilteredSync["Disabled"] = "Disabled";
55
97
  })(exports.KnownFilteredSync || (exports.KnownFilteredSync = {}));
98
+ /** Known values of {@link NotifyGlobalAdmins} that the service accepts. */
99
+ exports.KnownNotifyGlobalAdmins = void 0;
56
100
  (function (KnownNotifyGlobalAdmins) {
57
101
  KnownNotifyGlobalAdmins["Enabled"] = "Enabled";
58
102
  KnownNotifyGlobalAdmins["Disabled"] = "Disabled";
59
103
  })(exports.KnownNotifyGlobalAdmins || (exports.KnownNotifyGlobalAdmins = {}));
104
+ /** Known values of {@link NotifyDcAdmins} that the service accepts. */
105
+ exports.KnownNotifyDcAdmins = void 0;
60
106
  (function (KnownNotifyDcAdmins) {
61
107
  KnownNotifyDcAdmins["Enabled"] = "Enabled";
62
108
  KnownNotifyDcAdmins["Disabled"] = "Disabled";
63
109
  })(exports.KnownNotifyDcAdmins || (exports.KnownNotifyDcAdmins = {}));
110
+ /** Known values of {@link Status} that the service accepts. */
111
+ exports.KnownStatus = void 0;
64
112
  (function (KnownStatus) {
65
113
  KnownStatus["None"] = "None";
66
114
  KnownStatus["Running"] = "Running";
@@ -69,6 +117,8 @@ var coreLro = require('@azure/core-lro');
69
117
  KnownStatus["Warning"] = "Warning";
70
118
  KnownStatus["Skipped"] = "Skipped";
71
119
  })(exports.KnownStatus || (exports.KnownStatus = {}));
120
+ /** Known values of {@link CreatedByType} that the service accepts. */
121
+ exports.KnownCreatedByType = void 0;
72
122
  (function (KnownCreatedByType) {
73
123
  KnownCreatedByType["User"] = "User";
74
124
  KnownCreatedByType["Application"] = "Application";
@@ -1306,7 +1356,7 @@ class DomainServiceOperationsImpl {
1306
1356
  * @param options The options parameters.
1307
1357
  */
1308
1358
  _list(options) {
1309
- return this.client.sendOperationRequest({ options }, listOperationSpec);
1359
+ return this.client.sendOperationRequest({ options }, listOperationSpec$3);
1310
1360
  }
1311
1361
  /**
1312
1362
  * ListNext
@@ -1314,12 +1364,12 @@ class DomainServiceOperationsImpl {
1314
1364
  * @param options The options parameters.
1315
1365
  */
1316
1366
  _listNext(nextLink, options) {
1317
- return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
1367
+ return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$3);
1318
1368
  }
1319
1369
  }
1320
1370
  // Operation Specifications
1321
- const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
1322
- const listOperationSpec = {
1371
+ const serializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1372
+ const listOperationSpec$3 = {
1323
1373
  path: "/providers/Microsoft.AAD/operations",
1324
1374
  httpMethod: "GET",
1325
1375
  responses: {
@@ -1333,9 +1383,9 @@ const listOperationSpec = {
1333
1383
  queryParameters: [apiVersion],
1334
1384
  urlParameters: [$host],
1335
1385
  headerParameters: [accept],
1336
- serializer
1386
+ serializer: serializer$3
1337
1387
  };
1338
- const listNextOperationSpec = {
1388
+ const listNextOperationSpec$3 = {
1339
1389
  path: "{nextLink}",
1340
1390
  httpMethod: "GET",
1341
1391
  responses: {
@@ -1349,7 +1399,7 @@ const listNextOperationSpec = {
1349
1399
  queryParameters: [apiVersion],
1350
1400
  urlParameters: [$host, nextLink],
1351
1401
  headerParameters: [accept],
1352
- serializer
1402
+ serializer: serializer$3
1353
1403
  };
1354
1404
 
1355
1405
  /*
@@ -1503,7 +1553,7 @@ class DomainServicesImpl {
1503
1553
  * @param options The options parameters.
1504
1554
  */
1505
1555
  _list(options) {
1506
- return this.client.sendOperationRequest({ options }, listOperationSpec$1);
1556
+ return this.client.sendOperationRequest({ options }, listOperationSpec$2);
1507
1557
  }
1508
1558
  /**
1509
1559
  * The List Domain Services in Resource Group operation lists all the domain services available under
@@ -1550,10 +1600,12 @@ class DomainServicesImpl {
1550
1600
  };
1551
1601
  });
1552
1602
  const lro = new LroImpl(sendOperation, { resourceGroupName, domainServiceName, domainService, options }, createOrUpdateOperationSpec);
1553
- return new coreLro.LroEngine(lro, {
1603
+ const poller = new coreLro.LroEngine(lro, {
1554
1604
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1555
1605
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1556
1606
  });
1607
+ yield poller.poll();
1608
+ return poller;
1557
1609
  });
1558
1610
  }
1559
1611
  /**
@@ -1580,7 +1632,7 @@ class DomainServicesImpl {
1580
1632
  * @param options The options parameters.
1581
1633
  */
1582
1634
  get(resourceGroupName, domainServiceName, options) {
1583
- return this.client.sendOperationRequest({ resourceGroupName, domainServiceName, options }, getOperationSpec);
1635
+ return this.client.sendOperationRequest({ resourceGroupName, domainServiceName, options }, getOperationSpec$1);
1584
1636
  }
1585
1637
  /**
1586
1638
  * The Delete Domain Service operation deletes an existing Domain Service.
@@ -1613,11 +1665,13 @@ class DomainServicesImpl {
1613
1665
  }
1614
1666
  };
1615
1667
  });
1616
- const lro = new LroImpl(sendOperation, { resourceGroupName, domainServiceName, options }, deleteOperationSpec);
1617
- return new coreLro.LroEngine(lro, {
1668
+ const lro = new LroImpl(sendOperation, { resourceGroupName, domainServiceName, options }, deleteOperationSpec$1);
1669
+ const poller = new coreLro.LroEngine(lro, {
1618
1670
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1619
1671
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1620
1672
  });
1673
+ yield poller.poll();
1674
+ return poller;
1621
1675
  });
1622
1676
  }
1623
1677
  /**
@@ -1666,11 +1720,13 @@ class DomainServicesImpl {
1666
1720
  }
1667
1721
  };
1668
1722
  });
1669
- const lro = new LroImpl(sendOperation, { resourceGroupName, domainServiceName, domainService, options }, updateOperationSpec);
1670
- return new coreLro.LroEngine(lro, {
1723
+ const lro = new LroImpl(sendOperation, { resourceGroupName, domainServiceName, domainService, options }, updateOperationSpec$1);
1724
+ const poller = new coreLro.LroEngine(lro, {
1671
1725
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1672
1726
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1673
1727
  });
1728
+ yield poller.poll();
1729
+ return poller;
1674
1730
  });
1675
1731
  }
1676
1732
  /**
@@ -1694,7 +1750,7 @@ class DomainServicesImpl {
1694
1750
  * @param options The options parameters.
1695
1751
  */
1696
1752
  _listNext(nextLink, options) {
1697
- return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$1);
1753
+ return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$2);
1698
1754
  }
1699
1755
  /**
1700
1756
  * ListByResourceGroupNext
@@ -1708,8 +1764,8 @@ class DomainServicesImpl {
1708
1764
  }
1709
1765
  }
1710
1766
  // Operation Specifications
1711
- const serializer$1 = coreClient.createSerializer(Mappers, /* isXml */ false);
1712
- const listOperationSpec$1 = {
1767
+ const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1768
+ const listOperationSpec$2 = {
1713
1769
  path: "/subscriptions/{subscriptionId}/providers/Microsoft.AAD/domainServices",
1714
1770
  httpMethod: "GET",
1715
1771
  responses: {
@@ -1723,7 +1779,7 @@ const listOperationSpec$1 = {
1723
1779
  queryParameters: [apiVersion],
1724
1780
  urlParameters: [$host, subscriptionId],
1725
1781
  headerParameters: [accept],
1726
- serializer: serializer$1
1782
+ serializer: serializer$2
1727
1783
  };
1728
1784
  const listByResourceGroupOperationSpec = {
1729
1785
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AAD/domainServices",
@@ -1743,7 +1799,7 @@ const listByResourceGroupOperationSpec = {
1743
1799
  resourceGroupName
1744
1800
  ],
1745
1801
  headerParameters: [accept],
1746
- serializer: serializer$1
1802
+ serializer: serializer$2
1747
1803
  };
1748
1804
  const createOrUpdateOperationSpec = {
1749
1805
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AAD/domainServices/{domainServiceName}",
@@ -1775,9 +1831,9 @@ const createOrUpdateOperationSpec = {
1775
1831
  ],
1776
1832
  headerParameters: [accept, contentType],
1777
1833
  mediaType: "json",
1778
- serializer: serializer$1
1834
+ serializer: serializer$2
1779
1835
  };
1780
- const getOperationSpec = {
1836
+ const getOperationSpec$1 = {
1781
1837
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AAD/domainServices/{domainServiceName}",
1782
1838
  httpMethod: "GET",
1783
1839
  responses: {
@@ -1796,9 +1852,9 @@ const getOperationSpec = {
1796
1852
  domainServiceName
1797
1853
  ],
1798
1854
  headerParameters: [accept],
1799
- serializer: serializer$1
1855
+ serializer: serializer$2
1800
1856
  };
1801
- const deleteOperationSpec = {
1857
+ const deleteOperationSpec$1 = {
1802
1858
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AAD/domainServices/{domainServiceName}",
1803
1859
  httpMethod: "DELETE",
1804
1860
  responses: {
@@ -1818,9 +1874,9 @@ const deleteOperationSpec = {
1818
1874
  domainServiceName
1819
1875
  ],
1820
1876
  headerParameters: [accept],
1821
- serializer: serializer$1
1877
+ serializer: serializer$2
1822
1878
  };
1823
- const updateOperationSpec = {
1879
+ const updateOperationSpec$1 = {
1824
1880
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AAD/domainServices/{domainServiceName}",
1825
1881
  httpMethod: "PATCH",
1826
1882
  responses: {
@@ -1850,9 +1906,9 @@ const updateOperationSpec = {
1850
1906
  ],
1851
1907
  headerParameters: [accept, contentType],
1852
1908
  mediaType: "json",
1853
- serializer: serializer$1
1909
+ serializer: serializer$2
1854
1910
  };
1855
- const listNextOperationSpec$1 = {
1911
+ const listNextOperationSpec$2 = {
1856
1912
  path: "{nextLink}",
1857
1913
  httpMethod: "GET",
1858
1914
  responses: {
@@ -1870,7 +1926,7 @@ const listNextOperationSpec$1 = {
1870
1926
  subscriptionId
1871
1927
  ],
1872
1928
  headerParameters: [accept],
1873
- serializer: serializer$1
1929
+ serializer: serializer$2
1874
1930
  };
1875
1931
  const listByResourceGroupNextOperationSpec = {
1876
1932
  path: "{nextLink}",
@@ -1891,7 +1947,7 @@ const listByResourceGroupNextOperationSpec = {
1891
1947
  resourceGroupName
1892
1948
  ],
1893
1949
  headerParameters: [accept],
1894
- serializer: serializer$1
1950
+ serializer: serializer$2
1895
1951
  };
1896
1952
 
1897
1953
  /*
@@ -1964,7 +2020,7 @@ class OuContainerOperationsImpl {
1964
2020
  * @param options The options parameters.
1965
2021
  */
1966
2022
  _list(options) {
1967
- return this.client.sendOperationRequest({ options }, listOperationSpec$2);
2023
+ return this.client.sendOperationRequest({ options }, listOperationSpec$1);
1968
2024
  }
1969
2025
  /**
1970
2026
  * ListNext
@@ -1972,12 +2028,12 @@ class OuContainerOperationsImpl {
1972
2028
  * @param options The options parameters.
1973
2029
  */
1974
2030
  _listNext(nextLink, options) {
1975
- return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$2);
2031
+ return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$1);
1976
2032
  }
1977
2033
  }
1978
2034
  // Operation Specifications
1979
- const serializer$2 = coreClient.createSerializer(Mappers, /* isXml */ false);
1980
- const listOperationSpec$2 = {
2035
+ const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2036
+ const listOperationSpec$1 = {
1981
2037
  path: "/providers/Microsoft.Aad/operations",
1982
2038
  httpMethod: "GET",
1983
2039
  responses: {
@@ -1991,9 +2047,9 @@ const listOperationSpec$2 = {
1991
2047
  queryParameters: [apiVersion],
1992
2048
  urlParameters: [$host],
1993
2049
  headerParameters: [accept],
1994
- serializer: serializer$2
2050
+ serializer: serializer$1
1995
2051
  };
1996
- const listNextOperationSpec$2 = {
2052
+ const listNextOperationSpec$1 = {
1997
2053
  path: "{nextLink}",
1998
2054
  httpMethod: "GET",
1999
2055
  responses: {
@@ -2007,7 +2063,7 @@ const listNextOperationSpec$2 = {
2007
2063
  queryParameters: [apiVersion],
2008
2064
  urlParameters: [$host, nextLink],
2009
2065
  headerParameters: [accept],
2010
- serializer: serializer$2
2066
+ serializer: serializer$1
2011
2067
  };
2012
2068
 
2013
2069
  /*
@@ -2086,7 +2142,7 @@ class OuContainerOperationGrpImpl {
2086
2142
  * @param options The options parameters.
2087
2143
  */
2088
2144
  _list(resourceGroupName, domainServiceName, options) {
2089
- return this.client.sendOperationRequest({ resourceGroupName, domainServiceName, options }, listOperationSpec$3);
2145
+ return this.client.sendOperationRequest({ resourceGroupName, domainServiceName, options }, listOperationSpec);
2090
2146
  }
2091
2147
  /**
2092
2148
  * Get OuContainer in DomainService instance.
@@ -2097,7 +2153,7 @@ class OuContainerOperationGrpImpl {
2097
2153
  * @param options The options parameters.
2098
2154
  */
2099
2155
  get(resourceGroupName, domainServiceName, ouContainerName, options) {
2100
- return this.client.sendOperationRequest({ resourceGroupName, domainServiceName, ouContainerName, options }, getOperationSpec$1);
2156
+ return this.client.sendOperationRequest({ resourceGroupName, domainServiceName, ouContainerName, options }, getOperationSpec);
2101
2157
  }
2102
2158
  /**
2103
2159
  * The Create OuContainer operation creates a new OuContainer under the specified Domain Service
@@ -2140,10 +2196,12 @@ class OuContainerOperationGrpImpl {
2140
2196
  containerAccount,
2141
2197
  options
2142
2198
  }, createOperationSpec);
2143
- return new coreLro.LroEngine(lro, {
2199
+ const poller = new coreLro.LroEngine(lro, {
2144
2200
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2145
2201
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2146
2202
  });
2203
+ yield poller.poll();
2204
+ return poller;
2147
2205
  });
2148
2206
  }
2149
2207
  /**
@@ -2194,11 +2252,13 @@ class OuContainerOperationGrpImpl {
2194
2252
  }
2195
2253
  };
2196
2254
  });
2197
- const lro = new LroImpl(sendOperation, { resourceGroupName, domainServiceName, ouContainerName, options }, deleteOperationSpec$1);
2198
- return new coreLro.LroEngine(lro, {
2255
+ const lro = new LroImpl(sendOperation, { resourceGroupName, domainServiceName, ouContainerName, options }, deleteOperationSpec);
2256
+ const poller = new coreLro.LroEngine(lro, {
2199
2257
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2200
2258
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2201
2259
  });
2260
+ yield poller.poll();
2261
+ return poller;
2202
2262
  });
2203
2263
  }
2204
2264
  /**
@@ -2254,11 +2314,13 @@ class OuContainerOperationGrpImpl {
2254
2314
  ouContainerName,
2255
2315
  containerAccount,
2256
2316
  options
2257
- }, updateOperationSpec$1);
2258
- return new coreLro.LroEngine(lro, {
2317
+ }, updateOperationSpec);
2318
+ const poller = new coreLro.LroEngine(lro, {
2259
2319
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2260
2320
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2261
2321
  });
2322
+ yield poller.poll();
2323
+ return poller;
2262
2324
  });
2263
2325
  }
2264
2326
  /**
@@ -2285,12 +2347,12 @@ class OuContainerOperationGrpImpl {
2285
2347
  * @param options The options parameters.
2286
2348
  */
2287
2349
  _listNext(resourceGroupName, domainServiceName, nextLink, options) {
2288
- return this.client.sendOperationRequest({ resourceGroupName, domainServiceName, nextLink, options }, listNextOperationSpec$3);
2350
+ return this.client.sendOperationRequest({ resourceGroupName, domainServiceName, nextLink, options }, listNextOperationSpec);
2289
2351
  }
2290
2352
  }
2291
2353
  // Operation Specifications
2292
- const serializer$3 = coreClient.createSerializer(Mappers, /* isXml */ false);
2293
- const listOperationSpec$3 = {
2354
+ const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2355
+ const listOperationSpec = {
2294
2356
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Aad/domainServices/{domainServiceName}/ouContainer",
2295
2357
  httpMethod: "GET",
2296
2358
  responses: {
@@ -2309,9 +2371,9 @@ const listOperationSpec$3 = {
2309
2371
  domainServiceName
2310
2372
  ],
2311
2373
  headerParameters: [accept],
2312
- serializer: serializer$3
2374
+ serializer
2313
2375
  };
2314
- const getOperationSpec$1 = {
2376
+ const getOperationSpec = {
2315
2377
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Aad/domainServices/{domainServiceName}/ouContainer/{ouContainerName}",
2316
2378
  httpMethod: "GET",
2317
2379
  responses: {
@@ -2331,7 +2393,7 @@ const getOperationSpec$1 = {
2331
2393
  ouContainerName
2332
2394
  ],
2333
2395
  headerParameters: [accept],
2334
- serializer: serializer$3
2396
+ serializer
2335
2397
  };
2336
2398
  const createOperationSpec = {
2337
2399
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Aad/domainServices/{domainServiceName}/ouContainer/{ouContainerName}",
@@ -2364,9 +2426,9 @@ const createOperationSpec = {
2364
2426
  ],
2365
2427
  headerParameters: [accept, contentType],
2366
2428
  mediaType: "json",
2367
- serializer: serializer$3
2429
+ serializer
2368
2430
  };
2369
- const deleteOperationSpec$1 = {
2431
+ const deleteOperationSpec = {
2370
2432
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Aad/domainServices/{domainServiceName}/ouContainer/{ouContainerName}",
2371
2433
  httpMethod: "DELETE",
2372
2434
  responses: {
@@ -2387,9 +2449,9 @@ const deleteOperationSpec$1 = {
2387
2449
  ouContainerName
2388
2450
  ],
2389
2451
  headerParameters: [accept],
2390
- serializer: serializer$3
2452
+ serializer
2391
2453
  };
2392
- const updateOperationSpec$1 = {
2454
+ const updateOperationSpec = {
2393
2455
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Aad/domainServices/{domainServiceName}/ouContainer/{ouContainerName}",
2394
2456
  httpMethod: "PATCH",
2395
2457
  responses: {
@@ -2420,9 +2482,9 @@ const updateOperationSpec$1 = {
2420
2482
  ],
2421
2483
  headerParameters: [accept, contentType],
2422
2484
  mediaType: "json",
2423
- serializer: serializer$3
2485
+ serializer
2424
2486
  };
2425
- const listNextOperationSpec$3 = {
2487
+ const listNextOperationSpec = {
2426
2488
  path: "{nextLink}",
2427
2489
  httpMethod: "GET",
2428
2490
  responses: {
@@ -2442,7 +2504,7 @@ const listNextOperationSpec$3 = {
2442
2504
  domainServiceName
2443
2505
  ],
2444
2506
  headerParameters: [accept],
2445
- serializer: serializer$3
2507
+ serializer
2446
2508
  };
2447
2509
 
2448
2510
  /*
@@ -2452,7 +2514,7 @@ const listNextOperationSpec$3 = {
2452
2514
  * Code generated by Microsoft (R) AutoRest Code Generator.
2453
2515
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2454
2516
  */
2455
- class DomainServicesResourceProvider extends coreClient.ServiceClient {
2517
+ class DomainServicesResourceProvider extends coreClient__namespace.ServiceClient {
2456
2518
  /**
2457
2519
  * Initializes a new instance of the DomainServicesResourceProvider class.
2458
2520
  * @param credentials Subscription credentials which uniquely identify client subscription.
@@ -2461,6 +2523,7 @@ class DomainServicesResourceProvider extends coreClient.ServiceClient {
2461
2523
  * @param options The parameter options
2462
2524
  */
2463
2525
  constructor(credentials, subscriptionId, options) {
2526
+ var _a, _b;
2464
2527
  if (credentials === undefined) {
2465
2528
  throw new Error("'credentials' cannot be null");
2466
2529
  }
@@ -2475,7 +2538,7 @@ class DomainServicesResourceProvider extends coreClient.ServiceClient {
2475
2538
  requestContentType: "application/json; charset=utf-8",
2476
2539
  credential: credentials
2477
2540
  };
2478
- const packageDetails = `azsdk-js-arm-domainservices/4.0.0`;
2541
+ const packageDetails = `azsdk-js-arm-domainservices/4.0.1`;
2479
2542
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
2480
2543
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
2481
2544
  : `${packageDetails}`;
@@ -2484,8 +2547,24 @@ class DomainServicesResourceProvider extends coreClient.ServiceClient {
2484
2547
  }
2485
2548
  const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
2486
2549
  userAgentPrefix
2487
- }, baseUri: options.endpoint || "https://management.azure.com" });
2550
+ }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
2488
2551
  super(optionsWithDefaults);
2552
+ if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
2553
+ const pipelinePolicies = options.pipeline.getOrderedPolicies();
2554
+ const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
2555
+ coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
2556
+ if (!bearerTokenAuthenticationPolicyFound) {
2557
+ this.pipeline.removePolicy({
2558
+ name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
2559
+ });
2560
+ this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
2561
+ scopes: `${optionsWithDefaults.baseUri}/.default`,
2562
+ challengeCallbacks: {
2563
+ authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
2564
+ }
2565
+ }));
2566
+ }
2567
+ }
2489
2568
  // Parameter assignments
2490
2569
  this.subscriptionId = subscriptionId;
2491
2570
  // Assigning values to Constant parameters