@azure/arm-locks 2.0.0-beta.1 → 2.0.1-alpha.20211215.1

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 (95) hide show
  1. package/CHANGELOG.md +15 -10
  2. package/README.md +15 -9
  3. package/dist/index.js +6 -432
  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/src/index.d.ts +5 -0
  8. package/dist-esm/src/index.d.ts.map +1 -0
  9. package/{esm → dist-esm/src}/index.js +0 -1
  10. package/dist-esm/src/index.js.map +1 -0
  11. package/{esm → dist-esm/src}/managementLockClient.d.ts +5 -2
  12. package/dist-esm/src/managementLockClient.d.ts.map +1 -0
  13. package/{esm/managementLockClientContext.js → dist-esm/src/managementLockClient.js} +7 -4
  14. package/dist-esm/src/managementLockClient.js.map +1 -0
  15. package/{esm → dist-esm/src}/models/index.d.ts +0 -33
  16. package/dist-esm/src/models/index.d.ts.map +1 -0
  17. package/{esm → dist-esm/src}/models/index.js +0 -0
  18. package/dist-esm/src/models/index.js.map +1 -0
  19. package/{esm → dist-esm/src}/models/mappers.d.ts +0 -0
  20. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  21. package/{esm → dist-esm/src}/models/mappers.js +0 -0
  22. package/dist-esm/src/models/mappers.js.map +1 -0
  23. package/{esm → dist-esm/src}/models/parameters.d.ts +0 -0
  24. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  25. package/{esm → dist-esm/src}/models/parameters.js +0 -0
  26. package/dist-esm/src/models/parameters.js.map +1 -0
  27. package/{esm → dist-esm/src}/operations/authorizationOperations.d.ts +4 -19
  28. package/dist-esm/src/operations/authorizationOperations.d.ts.map +1 -0
  29. package/{esm → dist-esm/src}/operations/authorizationOperations.js +1 -72
  30. package/dist-esm/src/operations/authorizationOperations.js.map +1 -0
  31. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  32. package/dist-esm/src/operations/index.d.ts.map +1 -0
  33. package/{esm → dist-esm/src}/operations/index.js +0 -0
  34. package/dist-esm/src/operations/index.js.map +1 -0
  35. package/{esm/operationsInterfaces → dist-esm/src/operations}/managementLocks.d.ts +89 -42
  36. package/dist-esm/src/operations/managementLocks.d.ts.map +1 -0
  37. package/{esm → dist-esm/src}/operations/managementLocks.js +1 -337
  38. package/dist-esm/src/operations/managementLocks.js.map +1 -0
  39. package/dist-esm/src/operationsInterfaces/authorizationOperations.d.ts +11 -0
  40. package/dist-esm/src/operationsInterfaces/authorizationOperations.d.ts.map +1 -0
  41. package/{esm → dist-esm/src}/operationsInterfaces/authorizationOperations.js +1 -1
  42. package/dist-esm/src/operationsInterfaces/authorizationOperations.js.map +1 -0
  43. package/{esm → dist-esm/src}/operationsInterfaces/index.d.ts +0 -0
  44. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  45. package/{esm → dist-esm/src}/operationsInterfaces/index.js +0 -0
  46. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  47. package/dist-esm/src/operationsInterfaces/managementLocks.d.ts +159 -0
  48. package/dist-esm/src/operationsInterfaces/managementLocks.d.ts.map +1 -0
  49. package/{esm → dist-esm/src}/operationsInterfaces/managementLocks.js +1 -1
  50. package/dist-esm/src/operationsInterfaces/managementLocks.js.map +1 -0
  51. package/dist-esm/test/locks_examples.d.ts +4 -0
  52. package/dist-esm/test/locks_examples.d.ts.map +1 -0
  53. package/dist-esm/test/locks_examples.js +106 -0
  54. package/dist-esm/test/locks_examples.js.map +1 -0
  55. package/package.json +24 -20
  56. package/review/arm-locks.api.md +5 -55
  57. package/src/index.ts +0 -1
  58. package/src/managementLockClient.ts +46 -3
  59. package/src/models/index.ts +0 -47
  60. package/src/operations/authorizationOperations.ts +5 -82
  61. package/src/operations/managementLocks.ts +5 -467
  62. package/src/operationsInterfaces/authorizationOperations.ts +0 -11
  63. package/src/operationsInterfaces/managementLocks.ts +0 -62
  64. package/tsconfig.json +2 -3
  65. package/{esm/index.d.ts → types/arm-locks.d.ts} +4 -101
  66. package/types/tsdoc-metadata.json +11 -0
  67. package/esm/index.d.ts.map +0 -1
  68. package/esm/index.js.map +0 -1
  69. package/esm/managementLockClient.d.ts.map +0 -1
  70. package/esm/managementLockClient.js +0 -23
  71. package/esm/managementLockClient.js.map +0 -1
  72. package/esm/managementLockClientContext.d.ts +0 -16
  73. package/esm/managementLockClientContext.d.ts.map +0 -1
  74. package/esm/managementLockClientContext.js.map +0 -1
  75. package/esm/models/index.d.ts.map +0 -1
  76. package/esm/models/index.js.map +0 -1
  77. package/esm/models/mappers.d.ts.map +0 -1
  78. package/esm/models/mappers.js.map +0 -1
  79. package/esm/models/parameters.d.ts.map +0 -1
  80. package/esm/models/parameters.js.map +0 -1
  81. package/esm/operations/authorizationOperations.d.ts.map +0 -1
  82. package/esm/operations/authorizationOperations.js.map +0 -1
  83. package/esm/operations/index.d.ts.map +0 -1
  84. package/esm/operations/index.js.map +0 -1
  85. package/esm/operations/managementLocks.d.ts +0 -331
  86. package/esm/operations/managementLocks.d.ts.map +0 -1
  87. package/esm/operations/managementLocks.js.map +0 -1
  88. package/esm/operationsInterfaces/authorizationOperations.d.ts +0 -18
  89. package/esm/operationsInterfaces/authorizationOperations.d.ts.map +0 -1
  90. package/esm/operationsInterfaces/authorizationOperations.js.map +0 -1
  91. package/esm/operationsInterfaces/index.d.ts.map +0 -1
  92. package/esm/operationsInterfaces/index.js.map +0 -1
  93. package/esm/operationsInterfaces/managementLocks.d.ts.map +0 -1
  94. package/esm/operationsInterfaces/managementLocks.js.map +0 -1
  95. package/src/managementLockClientContext.ts +0 -70
