@azure/arm-storagecache 5.2.1-alpha.20230201.1 → 5.2.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 (107) hide show
  1. package/CHANGELOG.md +5 -5
  2. package/LICENSE +1 -1
  3. package/dist/index.js +162 -62
  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/ascOperationsGetSample.js +10 -2
  8. package/dist-esm/samples-dev/ascOperationsGetSample.js.map +1 -1
  9. package/dist-esm/samples-dev/ascUsagesListSample.js +10 -2
  10. package/dist-esm/samples-dev/ascUsagesListSample.js.map +1 -1
  11. package/dist-esm/samples-dev/cachesCreateOrUpdateSample.js +15 -6
  12. package/dist-esm/samples-dev/cachesCreateOrUpdateSample.js.map +1 -1
  13. package/dist-esm/samples-dev/cachesDebugInfoSample.js +11 -3
  14. package/dist-esm/samples-dev/cachesDebugInfoSample.js.map +1 -1
  15. package/dist-esm/samples-dev/cachesDeleteSample.js +11 -3
  16. package/dist-esm/samples-dev/cachesDeleteSample.js.map +1 -1
  17. package/dist-esm/samples-dev/cachesFlushSample.js +11 -3
  18. package/dist-esm/samples-dev/cachesFlushSample.js.map +1 -1
  19. package/dist-esm/samples-dev/cachesGetSample.js +11 -3
  20. package/dist-esm/samples-dev/cachesGetSample.js.map +1 -1
  21. package/dist-esm/samples-dev/cachesListByResourceGroupSample.js +11 -3
  22. package/dist-esm/samples-dev/cachesListByResourceGroupSample.js.map +1 -1
  23. package/dist-esm/samples-dev/cachesListSample.js +10 -2
  24. package/dist-esm/samples-dev/cachesListSample.js.map +1 -1
  25. package/dist-esm/samples-dev/cachesPausePrimingJobSample.js +11 -3
  26. package/dist-esm/samples-dev/cachesPausePrimingJobSample.js.map +1 -1
  27. package/dist-esm/samples-dev/cachesResumePrimingJobSample.js +11 -3
  28. package/dist-esm/samples-dev/cachesResumePrimingJobSample.js.map +1 -1
  29. package/dist-esm/samples-dev/cachesSpaceAllocationSample.js +11 -3
  30. package/dist-esm/samples-dev/cachesSpaceAllocationSample.js.map +1 -1
  31. package/dist-esm/samples-dev/cachesStartPrimingJobSample.js +11 -3
  32. package/dist-esm/samples-dev/cachesStartPrimingJobSample.js.map +1 -1
  33. package/dist-esm/samples-dev/cachesStartSample.js +11 -3
  34. package/dist-esm/samples-dev/cachesStartSample.js.map +1 -1
  35. package/dist-esm/samples-dev/cachesStopPrimingJobSample.js +11 -3
  36. package/dist-esm/samples-dev/cachesStopPrimingJobSample.js.map +1 -1
  37. package/dist-esm/samples-dev/cachesStopSample.js +11 -3
  38. package/dist-esm/samples-dev/cachesStopSample.js.map +1 -1
  39. package/dist-esm/samples-dev/cachesUpdateSample.js +15 -6
  40. package/dist-esm/samples-dev/cachesUpdateSample.js.map +1 -1
  41. package/dist-esm/samples-dev/cachesUpgradeFirmwareSample.js +11 -3
  42. package/dist-esm/samples-dev/cachesUpgradeFirmwareSample.js.map +1 -1
  43. package/dist-esm/samples-dev/operationsListSample.js +10 -2
  44. package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
  45. package/dist-esm/samples-dev/skusListSample.js +10 -2
  46. package/dist-esm/samples-dev/skusListSample.js.map +1 -1
  47. package/dist-esm/samples-dev/storageTargetFlushSample.js +11 -3
  48. package/dist-esm/samples-dev/storageTargetFlushSample.js.map +1 -1
  49. package/dist-esm/samples-dev/storageTargetInvalidateSample.js +11 -3
  50. package/dist-esm/samples-dev/storageTargetInvalidateSample.js.map +1 -1
  51. package/dist-esm/samples-dev/storageTargetResumeSample.js +11 -3
  52. package/dist-esm/samples-dev/storageTargetResumeSample.js.map +1 -1
  53. package/dist-esm/samples-dev/storageTargetSuspendSample.js +11 -3
  54. package/dist-esm/samples-dev/storageTargetSuspendSample.js.map +1 -1
  55. package/dist-esm/samples-dev/storageTargetsCreateOrUpdateSample.js +19 -9
  56. package/dist-esm/samples-dev/storageTargetsCreateOrUpdateSample.js.map +1 -1
  57. package/dist-esm/samples-dev/storageTargetsDeleteSample.js +11 -3
  58. package/dist-esm/samples-dev/storageTargetsDeleteSample.js.map +1 -1
  59. package/dist-esm/samples-dev/storageTargetsDnsRefreshSample.js +11 -3
  60. package/dist-esm/samples-dev/storageTargetsDnsRefreshSample.js.map +1 -1
  61. package/dist-esm/samples-dev/storageTargetsGetSample.js +11 -3
  62. package/dist-esm/samples-dev/storageTargetsGetSample.js.map +1 -1
  63. package/dist-esm/samples-dev/storageTargetsListByCacheSample.js +11 -3
  64. package/dist-esm/samples-dev/storageTargetsListByCacheSample.js.map +1 -1
  65. package/dist-esm/samples-dev/usageModelsListSample.js +10 -2
  66. package/dist-esm/samples-dev/usageModelsListSample.js.map +1 -1
  67. package/dist-esm/src/index.d.ts +1 -0
  68. package/dist-esm/src/index.d.ts.map +1 -1
  69. package/dist-esm/src/index.js +1 -0
  70. package/dist-esm/src/index.js.map +1 -1
  71. package/dist-esm/src/operations/ascUsages.d.ts.map +1 -1
  72. package/dist-esm/src/operations/ascUsages.js +19 -8
  73. package/dist-esm/src/operations/ascUsages.js.map +1 -1
  74. package/dist-esm/src/operations/caches.d.ts.map +1 -1
  75. package/dist-esm/src/operations/caches.js +37 -16
  76. package/dist-esm/src/operations/caches.js.map +1 -1
  77. package/dist-esm/src/operations/operations.d.ts.map +1 -1
  78. package/dist-esm/src/operations/operations.js +19 -8
  79. package/dist-esm/src/operations/operations.js.map +1 -1
  80. package/dist-esm/src/operations/skus.d.ts.map +1 -1
  81. package/dist-esm/src/operations/skus.js +19 -8
  82. package/dist-esm/src/operations/skus.js.map +1 -1
  83. package/dist-esm/src/operations/storageTargets.d.ts.map +1 -1
  84. package/dist-esm/src/operations/storageTargets.js +19 -8
  85. package/dist-esm/src/operations/storageTargets.js.map +1 -1
  86. package/dist-esm/src/operations/usageModels.d.ts.map +1 -1
  87. package/dist-esm/src/operations/usageModels.js +19 -8
  88. package/dist-esm/src/operations/usageModels.js.map +1 -1
  89. package/dist-esm/src/pagingHelper.d.ts +13 -0
  90. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  91. package/dist-esm/src/pagingHelper.js +32 -0
  92. package/dist-esm/src/pagingHelper.js.map +1 -0
  93. package/dist-esm/src/storageCacheManagementClient.d.ts.map +1 -1
  94. package/dist-esm/src/storageCacheManagementClient.js +3 -6
  95. package/dist-esm/src/storageCacheManagementClient.js.map +1 -1
  96. package/package.json +8 -6
  97. package/review/arm-storagecache.api.md +3 -0
  98. package/src/index.ts +1 -0
  99. package/src/operations/ascUsages.ts +21 -9
  100. package/src/operations/caches.ts +45 -18
  101. package/src/operations/operations.ts +21 -9
  102. package/src/operations/skus.ts +21 -9
  103. package/src/operations/storageTargets.ts +23 -10
  104. package/src/operations/usageModels.ts +21 -9
  105. package/src/pagingHelper.ts +39 -0
  106. package/src/storageCacheManagementClient.ts +4 -5
  107. package/types/arm-storagecache.d.ts +9 -0