package/CHANGELOG.md CHANGED
@@ -1,16 +1,21 @@
1
1
  # Release History
2
2
 
3
- ## 2.0.0-beta.1 (2021-10-09)
3
+ ## 2.0.1 (Unreleased)
4
4
 
5
- This is the first preview for the new version of the `@azure/arm-locks` package that follows the new [guidelines for TypeScript SDKs](https://azure.github.io/azure-sdk/typescript_introduction.html) for Azure services.
5
+ ### Features Added
6
6
 
7
- While this package remains auto generated, the SDK generator itself has undergone changes to comply with the above guidelines in order to generate packages that are idiomatic to the JavaScript/TypeScript ecosystem and consistent with other packages for Azure services. For more on this, please see [State of the Azure SDK 2021](https://devblogs.microsoft.com/azure-sdk/state-of-the-azure-sdk-2021/).
7
+ ### Breaking Changes
8
8
 
9
- Please note that this version has breaking changes, all of which were made after careful consideration during the authoring of the guidelines and user studies.
9
+ ### Bugs Fixed
10
10
 
11
- **Noteworthy changes and features**
12
- - Authentication: The packages `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` are no longer supported. Use package [@azure/identity](https://www.npmjs.com/package/@azure/identity) instead. Select a credential from Azure Identity examples based on the authentication method of your choice.
13
- - Callbacks: Method overloads that used callbacks have been removed and the use of promises is encouraged instead.
14
- - List operations now return an iterable result that follows the `PagedAsyncIterableIterator` interface as opposed to the previous model where you had to make a new request using the link to the next page.
15
- - Long running operations i.e. the Lro related object returned by methods whose names started with `begin`, now uses `pollUntilDone` to check whether the request is finished, instead of `pollUntilFinished`. To get the final result, use the corresponding method that will have the suffix `AndWait`.
16
- - The SDK only supports ECMAScript 2015 (ES6) and beyond, all projects that referenced this SDK should be upgraded to use ES6.
11
+ ### Other Changes
12
+
13
+ ## 2.0.0 (2021-12-07)
14
+
15
+ The package of @azure/arm-locks is using our next generation design principles since version 2.0.0, which contains breaking changes.
16
+
17
+ To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
18
+
19
+ To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).
20
+
21
+ To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
package/README.md CHANGED
@@ -4,7 +4,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
4
4
 
5
5
  Azure resources can be locked to prevent other users in your organization from deleting or modifying resources.
6
6
 
7
- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/locks/arm-locks) |
7
+ [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/locks/arm-locks) |
8
8
  [Package (NPM)](https://www.npmjs.com/package/@azure/arm-locks) |
9
9
  [API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-locks) |
10
10
  [Samples](https://github.com/Azure-Samples/azure-samples-js-management)
@@ -33,17 +33,19 @@ npm install @azure/arm-locks
33
33
  To create a client object to access the Azure ManagementLock API, you will need the `endpoint` of your Azure ManagementLock resource and a `credential`. The Azure ManagementLock client can use Azure Active Directory credentials to authenticate.
34
34
  You can find the endpoint for your Azure ManagementLock resource in the [Azure Portal][azure_portal].
35
35
 
36
- #### Using an Azure Active Directory Credential
36
+ You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
37
37
 
38
- You can authenticate with Azure Active Directory using the [Azure Identity library][azure_identity]. To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
38
+ To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
39
39
 
40
40
  ```bash
41
41
  npm install @azure/identity
42
42
  ```
43
43
 
44
- You will also need to register a new AAD application and grant access to Azure ManagementLock by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
44
+ You will also need to **register a new AAD application and grant access to Azure ManagementLock** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
45
45
  Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.
46
46
 
47
+ For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
48
+
47
49
  ```javascript
48
50
  const { ManagementLockClient } = require("@azure/arm-locks");
49
51
  const { DefaultAzureCredential } = require("@azure/identity");
@@ -51,6 +53,10 @@ const subscriptionId = "00000000-0000-0000-0000-000000000000";
51
53
  const client = new ManagementLockClient(new DefaultAzureCredential(), subscriptionId);
52
54
  ```
53
55
 
56
+
57
+ ### JavaScript Bundle
58
+ To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).
59
+
54
60
  ## Key concepts
55
61
 
56
62
  ### ManagementLockClient
@@ -64,11 +70,11 @@ const client = new ManagementLockClient(new DefaultAzureCredential(), subscripti
64
70
  Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
65
71
 
66
72
  ```javascript
67
- import { setLogLevel } from "@azure/logger";
73
+ const { setLogLevel } = require("@azure/logger");
68
74
  setLogLevel("info");
69
75
  ```
70
76
 
71
- For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/logger).
77
+ For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
72
78
 
73
79
  ## Next steps
74
80
 
@@ -76,7 +82,7 @@ Please take a look at the [samples](https://github.com/Azure-Samples/azure-sampl
76
82
 
77
83
  ## Contributing
78
84
 
79
- If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/master/CONTRIBUTING.md) to learn more about how to build and test the code.
85
+ If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
80
86
 
81
87
  ## Related projects
82
88
 
@@ -88,5 +94,5 @@ If you'd like to contribute to this library, please read the [contributing guide
88
94
  [azure_sub]: https://azure.microsoft.com/free/
89
95
  [azure_sub]: https://azure.microsoft.com/free/
90
96
  [azure_portal]: https://portal.azure.com
91
- [azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/identity/identity
92
- [defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/identity/identity#defaultazurecredential
97
+ [azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
98
+ [defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential
package/dist/index.js CHANGED
@@ -2,9 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var tslib = require('tslib');
6
- require('@azure/core-paging');
7
5
  var coreClient = require('@azure/core-client');
6
+ var tslib = require('tslib');
8
7
 
9
8
  /*
10
9
  * Copyright (c) Microsoft Corporation.
@@ -375,7 +374,7 @@ const filter = {
375
374
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
376
375
  */
377
376
  /// <reference lib="esnext.asynciterable" />
378
- /** Class representing a AuthorizationOperations. */
377
+ /** Class containing AuthorizationOperations operations. */
379
378
  class AuthorizationOperationsImpl {
380
379
  /**
381
380
  * Initialize a new instance of the class AuthorizationOperations class.
@@ -432,55 +431,6 @@ class AuthorizationOperationsImpl {
432
431
  }
433
432
  });
434
433
  }
435
- /**
436
- * ListNext
437
- * @param nextLink The nextLink from the previous successful call to the List method.
438
- * @param options The options parameters.
439
- */
440
- listNext(nextLink, options) {
441
- const iter = this.listNextPagingAll(nextLink, options);
442
- return {
443
- next() {
444
- return iter.next();
445
- },
446
- [Symbol.asyncIterator]() {
447
- return this;
448
- },
449
- byPage: () => {
450
- return this.listNextPagingPage(nextLink, options);
451
- }
452
- };
453
- }
454
- listNextPagingPage(nextLink, options) {
455
- return tslib.__asyncGenerator(this, arguments, function* listNextPagingPage_1() {
456
- let result = yield tslib.__await(this._listNext(nextLink, options));
457
- yield yield tslib.__await(result.value || []);
458
- let continuationToken = result.nextLink;
459
- while (continuationToken) {
460
- result = yield tslib.__await(this._listNextNext(continuationToken, options));
461
- continuationToken = result.nextLink;
462
- yield yield tslib.__await(result.value || []);
463
- }
464
- });
465
- }
466
- listNextPagingAll(nextLink, options) {
467
- return tslib.__asyncGenerator(this, arguments, function* listNextPagingAll_1() {
468
- var e_2, _a;
469
- try {
470
- for (var _b = tslib.__asyncValues(this.listNextPagingPage(nextLink, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
471
- const page = _c.value;
472
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
473
- }
474
- }
475
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
476
- finally {
477
- try {
478
- if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
479
- }
480
- finally { if (e_2) throw e_2.error; }
481
- }
482
- });
483
- }
484
434
  /**
485
435
  * Lists all of the available Microsoft.Authorization REST API operations.
486
436
  * @param options The options parameters.
@@ -496,14 +446,6 @@ class AuthorizationOperationsImpl {
496
446
  _listNext(nextLink, options) {
497
447
  return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
498
448
  }
499
- /**
500
- * ListNextNext
501
- * @param nextLink The nextLink from the previous successful call to the ListNext method.
502
- * @param options The options parameters.
503
- */
504
- _listNextNext(nextLink, options) {
505
- return this.client.sendOperationRequest({ nextLink, options }, listNextNextOperationSpec);
506
- }
507
449
  }
508
450
  // Operation Specifications
509
451
  const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
@@ -533,19 +475,6 @@ const listNextOperationSpec = {
533
475
  headerParameters: [accept],
534
476
  serializer
535
477
  };
536
- const listNextNextOperationSpec = {
537
- path: "{nextLink}",
538
- httpMethod: "GET",
539
- responses: {
540
- 200: {
541
- bodyMapper: OperationListResult
542
- }
543
- },
544
- queryParameters: [apiVersion],
545
- urlParameters: [$host, nextLink],
546
- headerParameters: [accept],
547
- serializer
548
- };
549
478
 
550
479
  /*
551
480
  * Copyright (c) Microsoft Corporation.
@@ -555,7 +484,7 @@ const listNextNextOperationSpec = {
555
484
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
556
485
  */
557
486
  /// <reference lib="esnext.asynciterable" />
558
- /** Class representing a ManagementLocks. */
487
+ /** Class containing ManagementLocks operations. */
559
488
  class ManagementLocksImpl {
560
489
  /**
561
490
  * Initialize a new instance of the class ManagementLocks class.
@@ -768,216 +697,6 @@ class ManagementLocksImpl {
768
697
  }
769
698
  });
770
699
  }
771
- /**
772
- * ListAtResourceGroupLevelNext
773
- * @param resourceGroupName The name of the resource group containing the locks to get.
774
- * @param nextLink The nextLink from the previous successful call to the ListAtResourceGroupLevel
775
- * method.
776
- * @param options The options parameters.
777
- */
778
- listAtResourceGroupLevelNext(resourceGroupName, nextLink, options) {
779
- const iter = this.listAtResourceGroupLevelNextPagingAll(resourceGroupName, nextLink, options);
780
- return {
781
- next() {
782
- return iter.next();
783
- },
784
- [Symbol.asyncIterator]() {
785
- return this;
786
- },
787
- byPage: () => {
788
- return this.listAtResourceGroupLevelNextPagingPage(resourceGroupName, nextLink, options);
789
- }
790
- };
791
- }
792
- listAtResourceGroupLevelNextPagingPage(resourceGroupName, nextLink, options) {
793
- return tslib.__asyncGenerator(this, arguments, function* listAtResourceGroupLevelNextPagingPage_1() {
794
- let result = yield tslib.__await(this._listAtResourceGroupLevelNext(resourceGroupName, nextLink, options));
795
- yield yield tslib.__await(result.value || []);
796
- let continuationToken = result.nextLink;
797
- while (continuationToken) {
798
- result = yield tslib.__await(this._listAtResourceGroupLevelNextNext(resourceGroupName, continuationToken, options));
799
- continuationToken = result.nextLink;
800
- yield yield tslib.__await(result.value || []);
801
- }
802
- });
803
- }
804
- listAtResourceGroupLevelNextPagingAll(resourceGroupName, nextLink, options) {
805
- return tslib.__asyncGenerator(this, arguments, function* listAtResourceGroupLevelNextPagingAll_1() {
806
- var e_5, _a;
807
- try {
808
- for (var _b = tslib.__asyncValues(this.listAtResourceGroupLevelNextPagingPage(resourceGroupName, nextLink, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
809
- const page = _c.value;
810
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
811
- }
812
- }
813
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
814
- finally {
815
- try {
816
- if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
817
- }
818
- finally { if (e_5) throw e_5.error; }
819
- }
820
- });
821
- }
822
- /**
823
- * ListAtResourceLevelNext
824
- * @param resourceGroupName The name of the resource group containing the locked resource. The name is
825
- * case insensitive.
826
- * @param resourceProviderNamespace The namespace of the resource provider.
827
- * @param parentResourcePath The parent resource identity.
828
- * @param resourceType The resource type of the locked resource.
829
- * @param resourceName The name of the locked resource.
830
- * @param nextLink The nextLink from the previous successful call to the ListAtResourceLevel method.
831
- * @param options The options parameters.
832
- */
833
- listAtResourceLevelNext(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, nextLink, options) {
834
- const iter = this.listAtResourceLevelNextPagingAll(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, nextLink, options);
835
- return {
836
- next() {
837
- return iter.next();
838
- },
839
- [Symbol.asyncIterator]() {
840
- return this;
841
- },
842
- byPage: () => {
843
- return this.listAtResourceLevelNextPagingPage(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, nextLink, options);
844
- }
845
- };
846
- }
847
- listAtResourceLevelNextPagingPage(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, nextLink, options) {
848
- return tslib.__asyncGenerator(this, arguments, function* listAtResourceLevelNextPagingPage_1() {
849
- let result = yield tslib.__await(this._listAtResourceLevelNext(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, nextLink, options));
850
- yield yield tslib.__await(result.value || []);
851
- let continuationToken = result.nextLink;
852
- while (continuationToken) {
853
- result = yield tslib.__await(this._listAtResourceLevelNextNext(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, continuationToken, options));
854
- continuationToken = result.nextLink;
855
- yield yield tslib.__await(result.value || []);
856
- }
857
- });
858
- }
859
- listAtResourceLevelNextPagingAll(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, nextLink, options) {
860
- return tslib.__asyncGenerator(this, arguments, function* listAtResourceLevelNextPagingAll_1() {
861
- var e_6, _a;
862
- try {
863
- for (var _b = tslib.__asyncValues(this.listAtResourceLevelNextPagingPage(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, nextLink, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
864
- const page = _c.value;
865
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
866
- }
867
- }
868
- catch (e_6_1) { e_6 = { error: e_6_1 }; }
869
- finally {
870
- try {
871
- if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
872
- }
873
- finally { if (e_6) throw e_6.error; }
874
- }
875
- });
876
- }
877
- /**
878
- * ListAtSubscriptionLevelNext
879
- * @param nextLink The nextLink from the previous successful call to the ListAtSubscriptionLevel
880
- * method.
881
- * @param options The options parameters.
882
- */
883
- listAtSubscriptionLevelNext(nextLink, options) {
884
- const iter = this.listAtSubscriptionLevelNextPagingAll(nextLink, options);
885
- return {
886
- next() {
887
- return iter.next();
888
- },
889
- [Symbol.asyncIterator]() {
890
- return this;
891
- },
892
- byPage: () => {
893
- return this.listAtSubscriptionLevelNextPagingPage(nextLink, options);
894
- }
895
- };
896
- }
897
- listAtSubscriptionLevelNextPagingPage(nextLink, options) {
898
- return tslib.__asyncGenerator(this, arguments, function* listAtSubscriptionLevelNextPagingPage_1() {
899
- let result = yield tslib.__await(this._listAtSubscriptionLevelNext(nextLink, options));
900
- yield yield tslib.__await(result.value || []);
901
- let continuationToken = result.nextLink;
902
- while (continuationToken) {
903
- result = yield tslib.__await(this._listAtSubscriptionLevelNextNext(continuationToken, options));
904
- continuationToken = result.nextLink;
905
- yield yield tslib.__await(result.value || []);
906
- }
907
- });
908
- }
909
- listAtSubscriptionLevelNextPagingAll(nextLink, options) {
910
- return tslib.__asyncGenerator(this, arguments, function* listAtSubscriptionLevelNextPagingAll_1() {
911
- var e_7, _a;
912
- try {
913
- for (var _b = tslib.__asyncValues(this.listAtSubscriptionLevelNextPagingPage(nextLink, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
914
- const page = _c.value;
915
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
916
- }
917
- }
918
- catch (e_7_1) { e_7 = { error: e_7_1 }; }
919
- finally {
920
- try {
921
- if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
922
- }
923
- finally { if (e_7) throw e_7.error; }
924
- }
925
- });
926
- }
927
- /**
928
- * ListByScopeNext
929
- * @param scope The scope for the lock. When providing a scope for the assignment, use
930
- * '/subscriptions/{subscriptionId}' for subscriptions,
931
- * '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' for resource groups, and
932
- * '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePathIfPresent}/{resourceType}/{resourceName}'
933
- * for resources.
934
- * @param nextLink The nextLink from the previous successful call to the ListByScope method.
935
- * @param options The options parameters.
936
- */
937
- listByScopeNext(scope, nextLink, options) {
938
- const iter = this.listByScopeNextPagingAll(scope, nextLink, options);
939
- return {
940
- next() {
941
- return iter.next();
942
- },
943
- [Symbol.asyncIterator]() {
944
- return this;
945
- },
946
- byPage: () => {
947
- return this.listByScopeNextPagingPage(scope, nextLink, options);
948
- }
949
- };
950
- }
951
- listByScopeNextPagingPage(scope, nextLink, options) {
952
- return tslib.__asyncGenerator(this, arguments, function* listByScopeNextPagingPage_1() {
953
- let result = yield tslib.__await(this._listByScopeNext(scope, nextLink, options));
954
- yield yield tslib.__await(result.value || []);
955
- let continuationToken = result.nextLink;
956
- while (continuationToken) {
957
- result = yield tslib.__await(this._listByScopeNextNext(scope, continuationToken, options));
958
- continuationToken = result.nextLink;
959
- yield yield tslib.__await(result.value || []);
960
- }
961
- });
962
- }
963
- listByScopeNextPagingAll(scope, nextLink, options) {
964
- return tslib.__asyncGenerator(this, arguments, function* listByScopeNextPagingAll_1() {
965
- var e_8, _a;
966
- try {
967
- for (var _b = tslib.__asyncValues(this.listByScopeNextPagingPage(scope, nextLink, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
968
- const page = _c.value;
969
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
970
- }
971
- }
972
- catch (e_8_1) { e_8 = { error: e_8_1 }; }
973
- finally {
974
- try {
975
- if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
976
- }
977
- finally { if (e_8) throw e_8.error; }
978
- }
979
- });
980
- }
981
700
  /**
982
701
  * When you apply a lock at a parent scope, all child resources inherit the same lock. To create
983
702
  * management locks, you must have access to Microsoft.Authorization/* or
@@ -1249,61 +968,6 @@ class ManagementLocksImpl {
1249
968
  _listByScopeNext(scope, nextLink, options) {
1250
969
  return this.client.sendOperationRequest({ scope, nextLink, options }, listByScopeNextOperationSpec);
1251
970
  }
1252
- /**
1253
- * ListAtResourceGroupLevelNextNext
1254
- * @param resourceGroupName The name of the resource group containing the locks to get.
1255
- * @param nextLink The nextLink from the previous successful call to the ListAtResourceGroupLevelNext
1256
- * method.
1257
- * @param options The options parameters.
1258
- */
1259
- _listAtResourceGroupLevelNextNext(resourceGroupName, nextLink, options) {
1260
- return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listAtResourceGroupLevelNextNextOperationSpec);
1261
- }
1262
- /**
1263
- * ListAtResourceLevelNextNext
1264
- * @param resourceGroupName The name of the resource group containing the locked resource. The name is
1265
- * case insensitive.
1266
- * @param resourceProviderNamespace The namespace of the resource provider.
1267
- * @param parentResourcePath The parent resource identity.
1268
- * @param resourceType The resource type of the locked resource.
1269
- * @param resourceName The name of the locked resource.
1270
- * @param nextLink The nextLink from the previous successful call to the ListAtResourceLevelNext
1271
- * method.
1272
- * @param options The options parameters.
1273
- */
1274
- _listAtResourceLevelNextNext(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, nextLink, options) {
1275
- return this.client.sendOperationRequest({
1276
- resourceGroupName,
1277
- resourceProviderNamespace,
1278
- parentResourcePath,
1279
- resourceType,
1280
- resourceName,
1281
- nextLink,
1282
- options
1283
- }, listAtResourceLevelNextNextOperationSpec);
1284
- }
1285
- /**
1286
- * ListAtSubscriptionLevelNextNext
1287
- * @param nextLink The nextLink from the previous successful call to the ListAtSubscriptionLevelNext
1288
- * method.
1289
- * @param options The options parameters.
1290
- */
1291
- _listAtSubscriptionLevelNextNext(nextLink, options) {
1292
- return this.client.sendOperationRequest({ nextLink, options }, listAtSubscriptionLevelNextNextOperationSpec);
1293
- }
1294
- /**
1295
- * ListByScopeNextNext
1296
- * @param scope The scope for the lock. When providing a scope for the assignment, use
1297
- * '/subscriptions/{subscriptionId}' for subscriptions,
1298
- * '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' for resource groups, and
1299
- * '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePathIfPresent}/{resourceType}/{resourceName}'
1300
- * for resources.
1301
- * @param nextLink The nextLink from the previous successful call to the ListByScopeNext method.
1302
- * @param options The options parameters.
1303
- */
1304
- _listByScopeNextNext(scope, nextLink, options) {
1305
- return this.client.sendOperationRequest({ scope, nextLink, options }, listByScopeNextNextOperationSpec);
1306
- }
1307
971
  }
1308
972
  // Operation Specifications
1309
973
  const serializer$1 = coreClient.createSerializer(Mappers, /* isXml */ false);
@@ -1651,76 +1315,6 @@ const listByScopeNextOperationSpec = {
1651
1315
  headerParameters: [accept],
1652
1316
  serializer: serializer$1
1653
1317
  };
1654
- const listAtResourceGroupLevelNextNextOperationSpec = {
1655
- path: "{nextLink}",
1656
- httpMethod: "GET",
1657
- responses: {
1658
- 200: {
1659
- bodyMapper: ManagementLockListResult
1660
- }
1661
- },
1662
- queryParameters: [apiVersion, filter],
1663
- urlParameters: [
1664
- $host,
1665
- nextLink,
1666
- resourceGroupName,
1667
- subscriptionId
1668
- ],
1669
- headerParameters: [accept],
1670
- serializer: serializer$1
1671
- };
1672
- const listAtResourceLevelNextNextOperationSpec = {
1673
- path: "{nextLink}",
1674
- httpMethod: "GET",
1675
- responses: {
1676
- 200: {
1677
- bodyMapper: ManagementLockListResult
1678
- }
1679
- },
1680
- queryParameters: [apiVersion, filter],
1681
- urlParameters: [
1682
- $host,
1683
- nextLink,
1684
- resourceGroupName,
1685
- subscriptionId,
1686
- resourceProviderNamespace,
1687
- parentResourcePath,
1688
- resourceType,
1689
- resourceName
1690
- ],
1691
- headerParameters: [accept],
1692
- serializer: serializer$1
1693
- };
1694
- const listAtSubscriptionLevelNextNextOperationSpec = {
1695
- path: "{nextLink}",
1696
- httpMethod: "GET",
1697
- responses: {
1698
- 200: {
1699
- bodyMapper: ManagementLockListResult
1700
- }
1701
- },
1702
- queryParameters: [apiVersion, filter],
1703
- urlParameters: [
1704
- $host,
1705
- nextLink,
1706
- subscriptionId
1707
- ],
1708
- headerParameters: [accept],
1709
- serializer: serializer$1
1710
- };
1711
- const listByScopeNextNextOperationSpec = {
1712
- path: "{nextLink}",
1713
- httpMethod: "GET",
1714
- responses: {
1715
- 200: {
1716
- bodyMapper: ManagementLockListResult
1717
- }
1718
- },
1719
- queryParameters: [apiVersion, filter],
1720
- urlParameters: [$host, nextLink, scope],
1721
- headerParameters: [accept],
1722
- serializer: serializer$1
1723
- };
1724
1318
 
1725
1319
  /*
1726
1320
  * Copyright (c) Microsoft Corporation.
@@ -1729,9 +1323,9 @@ const listByScopeNextNextOperationSpec = {
1729
1323
  * Code generated by Microsoft (R) AutoRest Code Generator.
1730
1324
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1731
1325
  */
1732
- class ManagementLockClientContext extends coreClient.ServiceClient {
1326
+ class ManagementLockClient extends coreClient.ServiceClient {
1733
1327
  /**
1734
- * Initializes a new instance of the ManagementLockClientContext class.
1328
+ * Initializes a new instance of the ManagementLockClient class.
1735
1329
  * @param credentials Subscription credentials which uniquely identify client subscription.
1736
1330
  * @param subscriptionId The ID of the target subscription.
1737
1331
  * @param options The parameter options
@@ -1751,7 +1345,7 @@ class ManagementLockClientContext extends coreClient.ServiceClient {
1751
1345
  requestContentType: "application/json; charset=utf-8",
1752
1346
  credential: credentials
1753
1347
  };
1754
- const packageDetails = `azsdk-js-arm-locks/2.0.0-beta.1`;
1348
+ const packageDetails = `azsdk-js-arm-locks/2.0.0`;
1755
1349
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
1756
1350
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
1757
1351
  : `${packageDetails}`;
@@ -1767,30 +1361,10 @@ class ManagementLockClientContext extends coreClient.ServiceClient {
1767
1361
  // Assigning values to Constant parameters
1768
1362
  this.$host = options.$host || "https://management.azure.com";
1769
1363
  this.apiVersion = options.apiVersion || "2016-09-01";
1770
- }
1771
- }
1772
-
1773
- /*
1774
- * Copyright (c) Microsoft Corporation.
1775
- * Licensed under the MIT License.
1776
- *
1777
- * Code generated by Microsoft (R) AutoRest Code Generator.
1778
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1779
- */
1780
- class ManagementLockClient extends ManagementLockClientContext {
1781
- /**
1782
- * Initializes a new instance of the ManagementLockClient class.
1783
- * @param credentials Subscription credentials which uniquely identify client subscription.
1784
- * @param subscriptionId The ID of the target subscription.
1785
- * @param options The parameter options
1786
- */
1787
- constructor(credentials, subscriptionId, options) {
1788
- super(credentials, subscriptionId, options);
1789
1364
  this.authorizationOperations = new AuthorizationOperationsImpl(this);
1790
1365
  this.managementLocks = new ManagementLocksImpl(this);
1791
1366
  }
1792
1367
  }
1793
1368
 
1794
1369
  exports.ManagementLockClient = ManagementLockClient;
1795
- exports.ManagementLockClientContext = ManagementLockClientContext;
1796
1370
  //# sourceMappingURL=index.js.map