package/CHANGELOG.md CHANGED
@@ -1,14 +1,14 @@
1
1
  # Release History
2
2
 
3
- ## 5.2.1 (Unreleased)
3
+ ## 5.2.1 (2023-02-02)
4
4
 
5
- ### Features Added
5
+ **Features**
6
6
 
7
- ### Breaking Changes
7
+ - Exposes `getContinuationToken` helper function to extract continuation token
8
8
 
9
- ### Bugs Fixed
9
+ **Bugs Fixed**
10
10
 
11
- ### Other Changes
11
+ - A series of small bug fixs relevant to authentication and apiVersion policy
12
12
 
13
13
  ## 5.2.0 (2022-07-15)
14
14
 
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2022 Microsoft
3
+ Copyright (c) 2023 Microsoft
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/dist/index.js CHANGED
@@ -28,6 +28,38 @@ function _interopNamespace(e) {
28
28
  var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
29
29
  var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
30
30
 
31
+ /*
32
+ * Copyright (c) Microsoft Corporation.
33
+ * Licensed under the MIT License.
34
+ *
35
+ * Code generated by Microsoft (R) AutoRest Code Generator.
36
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
37
+ */
38
+ const pageMap = new WeakMap();
39
+ /**
40
+ * Given the last `.value` produced by the `byPage` iterator,
41
+ * returns a continuation token that can be used to begin paging from
42
+ * that point later.
43
+ * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
44
+ * @returns The continuation token that can be passed into byPage() during future calls.
45
+ */
46
+ function getContinuationToken(page) {
47
+ var _a;
48
+ if (typeof page !== "object" || page === null) {
49
+ return undefined;
50
+ }
51
+ return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
52
+ }
53
+ function setContinuationToken(page, continuationToken) {
54
+ var _a;
55
+ if (typeof page !== "object" || page === null || !continuationToken) {
56
+ return;
57
+ }
58
+ const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
59
+ pageInfo.continuationToken = continuationToken;
60
+ pageMap.set(page, pageInfo);
61
+ }
62
+
31
63
  /*
32
64
  * Copyright (c) Microsoft Corporation.
33
65
  * Licensed under the MIT License.
@@ -2526,20 +2558,31 @@ class OperationsImpl {
2526
2558
  [Symbol.asyncIterator]() {
2527
2559
  return this;
2528
2560
  },
2529
- byPage: () => {
2530
- return this.listPagingPage(options);
2561
+ byPage: (settings) => {
2562
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
2563
+ throw new Error("maxPageSize is not supported by this operation.");
2564
+ }
2565
+ return this.listPagingPage(options, settings);
2531
2566
  }
2532
2567
  };
2533
2568
  }
2534
- listPagingPage(options) {
2569
+ listPagingPage(options, settings) {
2535
2570
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
2536
- let result = yield tslib.__await(this._list(options));
2537
- yield yield tslib.__await(result.value || []);
2538
- let continuationToken = result.nextLink;
2571
+ let result;
2572
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
2573
+ if (!continuationToken) {
2574
+ result = yield tslib.__await(this._list(options));
2575
+ let page = result.value || [];
2576
+ continuationToken = result.nextLink;
2577
+ setContinuationToken(page, continuationToken);
2578
+ yield yield tslib.__await(page);
2579
+ }
2539
2580
  while (continuationToken) {
2540
2581
  result = yield tslib.__await(this._listNext(continuationToken, options));
2541
2582
  continuationToken = result.nextLink;
2542
- yield yield tslib.__await(result.value || []);
2583
+ let page = result.value || [];
2584
+ setContinuationToken(page, continuationToken);
2585
+ yield yield tslib.__await(page);
2543
2586
  }
2544
2587
  });
2545
2588
  }
@@ -2606,7 +2649,6 @@ const listNextOperationSpec$4 = {
2606
2649
  bodyMapper: CloudError
2607
2650
  }
2608
2651
  },
2609
- queryParameters: [apiVersion],
2610
2652
  urlParameters: [$host, nextLink],
2611
2653
  headerParameters: [accept],
2612
2654
  serializer: serializer$7
@@ -2642,20 +2684,31 @@ class SkusImpl {
2642
2684
  [Symbol.asyncIterator]() {
2643
2685
  return this;
2644
2686
  },
2645
- byPage: () => {
2646
- return this.listPagingPage(options);
2687
+ byPage: (settings) => {
2688
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
2689
+ throw new Error("maxPageSize is not supported by this operation.");
2690
+ }
2691
+ return this.listPagingPage(options, settings);
2647
2692
  }
2648
2693
  };
2649
2694
  }
2650
- listPagingPage(options) {
2695
+ listPagingPage(options, settings) {
2651
2696
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
2652
- let result = yield tslib.__await(this._list(options));
2653
- yield yield tslib.__await(result.value || []);
2654
- let continuationToken = result.nextLink;
2697
+ let result;
2698
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
2699
+ if (!continuationToken) {
2700
+ result = yield tslib.__await(this._list(options));
2701
+ let page = result.value || [];
2702
+ continuationToken = result.nextLink;
2703
+ setContinuationToken(page, continuationToken);
2704
+ yield yield tslib.__await(page);
2705
+ }
2655
2706
  while (continuationToken) {
2656
2707
  result = yield tslib.__await(this._listNext(continuationToken, options));
2657
2708
  continuationToken = result.nextLink;
2658
- yield yield tslib.__await(result.value || []);
2709
+ let page = result.value || [];
2710
+ setContinuationToken(page, continuationToken);
2711
+ yield yield tslib.__await(page);
2659
2712
  }
2660
2713
  });
2661
2714
  }
@@ -2722,7 +2775,6 @@ const listNextOperationSpec$3 = {
2722
2775
  bodyMapper: CloudError
2723
2776
  }
2724
2777
  },
2725
- queryParameters: [apiVersion],
2726
2778
  urlParameters: [
2727
2779
  $host,
2728
2780
  nextLink,
@@ -2762,20 +2814,31 @@ class UsageModelsImpl {
2762
2814
  [Symbol.asyncIterator]() {
2763
2815
  return this;
2764
2816
  },
2765
- byPage: () => {
2766
- return this.listPagingPage(options);
2817
+ byPage: (settings) => {
2818
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
2819
+ throw new Error("maxPageSize is not supported by this operation.");
2820
+ }
2821
+ return this.listPagingPage(options, settings);
2767
2822
  }
2768
2823
  };
2769
2824
  }
2770
- listPagingPage(options) {
2825
+ listPagingPage(options, settings) {
2771
2826
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
2772
- let result = yield tslib.__await(this._list(options));
2773
- yield yield tslib.__await(result.value || []);
2774
- let continuationToken = result.nextLink;
2827
+ let result;
2828
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
2829
+ if (!continuationToken) {
2830
+ result = yield tslib.__await(this._list(options));
2831
+ let page = result.value || [];
2832
+ continuationToken = result.nextLink;
2833
+ setContinuationToken(page, continuationToken);
2834
+ yield yield tslib.__await(page);
2835
+ }
2775
2836
  while (continuationToken) {
2776
2837
  result = yield tslib.__await(this._listNext(continuationToken, options));
2777
2838
  continuationToken = result.nextLink;
2778
- yield yield tslib.__await(result.value || []);
2839
+ let page = result.value || [];
2840
+ setContinuationToken(page, continuationToken);
2841
+ yield yield tslib.__await(page);
2779
2842
  }
2780
2843
  });
2781
2844
  }
@@ -2842,7 +2905,6 @@ const listNextOperationSpec$2 = {
2842
2905
  bodyMapper: CloudError
2843
2906
  }
2844
2907
  },
2845
- queryParameters: [apiVersion],
2846
2908
  urlParameters: [
2847
2909
  $host,
2848
2910
  nextLink,
@@ -2933,20 +2995,31 @@ class AscUsagesImpl {
2933
2995
  [Symbol.asyncIterator]() {
2934
2996
  return this;
2935
2997
  },
2936
- byPage: () => {
2937
- return this.listPagingPage(location, options);
2998
+ byPage: (settings) => {
2999
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
3000
+ throw new Error("maxPageSize is not supported by this operation.");
3001
+ }
3002
+ return this.listPagingPage(location, options, settings);
2938
3003
  }
2939
3004
  };
2940
3005
  }
2941
- listPagingPage(location, options) {
3006
+ listPagingPage(location, options, settings) {
2942
3007
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
2943
- let result = yield tslib.__await(this._list(location, options));
2944
- yield yield tslib.__await(result.value || []);
2945
- let continuationToken = result.nextLink;
3008
+ let result;
3009
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
3010
+ if (!continuationToken) {
3011
+ result = yield tslib.__await(this._list(location, options));
3012
+ let page = result.value || [];
3013
+ continuationToken = result.nextLink;
3014
+ setContinuationToken(page, continuationToken);
3015
+ yield yield tslib.__await(page);
3016
+ }
2946
3017
  while (continuationToken) {
2947
3018
  result = yield tslib.__await(this._listNext(location, continuationToken, options));
2948
3019
  continuationToken = result.nextLink;
2949
- yield yield tslib.__await(result.value || []);
3020
+ let page = result.value || [];
3021
+ setContinuationToken(page, continuationToken);
3022
+ yield yield tslib.__await(page);
2950
3023
  }
2951
3024
  });
2952
3025
  }
@@ -3019,7 +3092,6 @@ const listNextOperationSpec$1 = {
3019
3092
  bodyMapper: CloudError
3020
3093
  }
3021
3094
  },
3022
- queryParameters: [apiVersion],
3023
3095
  urlParameters: [
3024
3096
  $host,
3025
3097
  nextLink,
@@ -3088,20 +3160,31 @@ class CachesImpl {
3088
3160
  [Symbol.asyncIterator]() {
3089
3161
  return this;
3090
3162
  },
3091
- byPage: () => {
3092
- return this.listPagingPage(options);
3163
+ byPage: (settings) => {
3164
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
3165
+ throw new Error("maxPageSize is not supported by this operation.");
3166
+ }
3167
+ return this.listPagingPage(options, settings);
3093
3168
  }
3094
3169
  };
3095
3170
  }
3096
- listPagingPage(options) {
3171
+ listPagingPage(options, settings) {
3097
3172
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
3098
- let result = yield tslib.__await(this._list(options));
3099
- yield yield tslib.__await(result.value || []);
3100
- let continuationToken = result.nextLink;
3173
+ let result;
3174
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
3175
+ if (!continuationToken) {
3176
+ result = yield tslib.__await(this._list(options));
3177
+ let page = result.value || [];
3178
+ continuationToken = result.nextLink;
3179
+ setContinuationToken(page, continuationToken);
3180
+ yield yield tslib.__await(page);
3181
+ }
3101
3182
  while (continuationToken) {
3102
3183
  result = yield tslib.__await(this._listNext(continuationToken, options));
3103
3184
  continuationToken = result.nextLink;
3104
- yield yield tslib.__await(result.value || []);
3185
+ let page = result.value || [];
3186
+ setContinuationToken(page, continuationToken);
3187
+ yield yield tslib.__await(page);
3105
3188
  }
3106
3189
  });
3107
3190
  }
@@ -3137,20 +3220,31 @@ class CachesImpl {
3137
3220
  [Symbol.asyncIterator]() {
3138
3221
  return this;
3139
3222
  },
3140
- byPage: () => {
3141
- return this.listByResourceGroupPagingPage(resourceGroupName, options);
3223
+ byPage: (settings) => {
3224
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
3225
+ throw new Error("maxPageSize is not supported by this operation.");
3226
+ }
3227
+ return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
3142
3228
  }
3143
3229
  };
3144
3230
  }
3145
- listByResourceGroupPagingPage(resourceGroupName, options) {
3231
+ listByResourceGroupPagingPage(resourceGroupName, options, settings) {
3146
3232
  return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
3147
- let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
3148
- yield yield tslib.__await(result.value || []);
3149
- let continuationToken = result.nextLink;
3233
+ let result;
3234
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
3235
+ if (!continuationToken) {
3236
+ result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
3237
+ let page = result.value || [];
3238
+ continuationToken = result.nextLink;
3239
+ setContinuationToken(page, continuationToken);
3240
+ yield yield tslib.__await(page);
3241
+ }
3150
3242
  while (continuationToken) {
3151
3243
  result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
3152
3244
  continuationToken = result.nextLink;
3153
- yield yield tslib.__await(result.value || []);
3245
+ let page = result.value || [];
3246
+ setContinuationToken(page, continuationToken);
3247
+ yield yield tslib.__await(page);
3154
3248
  }
3155
3249
  });
3156
3250
  }
@@ -4290,7 +4384,6 @@ const listNextOperationSpec = {
4290
4384
  bodyMapper: CloudError
4291
4385
  }
4292
4386
  },
4293
- queryParameters: [apiVersion],
4294
4387
  urlParameters: [
4295
4388
  $host,
4296
4389
  nextLink,
@@ -4310,7 +4403,6 @@ const listByResourceGroupNextOperationSpec = {
4310
4403
  bodyMapper: CloudError
4311
4404
  }
4312
4405
  },
4313
- queryParameters: [apiVersion],
4314
4406
  urlParameters: [
4315
4407
  $host,
4316
4408
  nextLink,
@@ -4354,20 +4446,31 @@ class StorageTargetsImpl {
4354
4446
  [Symbol.asyncIterator]() {
4355
4447
  return this;
4356
4448
  },
4357
- byPage: () => {
4358
- return this.listByCachePagingPage(resourceGroupName, cacheName, options);
4449
+ byPage: (settings) => {
4450
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
4451
+ throw new Error("maxPageSize is not supported by this operation.");
4452
+ }
4453
+ return this.listByCachePagingPage(resourceGroupName, cacheName, options, settings);
4359
4454
  }
4360
4455
  };
4361
4456
  }
4362
- listByCachePagingPage(resourceGroupName, cacheName, options) {
4457
+ listByCachePagingPage(resourceGroupName, cacheName, options, settings) {
4363
4458
  return tslib.__asyncGenerator(this, arguments, function* listByCachePagingPage_1() {
4364
- let result = yield tslib.__await(this._listByCache(resourceGroupName, cacheName, options));
4365
- yield yield tslib.__await(result.value || []);
4366
- let continuationToken = result.nextLink;
4459
+ let result;
4460
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
4461
+ if (!continuationToken) {
4462
+ result = yield tslib.__await(this._listByCache(resourceGroupName, cacheName, options));
4463
+ let page = result.value || [];
4464
+ continuationToken = result.nextLink;
4465
+ setContinuationToken(page, continuationToken);
4466
+ yield yield tslib.__await(page);
4467
+ }
4367
4468
  while (continuationToken) {
4368
4469
  result = yield tslib.__await(this._listByCacheNext(resourceGroupName, cacheName, continuationToken, options));
4369
4470
  continuationToken = result.nextLink;
4370
- yield yield tslib.__await(result.value || []);
4471
+ let page = result.value || [];
4472
+ setContinuationToken(page, continuationToken);
4473
+ yield yield tslib.__await(page);
4371
4474
  }
4372
4475
  });
4373
4476
  }
@@ -4733,7 +4836,6 @@ const listByCacheNextOperationSpec = {
4733
4836
  bodyMapper: CloudError
4734
4837
  }
4735
4838
  },
4736
- queryParameters: [apiVersion],
4737
4839
  urlParameters: [
4738
4840
  $host,
4739
4841
  nextLink,
@@ -5101,7 +5203,7 @@ class StorageCacheManagementClient extends coreClient__namespace.ServiceClient {
5101
5203
  * @param options The parameter options
5102
5204
  */
5103
5205
  constructor(credentials, subscriptionId, options) {
5104
- var _a, _b;
5206
+ var _a, _b, _c;
5105
5207
  if (credentials === undefined) {
5106
5208
  throw new Error("'credentials' cannot be null");
5107
5209
  }
@@ -5120,12 +5222,9 @@ class StorageCacheManagementClient extends coreClient__namespace.ServiceClient {
5120
5222
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
5121
5223
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
5122
5224
  : `${packageDetails}`;
5123
- if (!options.credentialScopes) {
5124
- options.credentialScopes = ["https://management.azure.com/.default"];
5125
- }
5126
5225
  const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
5127
5226
  userAgentPrefix
5128
- }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
5227
+ }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
5129
5228
  super(optionsWithDefaults);
5130
5229
  let bearerTokenAuthenticationPolicyFound = false;
5131
5230
  if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
@@ -5142,7 +5241,7 @@ class StorageCacheManagementClient extends coreClient__namespace.ServiceClient {
5142
5241
  });
5143
5242
  this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
5144
5243
  credential: credentials,
5145
- scopes: `${optionsWithDefaults.credentialScopes}`,
5244
+ scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
5146
5245
  challengeCallbacks: {
5147
5246
  authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
5148
5247
  }
@@ -5193,4 +5292,5 @@ class StorageCacheManagementClient extends coreClient__namespace.ServiceClient {
5193
5292
  }
5194
5293
 
5195
5294
  exports.StorageCacheManagementClient = StorageCacheManagementClient;
5295
+ exports.getContinuationToken = getContinuationToken;
5196
5296
  //# sourceMappingURL=index.js.map