@azure/arm-storagecache 8.1.0 → 8.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. package/README.md +2 -2
  2. package/dist/browser/models/index.d.ts +185 -2
  3. package/dist/browser/models/index.d.ts.map +1 -1
  4. package/dist/browser/models/index.js +32 -0
  5. package/dist/browser/models/index.js.map +1 -1
  6. package/dist/browser/models/mappers.d.ts +6 -0
  7. package/dist/browser/models/mappers.d.ts.map +1 -1
  8. package/dist/browser/models/mappers.js +183 -0
  9. package/dist/browser/models/mappers.js.map +1 -1
  10. package/dist/browser/models/parameters.d.ts +3 -0
  11. package/dist/browser/models/parameters.d.ts.map +1 -1
  12. package/dist/browser/models/parameters.js +25 -2
  13. package/dist/browser/models/parameters.js.map +1 -1
  14. package/dist/browser/operations/expansionJobs.d.ts +120 -0
  15. package/dist/browser/operations/expansionJobs.d.ts.map +1 -0
  16. package/dist/browser/operations/expansionJobs.js +473 -0
  17. package/dist/browser/operations/expansionJobs.js.map +1 -0
  18. package/dist/browser/operations/index.d.ts +1 -0
  19. package/dist/browser/operations/index.d.ts.map +1 -1
  20. package/dist/browser/operations/index.js +1 -0
  21. package/dist/browser/operations/index.js.map +1 -1
  22. package/dist/browser/operationsInterfaces/expansionJobs.d.ts +93 -0
  23. package/dist/browser/operationsInterfaces/expansionJobs.d.ts.map +1 -0
  24. package/dist/browser/operationsInterfaces/expansionJobs.js +4 -0
  25. package/dist/browser/operationsInterfaces/expansionJobs.js.map +1 -0
  26. package/dist/browser/operationsInterfaces/index.d.ts +1 -0
  27. package/dist/browser/operationsInterfaces/index.d.ts.map +1 -1
  28. package/dist/browser/operationsInterfaces/index.js +1 -0
  29. package/dist/browser/operationsInterfaces/index.js.map +1 -1
  30. package/dist/browser/storageCacheManagementClient.d.ts +2 -1
  31. package/dist/browser/storageCacheManagementClient.d.ts.map +1 -1
  32. package/dist/browser/storageCacheManagementClient.js +5 -3
  33. package/dist/browser/storageCacheManagementClient.js.map +1 -1
  34. package/dist/commonjs/index.js +35 -16
  35. package/dist/commonjs/index.js.map +7 -1
  36. package/dist/commonjs/lroImpl.js +41 -21
  37. package/dist/commonjs/lroImpl.js.map +7 -1
  38. package/dist/commonjs/models/index.d.ts +185 -2
  39. package/dist/commonjs/models/index.d.ts.map +1 -1
  40. package/dist/commonjs/models/index.js +326 -386
  41. package/dist/commonjs/models/index.js.map +7 -1
  42. package/dist/commonjs/models/mappers.d.ts +6 -0
  43. package/dist/commonjs/models/mappers.d.ts.map +1 -1
  44. package/dist/commonjs/models/mappers.js +4573 -4116
  45. package/dist/commonjs/models/mappers.js.map +7 -1
  46. package/dist/commonjs/models/parameters.d.ts +3 -0
  47. package/dist/commonjs/models/parameters.d.ts.map +1 -1
  48. package/dist/commonjs/models/parameters.js +402 -287
  49. package/dist/commonjs/models/parameters.js.map +7 -1
  50. package/dist/commonjs/operations/amlFilesystems.js +594 -540
  51. package/dist/commonjs/operations/amlFilesystems.js.map +7 -1
  52. package/dist/commonjs/operations/ascOperations.js +79 -49
  53. package/dist/commonjs/operations/ascOperations.js.map +7 -1
  54. package/dist/commonjs/operations/ascUsages.js +141 -112
  55. package/dist/commonjs/operations/ascUsages.js.map +7 -1
  56. package/dist/commonjs/operations/autoExportJobs.js +527 -458
  57. package/dist/commonjs/operations/autoExportJobs.js.map +7 -1
  58. package/dist/commonjs/operations/autoImportJobs.js +527 -458
  59. package/dist/commonjs/operations/autoImportJobs.js.map +7 -1
  60. package/dist/commonjs/operations/caches.js +1353 -1315
  61. package/dist/commonjs/operations/caches.js.map +7 -1
  62. package/dist/commonjs/operations/expansionJobs.d.ts +120 -0
  63. package/dist/commonjs/operations/expansionJobs.d.ts.map +1 -0
  64. package/dist/commonjs/operations/expansionJobs.js +547 -0
  65. package/dist/commonjs/operations/expansionJobs.js.map +7 -0
  66. package/dist/commonjs/operations/importJobs.js +522 -453
  67. package/dist/commonjs/operations/importJobs.js.map +7 -1
  68. package/dist/commonjs/operations/index.d.ts +1 -0
  69. package/dist/commonjs/operations/index.d.ts.map +1 -1
  70. package/dist/commonjs/operations/index.js +45 -20
  71. package/dist/commonjs/operations/index.js.map +7 -1
  72. package/dist/commonjs/operations/operations.js +133 -104
  73. package/dist/commonjs/operations/operations.js.map +7 -1
  74. package/dist/commonjs/operations/skus.js +133 -104
  75. package/dist/commonjs/operations/skus.js.map +7 -1
  76. package/dist/commonjs/operations/storageTargetOperations.js +396 -356
  77. package/dist/commonjs/operations/storageTargetOperations.js.map +7 -1
  78. package/dist/commonjs/operations/storageTargets.js +567 -508
  79. package/dist/commonjs/operations/storageTargets.js.map +7 -1
  80. package/dist/commonjs/operations/usageModels.js +133 -104
  81. package/dist/commonjs/operations/usageModels.js.map +7 -1
  82. package/dist/commonjs/operationsInterfaces/amlFilesystems.js +15 -5
  83. package/dist/commonjs/operationsInterfaces/amlFilesystems.js.map +7 -1
  84. package/dist/commonjs/operationsInterfaces/ascOperations.js +15 -5
  85. package/dist/commonjs/operationsInterfaces/ascOperations.js.map +7 -1
  86. package/dist/commonjs/operationsInterfaces/ascUsages.js +15 -5
  87. package/dist/commonjs/operationsInterfaces/ascUsages.js.map +7 -1
  88. package/dist/commonjs/operationsInterfaces/autoExportJobs.js +15 -5
  89. package/dist/commonjs/operationsInterfaces/autoExportJobs.js.map +7 -1
  90. package/dist/commonjs/operationsInterfaces/autoImportJobs.js +15 -5
  91. package/dist/commonjs/operationsInterfaces/autoImportJobs.js.map +7 -1
  92. package/dist/commonjs/operationsInterfaces/caches.js +15 -5
  93. package/dist/commonjs/operationsInterfaces/caches.js.map +7 -1
  94. package/dist/commonjs/operationsInterfaces/expansionJobs.d.ts +93 -0
  95. package/dist/commonjs/operationsInterfaces/expansionJobs.d.ts.map +1 -0
  96. package/dist/commonjs/operationsInterfaces/expansionJobs.js +15 -0
  97. package/dist/commonjs/operationsInterfaces/expansionJobs.js.map +7 -0
  98. package/dist/commonjs/operationsInterfaces/importJobs.js +15 -5
  99. package/dist/commonjs/operationsInterfaces/importJobs.js.map +7 -1
  100. package/dist/commonjs/operationsInterfaces/index.d.ts +1 -0
  101. package/dist/commonjs/operationsInterfaces/index.d.ts.map +1 -1
  102. package/dist/commonjs/operationsInterfaces/index.js +45 -20
  103. package/dist/commonjs/operationsInterfaces/index.js.map +7 -1
  104. package/dist/commonjs/operationsInterfaces/operations.js +15 -5
  105. package/dist/commonjs/operationsInterfaces/operations.js.map +7 -1
  106. package/dist/commonjs/operationsInterfaces/skus.js +15 -5
  107. package/dist/commonjs/operationsInterfaces/skus.js.map +7 -1
  108. package/dist/commonjs/operationsInterfaces/storageTargetOperations.js +15 -5
  109. package/dist/commonjs/operationsInterfaces/storageTargetOperations.js.map +7 -1
  110. package/dist/commonjs/operationsInterfaces/storageTargets.js +15 -5
  111. package/dist/commonjs/operationsInterfaces/storageTargets.js.map +7 -1
  112. package/dist/commonjs/operationsInterfaces/usageModels.js +15 -5
  113. package/dist/commonjs/operationsInterfaces/usageModels.js.map +7 -1
  114. package/dist/commonjs/pagingHelper.js +39 -25
  115. package/dist/commonjs/pagingHelper.js.map +7 -1
  116. package/dist/commonjs/storageCacheManagementClient.d.ts +2 -1
  117. package/dist/commonjs/storageCacheManagementClient.d.ts.map +1 -1
  118. package/dist/commonjs/storageCacheManagementClient.js +198 -172
  119. package/dist/commonjs/storageCacheManagementClient.js.map +7 -1
  120. package/dist/commonjs/tsdoc-metadata.json +1 -1
  121. package/dist/esm/index.js +6 -8
  122. package/dist/esm/index.js.map +7 -1
  123. package/dist/esm/lroImpl.js +19 -19
  124. package/dist/esm/lroImpl.js.map +7 -1
  125. package/dist/esm/models/index.d.ts +185 -2
  126. package/dist/esm/models/index.d.ts.map +1 -1
  127. package/dist/esm/models/index.js +272 -383
  128. package/dist/esm/models/index.js.map +7 -1
  129. package/dist/esm/models/mappers.d.ts +6 -0
  130. package/dist/esm/models/mappers.d.ts.map +1 -1
  131. package/dist/esm/models/mappers.js +4422 -4111
  132. package/dist/esm/models/mappers.js.map +7 -1
  133. package/dist/esm/models/parameters.d.ts +3 -0
  134. package/dist/esm/models/parameters.d.ts.map +1 -1
  135. package/dist/esm/models/parameters.js +360 -283
  136. package/dist/esm/models/parameters.js.map +7 -1
  137. package/dist/esm/operations/amlFilesystems.js +556 -530
  138. package/dist/esm/operations/amlFilesystems.js.map +7 -1
  139. package/dist/esm/operations/ascOperations.js +44 -42
  140. package/dist/esm/operations/ascOperations.js.map +7 -1
  141. package/dist/esm/operations/ascUsages.js +105 -104
  142. package/dist/esm/operations/ascUsages.js.map +7 -1
  143. package/dist/esm/operations/autoExportJobs.js +489 -448
  144. package/dist/esm/operations/autoExportJobs.js.map +7 -1
  145. package/dist/esm/operations/autoImportJobs.js +489 -448
  146. package/dist/esm/operations/autoImportJobs.js.map +7 -1
  147. package/dist/esm/operations/caches.js +1315 -1305
  148. package/dist/esm/operations/caches.js.map +7 -1
  149. package/dist/esm/operations/expansionJobs.d.ts +120 -0
  150. package/dist/esm/operations/expansionJobs.d.ts.map +1 -0
  151. package/dist/esm/operations/expansionJobs.js +514 -0
  152. package/dist/esm/operations/expansionJobs.js.map +7 -0
  153. package/dist/esm/operations/importJobs.js +484 -443
  154. package/dist/esm/operations/importJobs.js.map +7 -1
  155. package/dist/esm/operations/index.d.ts +1 -0
  156. package/dist/esm/operations/index.d.ts.map +1 -1
  157. package/dist/esm/operations/index.js +1 -5
  158. package/dist/esm/operations/index.js.map +7 -1
  159. package/dist/esm/operations/operations.js +97 -96
  160. package/dist/esm/operations/operations.js.map +7 -1
  161. package/dist/esm/operations/skus.js +97 -96
  162. package/dist/esm/operations/skus.js.map +7 -1
  163. package/dist/esm/operations/storageTargetOperations.js +359 -347
  164. package/dist/esm/operations/storageTargetOperations.js.map +7 -1
  165. package/dist/esm/operations/storageTargets.js +529 -498
  166. package/dist/esm/operations/storageTargets.js.map +7 -1
  167. package/dist/esm/operations/usageModels.js +97 -96
  168. package/dist/esm/operations/usageModels.js.map +7 -1
  169. package/dist/esm/operationsInterfaces/amlFilesystems.js +0 -4
  170. package/dist/esm/operationsInterfaces/amlFilesystems.js.map +7 -1
  171. package/dist/esm/operationsInterfaces/ascOperations.js +0 -4
  172. package/dist/esm/operationsInterfaces/ascOperations.js.map +7 -1
  173. package/dist/esm/operationsInterfaces/ascUsages.js +0 -4
  174. package/dist/esm/operationsInterfaces/ascUsages.js.map +7 -1
  175. package/dist/esm/operationsInterfaces/autoExportJobs.js +0 -4
  176. package/dist/esm/operationsInterfaces/autoExportJobs.js.map +7 -1
  177. package/dist/esm/operationsInterfaces/autoImportJobs.js +0 -4
  178. package/dist/esm/operationsInterfaces/autoImportJobs.js.map +7 -1
  179. package/dist/esm/operationsInterfaces/caches.js +0 -4
  180. package/dist/esm/operationsInterfaces/caches.js.map +7 -1
  181. package/dist/esm/operationsInterfaces/expansionJobs.d.ts +93 -0
  182. package/dist/esm/operationsInterfaces/expansionJobs.d.ts.map +1 -0
  183. package/dist/esm/operationsInterfaces/expansionJobs.js +0 -0
  184. package/dist/esm/operationsInterfaces/expansionJobs.js.map +7 -0
  185. package/dist/esm/operationsInterfaces/importJobs.js +0 -4
  186. package/dist/esm/operationsInterfaces/importJobs.js.map +7 -1
  187. package/dist/esm/operationsInterfaces/index.d.ts +1 -0
  188. package/dist/esm/operationsInterfaces/index.d.ts.map +1 -1
  189. package/dist/esm/operationsInterfaces/index.js +1 -5
  190. package/dist/esm/operationsInterfaces/index.js.map +7 -1
  191. package/dist/esm/operationsInterfaces/operations.js +0 -4
  192. package/dist/esm/operationsInterfaces/operations.js.map +7 -1
  193. package/dist/esm/operationsInterfaces/skus.js +0 -4
  194. package/dist/esm/operationsInterfaces/skus.js.map +7 -1
  195. package/dist/esm/operationsInterfaces/storageTargetOperations.js +0 -4
  196. package/dist/esm/operationsInterfaces/storageTargetOperations.js.map +7 -1
  197. package/dist/esm/operationsInterfaces/storageTargets.js +0 -4
  198. package/dist/esm/operationsInterfaces/storageTargets.js.map +7 -1
  199. package/dist/esm/operationsInterfaces/usageModels.js +0 -4
  200. package/dist/esm/operationsInterfaces/usageModels.js.map +7 -1
  201. package/dist/esm/pagingHelper.js +17 -23
  202. package/dist/esm/pagingHelper.js.map +7 -1
  203. package/dist/esm/storageCacheManagementClient.d.ts +2 -1
  204. package/dist/esm/storageCacheManagementClient.d.ts.map +1 -1
  205. package/dist/esm/storageCacheManagementClient.js +176 -164
  206. package/dist/esm/storageCacheManagementClient.js.map +7 -1
  207. package/dist/react-native/models/index.d.ts +185 -2
  208. package/dist/react-native/models/index.d.ts.map +1 -1
  209. package/dist/react-native/models/index.js +32 -0
  210. package/dist/react-native/models/index.js.map +1 -1
  211. package/dist/react-native/models/mappers.d.ts +6 -0
  212. package/dist/react-native/models/mappers.d.ts.map +1 -1
  213. package/dist/react-native/models/mappers.js +183 -0
  214. package/dist/react-native/models/mappers.js.map +1 -1
  215. package/dist/react-native/models/parameters.d.ts +3 -0
  216. package/dist/react-native/models/parameters.d.ts.map +1 -1
  217. package/dist/react-native/models/parameters.js +25 -2
  218. package/dist/react-native/models/parameters.js.map +1 -1
  219. package/dist/react-native/operations/expansionJobs.d.ts +120 -0
  220. package/dist/react-native/operations/expansionJobs.d.ts.map +1 -0
  221. package/dist/react-native/operations/expansionJobs.js +473 -0
  222. package/dist/react-native/operations/expansionJobs.js.map +1 -0
  223. package/dist/react-native/operations/index.d.ts +1 -0
  224. package/dist/react-native/operations/index.d.ts.map +1 -1
  225. package/dist/react-native/operations/index.js +1 -0
  226. package/dist/react-native/operations/index.js.map +1 -1
  227. package/dist/react-native/operationsInterfaces/expansionJobs.d.ts +93 -0
  228. package/dist/react-native/operationsInterfaces/expansionJobs.d.ts.map +1 -0
  229. package/dist/react-native/operationsInterfaces/expansionJobs.js +4 -0
  230. package/dist/react-native/operationsInterfaces/expansionJobs.js.map +1 -0
  231. package/dist/react-native/operationsInterfaces/index.d.ts +1 -0
  232. package/dist/react-native/operationsInterfaces/index.d.ts.map +1 -1
  233. package/dist/react-native/operationsInterfaces/index.js +1 -0
  234. package/dist/react-native/operationsInterfaces/index.js.map +1 -1
  235. package/dist/react-native/storageCacheManagementClient.d.ts +2 -1
  236. package/dist/react-native/storageCacheManagementClient.d.ts.map +1 -1
  237. package/dist/react-native/storageCacheManagementClient.js +5 -3
  238. package/dist/react-native/storageCacheManagementClient.js.map +1 -1
  239. package/package.json +26 -38
@@ -1,533 +1,592 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.StorageTargetsImpl = void 0;
6
- const tslib_1 = require("tslib");
7
- const pagingHelper_js_1 = require("../pagingHelper.js");
8
- const coreClient = tslib_1.__importStar(require("@azure/core-client"));
9
- const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
10
- const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
11
- const core_lro_1 = require("@azure/core-lro");
12
- const lroImpl_js_1 = require("../lroImpl.js");
13
- /// <reference lib="esnext.asynciterable" />
14
- /** Class containing StorageTargets operations. */
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var storageTargets_exports = {};
29
+ __export(storageTargets_exports, {
30
+ StorageTargetsImpl: () => StorageTargetsImpl
31
+ });
32
+ module.exports = __toCommonJS(storageTargets_exports);
33
+ var import_pagingHelper = require("../pagingHelper.js");
34
+ var coreClient = __toESM(require("@azure/core-client"));
35
+ var Mappers = __toESM(require("../models/mappers.js"));
36
+ var Parameters = __toESM(require("../models/parameters.js"));
37
+ var import_core_lro = require("@azure/core-lro");
38
+ var import_lroImpl = require("../lroImpl.js");
15
39
  class StorageTargetsImpl {
16
- client;
17
- /**
18
- * Initialize a new instance of the class StorageTargets class.
19
- * @param client Reference to the service client
20
- */
21
- constructor(client) {
22
- this.client = client;
40
+ client;
41
+ /**
42
+ * Initialize a new instance of the class StorageTargets class.
43
+ * @param client Reference to the service client
44
+ */
45
+ constructor(client) {
46
+ this.client = client;
47
+ }
48
+ /**
49
+ * Returns a list of Storage Targets for the specified cache.
50
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
51
+ * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from
52
+ * the [-0-9a-zA-Z_] char class.
53
+ * @param options The options parameters.
54
+ */
55
+ listByCache(resourceGroupName, cacheName, options) {
56
+ const iter = this.listByCachePagingAll(resourceGroupName, cacheName, options);
57
+ return {
58
+ next() {
59
+ return iter.next();
60
+ },
61
+ [Symbol.asyncIterator]() {
62
+ return this;
63
+ },
64
+ byPage: (settings) => {
65
+ if (settings?.maxPageSize) {
66
+ throw new Error("maxPageSize is not supported by this operation.");
67
+ }
68
+ return this.listByCachePagingPage(resourceGroupName, cacheName, options, settings);
69
+ }
70
+ };
71
+ }
72
+ async *listByCachePagingPage(resourceGroupName, cacheName, options, settings) {
73
+ let result;
74
+ let continuationToken = settings?.continuationToken;
75
+ if (!continuationToken) {
76
+ result = await this._listByCache(resourceGroupName, cacheName, options);
77
+ let page = result.value || [];
78
+ continuationToken = result.nextLink;
79
+ (0, import_pagingHelper.setContinuationToken)(page, continuationToken);
80
+ yield page;
23
81
  }
24
- /**
25
- * Returns a list of Storage Targets for the specified cache.
26
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
27
- * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from
28
- * the [-0-9a-zA-Z_] char class.
29
- * @param options The options parameters.
30
- */
31
- listByCache(resourceGroupName, cacheName, options) {
32
- const iter = this.listByCachePagingAll(resourceGroupName, cacheName, options);
33
- return {
34
- next() {
35
- return iter.next();
36
- },
37
- [Symbol.asyncIterator]() {
38
- return this;
39
- },
40
- byPage: (settings) => {
41
- if (settings?.maxPageSize) {
42
- throw new Error("maxPageSize is not supported by this operation.");
43
- }
44
- return this.listByCachePagingPage(resourceGroupName, cacheName, options, settings);
45
- },
46
- };
82
+ while (continuationToken) {
83
+ result = await this._listByCacheNext(
84
+ resourceGroupName,
85
+ cacheName,
86
+ continuationToken,
87
+ options
88
+ );
89
+ continuationToken = result.nextLink;
90
+ let page = result.value || [];
91
+ (0, import_pagingHelper.setContinuationToken)(page, continuationToken);
92
+ yield page;
47
93
  }
48
- async *listByCachePagingPage(resourceGroupName, cacheName, options, settings) {
49
- let result;
50
- let continuationToken = settings?.continuationToken;
51
- if (!continuationToken) {
52
- result = await this._listByCache(resourceGroupName, cacheName, options);
53
- let page = result.value || [];
54
- continuationToken = result.nextLink;
55
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
56
- yield page;
94
+ }
95
+ async *listByCachePagingAll(resourceGroupName, cacheName, options) {
96
+ for await (const page of this.listByCachePagingPage(resourceGroupName, cacheName, options)) {
97
+ yield* page;
98
+ }
99
+ }
100
+ /**
101
+ * Tells a storage target to refresh its DNS information.
102
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
103
+ * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from
104
+ * the [-0-9a-zA-Z_] char class.
105
+ * @param storageTargetName Name of Storage Target.
106
+ * @param options The options parameters.
107
+ */
108
+ async beginDnsRefresh(resourceGroupName, cacheName, storageTargetName, options) {
109
+ const directSendOperation = async (args, spec) => {
110
+ return this.client.sendOperationRequest(args, spec);
111
+ };
112
+ const sendOperationFn = async (args, spec) => {
113
+ let currentRawResponse = void 0;
114
+ const providedCallback = args.options?.onResponse;
115
+ const callback = (rawResponse, flatResponse2) => {
116
+ currentRawResponse = rawResponse;
117
+ providedCallback?.(rawResponse, flatResponse2);
118
+ };
119
+ const updatedArgs = {
120
+ ...args,
121
+ options: {
122
+ ...args.options,
123
+ onResponse: callback
57
124
  }
58
- while (continuationToken) {
59
- result = await this._listByCacheNext(resourceGroupName, cacheName, continuationToken, options);
60
- continuationToken = result.nextLink;
61
- let page = result.value || [];
62
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
63
- yield page;
125
+ };
126
+ const flatResponse = await directSendOperation(updatedArgs, spec);
127
+ return {
128
+ flatResponse,
129
+ rawResponse: {
130
+ statusCode: currentRawResponse.status,
131
+ body: currentRawResponse.parsedBody,
132
+ headers: currentRawResponse.headers.toJSON()
64
133
  }
65
- }
66
- async *listByCachePagingAll(resourceGroupName, cacheName, options) {
67
- for await (const page of this.listByCachePagingPage(resourceGroupName, cacheName, options)) {
68
- yield* page;
134
+ };
135
+ };
136
+ const lro = (0, import_lroImpl.createLroSpec)({
137
+ sendOperationFn,
138
+ args: { resourceGroupName, cacheName, storageTargetName, options },
139
+ spec: dnsRefreshOperationSpec
140
+ });
141
+ const poller = await (0, import_core_lro.createHttpPoller)(lro, {
142
+ restoreFrom: options?.resumeFrom,
143
+ intervalInMs: options?.updateIntervalInMs,
144
+ resourceLocationConfig: "azure-async-operation"
145
+ });
146
+ await poller.poll();
147
+ return poller;
148
+ }
149
+ /**
150
+ * Tells a storage target to refresh its DNS information.
151
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
152
+ * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from
153
+ * the [-0-9a-zA-Z_] char class.
154
+ * @param storageTargetName Name of Storage Target.
155
+ * @param options The options parameters.
156
+ */
157
+ async beginDnsRefreshAndWait(resourceGroupName, cacheName, storageTargetName, options) {
158
+ const poller = await this.beginDnsRefresh(
159
+ resourceGroupName,
160
+ cacheName,
161
+ storageTargetName,
162
+ options
163
+ );
164
+ return poller.pollUntilDone();
165
+ }
166
+ /**
167
+ * Returns a list of Storage Targets for the specified cache.
168
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
169
+ * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from
170
+ * the [-0-9a-zA-Z_] char class.
171
+ * @param options The options parameters.
172
+ */
173
+ _listByCache(resourceGroupName, cacheName, options) {
174
+ return this.client.sendOperationRequest(
175
+ { resourceGroupName, cacheName, options },
176
+ listByCacheOperationSpec
177
+ );
178
+ }
179
+ /**
180
+ * Removes a Storage Target from a cache. This operation is allowed at any time, but if the cache is
181
+ * down or unhealthy, the actual removal of the Storage Target may be delayed until the cache is
182
+ * healthy again. Note that if the cache has data to flush to the Storage Target, the data will be
183
+ * flushed before the Storage Target will be deleted.
184
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
185
+ * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from
186
+ * the [-0-9a-zA-Z_] char class.
187
+ * @param storageTargetName Name of Storage Target.
188
+ * @param options The options parameters.
189
+ */
190
+ async beginDelete(resourceGroupName, cacheName, storageTargetName, options) {
191
+ const directSendOperation = async (args, spec) => {
192
+ return this.client.sendOperationRequest(args, spec);
193
+ };
194
+ const sendOperationFn = async (args, spec) => {
195
+ let currentRawResponse = void 0;
196
+ const providedCallback = args.options?.onResponse;
197
+ const callback = (rawResponse, flatResponse2) => {
198
+ currentRawResponse = rawResponse;
199
+ providedCallback?.(rawResponse, flatResponse2);
200
+ };
201
+ const updatedArgs = {
202
+ ...args,
203
+ options: {
204
+ ...args.options,
205
+ onResponse: callback
69
206
  }
70
- }
71
- /**
72
- * Tells a storage target to refresh its DNS information.
73
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
74
- * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from
75
- * the [-0-9a-zA-Z_] char class.
76
- * @param storageTargetName Name of Storage Target.
77
- * @param options The options parameters.
78
- */
79
- async beginDnsRefresh(resourceGroupName, cacheName, storageTargetName, options) {
80
- const directSendOperation = async (args, spec) => {
81
- return this.client.sendOperationRequest(args, spec);
82
- };
83
- const sendOperationFn = async (args, spec) => {
84
- let currentRawResponse = undefined;
85
- const providedCallback = args.options?.onResponse;
86
- const callback = (rawResponse, flatResponse) => {
87
- currentRawResponse = rawResponse;
88
- providedCallback?.(rawResponse, flatResponse);
89
- };
90
- const updatedArgs = {
91
- ...args,
92
- options: {
93
- ...args.options,
94
- onResponse: callback,
95
- },
96
- };
97
- const flatResponse = await directSendOperation(updatedArgs, spec);
98
- return {
99
- flatResponse,
100
- rawResponse: {
101
- statusCode: currentRawResponse.status,
102
- body: currentRawResponse.parsedBody,
103
- headers: currentRawResponse.headers.toJSON(),
104
- },
105
- };
106
- };
107
- const lro = (0, lroImpl_js_1.createLroSpec)({
108
- sendOperationFn,
109
- args: { resourceGroupName, cacheName, storageTargetName, options },
110
- spec: dnsRefreshOperationSpec,
111
- });
112
- const poller = await (0, core_lro_1.createHttpPoller)(lro, {
113
- restoreFrom: options?.resumeFrom,
114
- intervalInMs: options?.updateIntervalInMs,
115
- resourceLocationConfig: "azure-async-operation",
116
- });
117
- await poller.poll();
118
- return poller;
119
- }
120
- /**
121
- * Tells a storage target to refresh its DNS information.
122
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
123
- * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from
124
- * the [-0-9a-zA-Z_] char class.
125
- * @param storageTargetName Name of Storage Target.
126
- * @param options The options parameters.
127
- */
128
- async beginDnsRefreshAndWait(resourceGroupName, cacheName, storageTargetName, options) {
129
- const poller = await this.beginDnsRefresh(resourceGroupName, cacheName, storageTargetName, options);
130
- return poller.pollUntilDone();
131
- }
132
- /**
133
- * Returns a list of Storage Targets for the specified cache.
134
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
135
- * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from
136
- * the [-0-9a-zA-Z_] char class.
137
- * @param options The options parameters.
138
- */
139
- _listByCache(resourceGroupName, cacheName, options) {
140
- return this.client.sendOperationRequest({ resourceGroupName, cacheName, options }, listByCacheOperationSpec);
141
- }
142
- /**
143
- * Removes a Storage Target from a cache. This operation is allowed at any time, but if the cache is
144
- * down or unhealthy, the actual removal of the Storage Target may be delayed until the cache is
145
- * healthy again. Note that if the cache has data to flush to the Storage Target, the data will be
146
- * flushed before the Storage Target will be deleted.
147
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
148
- * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from
149
- * the [-0-9a-zA-Z_] char class.
150
- * @param storageTargetName Name of Storage Target.
151
- * @param options The options parameters.
152
- */
153
- async beginDelete(resourceGroupName, cacheName, storageTargetName, options) {
154
- const directSendOperation = async (args, spec) => {
155
- return this.client.sendOperationRequest(args, spec);
156
- };
157
- const sendOperationFn = async (args, spec) => {
158
- let currentRawResponse = undefined;
159
- const providedCallback = args.options?.onResponse;
160
- const callback = (rawResponse, flatResponse) => {
161
- currentRawResponse = rawResponse;
162
- providedCallback?.(rawResponse, flatResponse);
163
- };
164
- const updatedArgs = {
165
- ...args,
166
- options: {
167
- ...args.options,
168
- onResponse: callback,
169
- },
170
- };
171
- const flatResponse = await directSendOperation(updatedArgs, spec);
172
- return {
173
- flatResponse,
174
- rawResponse: {
175
- statusCode: currentRawResponse.status,
176
- body: currentRawResponse.parsedBody,
177
- headers: currentRawResponse.headers.toJSON(),
178
- },
179
- };
180
- };
181
- const lro = (0, lroImpl_js_1.createLroSpec)({
182
- sendOperationFn,
183
- args: { resourceGroupName, cacheName, storageTargetName, options },
184
- spec: deleteOperationSpec,
185
- });
186
- const poller = await (0, core_lro_1.createHttpPoller)(lro, {
187
- restoreFrom: options?.resumeFrom,
188
- intervalInMs: options?.updateIntervalInMs,
189
- });
190
- await poller.poll();
191
- return poller;
192
- }
193
- /**
194
- * Removes a Storage Target from a cache. This operation is allowed at any time, but if the cache is
195
- * down or unhealthy, the actual removal of the Storage Target may be delayed until the cache is
196
- * healthy again. Note that if the cache has data to flush to the Storage Target, the data will be
197
- * flushed before the Storage Target will be deleted.
198
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
199
- * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from
200
- * the [-0-9a-zA-Z_] char class.
201
- * @param storageTargetName Name of Storage Target.
202
- * @param options The options parameters.
203
- */
204
- async beginDeleteAndWait(resourceGroupName, cacheName, storageTargetName, options) {
205
- const poller = await this.beginDelete(resourceGroupName, cacheName, storageTargetName, options);
206
- return poller.pollUntilDone();
207
- }
208
- /**
209
- * Returns a Storage Target from a cache.
210
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
211
- * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from
212
- * the [-0-9a-zA-Z_] char class.
213
- * @param storageTargetName Name of Storage Target.
214
- * @param options The options parameters.
215
- */
216
- get(resourceGroupName, cacheName, storageTargetName, options) {
217
- return this.client.sendOperationRequest({ resourceGroupName, cacheName, storageTargetName, options }, getOperationSpec);
218
- }
219
- /**
220
- * Create or update a Storage Target. This operation is allowed at any time, but if the cache is down
221
- * or unhealthy, the actual creation/modification of the Storage Target may be delayed until the cache
222
- * is healthy again.
223
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
224
- * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from
225
- * the [-0-9a-zA-Z_] char class.
226
- * @param storageTargetName Name of Storage Target.
227
- * @param storagetarget Object containing the definition of a Storage Target.
228
- * @param options The options parameters.
229
- */
230
- async beginCreateOrUpdate(resourceGroupName, cacheName, storageTargetName, storagetarget, options) {
231
- const directSendOperation = async (args, spec) => {
232
- return this.client.sendOperationRequest(args, spec);
233
- };
234
- const sendOperationFn = async (args, spec) => {
235
- let currentRawResponse = undefined;
236
- const providedCallback = args.options?.onResponse;
237
- const callback = (rawResponse, flatResponse) => {
238
- currentRawResponse = rawResponse;
239
- providedCallback?.(rawResponse, flatResponse);
240
- };
241
- const updatedArgs = {
242
- ...args,
243
- options: {
244
- ...args.options,
245
- onResponse: callback,
246
- },
247
- };
248
- const flatResponse = await directSendOperation(updatedArgs, spec);
249
- return {
250
- flatResponse,
251
- rawResponse: {
252
- statusCode: currentRawResponse.status,
253
- body: currentRawResponse.parsedBody,
254
- headers: currentRawResponse.headers.toJSON(),
255
- },
256
- };
257
- };
258
- const lro = (0, lroImpl_js_1.createLroSpec)({
259
- sendOperationFn,
260
- args: {
261
- resourceGroupName,
262
- cacheName,
263
- storageTargetName,
264
- storagetarget,
265
- options,
266
- },
267
- spec: createOrUpdateOperationSpec,
268
- });
269
- const poller = await (0, core_lro_1.createHttpPoller)(lro, {
270
- restoreFrom: options?.resumeFrom,
271
- intervalInMs: options?.updateIntervalInMs,
272
- });
273
- await poller.poll();
274
- return poller;
275
- }
276
- /**
277
- * Create or update a Storage Target. This operation is allowed at any time, but if the cache is down
278
- * or unhealthy, the actual creation/modification of the Storage Target may be delayed until the cache
279
- * is healthy again.
280
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
281
- * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from
282
- * the [-0-9a-zA-Z_] char class.
283
- * @param storageTargetName Name of Storage Target.
284
- * @param storagetarget Object containing the definition of a Storage Target.
285
- * @param options The options parameters.
286
- */
287
- async beginCreateOrUpdateAndWait(resourceGroupName, cacheName, storageTargetName, storagetarget, options) {
288
- const poller = await this.beginCreateOrUpdate(resourceGroupName, cacheName, storageTargetName, storagetarget, options);
289
- return poller.pollUntilDone();
290
- }
291
- /**
292
- * Tells a storage target to restore its settings to their default values.
293
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
294
- * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from
295
- * the [-0-9a-zA-Z_] char class.
296
- * @param storageTargetName Name of Storage Target.
297
- * @param options The options parameters.
298
- */
299
- async beginRestoreDefaults(resourceGroupName, cacheName, storageTargetName, options) {
300
- const directSendOperation = async (args, spec) => {
301
- return this.client.sendOperationRequest(args, spec);
302
- };
303
- const sendOperationFn = async (args, spec) => {
304
- let currentRawResponse = undefined;
305
- const providedCallback = args.options?.onResponse;
306
- const callback = (rawResponse, flatResponse) => {
307
- currentRawResponse = rawResponse;
308
- providedCallback?.(rawResponse, flatResponse);
309
- };
310
- const updatedArgs = {
311
- ...args,
312
- options: {
313
- ...args.options,
314
- onResponse: callback,
315
- },
316
- };
317
- const flatResponse = await directSendOperation(updatedArgs, spec);
318
- return {
319
- flatResponse,
320
- rawResponse: {
321
- statusCode: currentRawResponse.status,
322
- body: currentRawResponse.parsedBody,
323
- headers: currentRawResponse.headers.toJSON(),
324
- },
325
- };
326
- };
327
- const lro = (0, lroImpl_js_1.createLroSpec)({
328
- sendOperationFn,
329
- args: { resourceGroupName, cacheName, storageTargetName, options },
330
- spec: restoreDefaultsOperationSpec,
331
- });
332
- const poller = await (0, core_lro_1.createHttpPoller)(lro, {
333
- restoreFrom: options?.resumeFrom,
334
- intervalInMs: options?.updateIntervalInMs,
335
- resourceLocationConfig: "location",
336
- });
337
- await poller.poll();
338
- return poller;
339
- }
340
- /**
341
- * Tells a storage target to restore its settings to their default values.
342
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
343
- * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from
344
- * the [-0-9a-zA-Z_] char class.
345
- * @param storageTargetName Name of Storage Target.
346
- * @param options The options parameters.
347
- */
348
- async beginRestoreDefaultsAndWait(resourceGroupName, cacheName, storageTargetName, options) {
349
- const poller = await this.beginRestoreDefaults(resourceGroupName, cacheName, storageTargetName, options);
350
- return poller.pollUntilDone();
351
- }
352
- /**
353
- * ListByCacheNext
354
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
355
- * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from
356
- * the [-0-9a-zA-Z_] char class.
357
- * @param nextLink The nextLink from the previous successful call to the ListByCache method.
358
- * @param options The options parameters.
359
- */
360
- _listByCacheNext(resourceGroupName, cacheName, nextLink, options) {
361
- return this.client.sendOperationRequest({ resourceGroupName, cacheName, nextLink, options }, listByCacheNextOperationSpec);
362
- }
207
+ };
208
+ const flatResponse = await directSendOperation(updatedArgs, spec);
209
+ return {
210
+ flatResponse,
211
+ rawResponse: {
212
+ statusCode: currentRawResponse.status,
213
+ body: currentRawResponse.parsedBody,
214
+ headers: currentRawResponse.headers.toJSON()
215
+ }
216
+ };
217
+ };
218
+ const lro = (0, import_lroImpl.createLroSpec)({
219
+ sendOperationFn,
220
+ args: { resourceGroupName, cacheName, storageTargetName, options },
221
+ spec: deleteOperationSpec
222
+ });
223
+ const poller = await (0, import_core_lro.createHttpPoller)(lro, {
224
+ restoreFrom: options?.resumeFrom,
225
+ intervalInMs: options?.updateIntervalInMs
226
+ });
227
+ await poller.poll();
228
+ return poller;
229
+ }
230
+ /**
231
+ * Removes a Storage Target from a cache. This operation is allowed at any time, but if the cache is
232
+ * down or unhealthy, the actual removal of the Storage Target may be delayed until the cache is
233
+ * healthy again. Note that if the cache has data to flush to the Storage Target, the data will be
234
+ * flushed before the Storage Target will be deleted.
235
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
236
+ * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from
237
+ * the [-0-9a-zA-Z_] char class.
238
+ * @param storageTargetName Name of Storage Target.
239
+ * @param options The options parameters.
240
+ */
241
+ async beginDeleteAndWait(resourceGroupName, cacheName, storageTargetName, options) {
242
+ const poller = await this.beginDelete(resourceGroupName, cacheName, storageTargetName, options);
243
+ return poller.pollUntilDone();
244
+ }
245
+ /**
246
+ * Returns a Storage Target from a cache.
247
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
248
+ * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from
249
+ * the [-0-9a-zA-Z_] char class.
250
+ * @param storageTargetName Name of Storage Target.
251
+ * @param options The options parameters.
252
+ */
253
+ get(resourceGroupName, cacheName, storageTargetName, options) {
254
+ return this.client.sendOperationRequest(
255
+ { resourceGroupName, cacheName, storageTargetName, options },
256
+ getOperationSpec
257
+ );
258
+ }
259
+ /**
260
+ * Create or update a Storage Target. This operation is allowed at any time, but if the cache is down
261
+ * or unhealthy, the actual creation/modification of the Storage Target may be delayed until the cache
262
+ * is healthy again.
263
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
264
+ * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from
265
+ * the [-0-9a-zA-Z_] char class.
266
+ * @param storageTargetName Name of Storage Target.
267
+ * @param storagetarget Object containing the definition of a Storage Target.
268
+ * @param options The options parameters.
269
+ */
270
+ async beginCreateOrUpdate(resourceGroupName, cacheName, storageTargetName, storagetarget, options) {
271
+ const directSendOperation = async (args, spec) => {
272
+ return this.client.sendOperationRequest(args, spec);
273
+ };
274
+ const sendOperationFn = async (args, spec) => {
275
+ let currentRawResponse = void 0;
276
+ const providedCallback = args.options?.onResponse;
277
+ const callback = (rawResponse, flatResponse2) => {
278
+ currentRawResponse = rawResponse;
279
+ providedCallback?.(rawResponse, flatResponse2);
280
+ };
281
+ const updatedArgs = {
282
+ ...args,
283
+ options: {
284
+ ...args.options,
285
+ onResponse: callback
286
+ }
287
+ };
288
+ const flatResponse = await directSendOperation(updatedArgs, spec);
289
+ return {
290
+ flatResponse,
291
+ rawResponse: {
292
+ statusCode: currentRawResponse.status,
293
+ body: currentRawResponse.parsedBody,
294
+ headers: currentRawResponse.headers.toJSON()
295
+ }
296
+ };
297
+ };
298
+ const lro = (0, import_lroImpl.createLroSpec)({
299
+ sendOperationFn,
300
+ args: {
301
+ resourceGroupName,
302
+ cacheName,
303
+ storageTargetName,
304
+ storagetarget,
305
+ options
306
+ },
307
+ spec: createOrUpdateOperationSpec
308
+ });
309
+ const poller = await (0, import_core_lro.createHttpPoller)(lro, {
310
+ restoreFrom: options?.resumeFrom,
311
+ intervalInMs: options?.updateIntervalInMs
312
+ });
313
+ await poller.poll();
314
+ return poller;
315
+ }
316
+ /**
317
+ * Create or update a Storage Target. This operation is allowed at any time, but if the cache is down
318
+ * or unhealthy, the actual creation/modification of the Storage Target may be delayed until the cache
319
+ * is healthy again.
320
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
321
+ * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from
322
+ * the [-0-9a-zA-Z_] char class.
323
+ * @param storageTargetName Name of Storage Target.
324
+ * @param storagetarget Object containing the definition of a Storage Target.
325
+ * @param options The options parameters.
326
+ */
327
+ async beginCreateOrUpdateAndWait(resourceGroupName, cacheName, storageTargetName, storagetarget, options) {
328
+ const poller = await this.beginCreateOrUpdate(
329
+ resourceGroupName,
330
+ cacheName,
331
+ storageTargetName,
332
+ storagetarget,
333
+ options
334
+ );
335
+ return poller.pollUntilDone();
336
+ }
337
+ /**
338
+ * Tells a storage target to restore its settings to their default values.
339
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
340
+ * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from
341
+ * the [-0-9a-zA-Z_] char class.
342
+ * @param storageTargetName Name of Storage Target.
343
+ * @param options The options parameters.
344
+ */
345
+ async beginRestoreDefaults(resourceGroupName, cacheName, storageTargetName, options) {
346
+ const directSendOperation = async (args, spec) => {
347
+ return this.client.sendOperationRequest(args, spec);
348
+ };
349
+ const sendOperationFn = async (args, spec) => {
350
+ let currentRawResponse = void 0;
351
+ const providedCallback = args.options?.onResponse;
352
+ const callback = (rawResponse, flatResponse2) => {
353
+ currentRawResponse = rawResponse;
354
+ providedCallback?.(rawResponse, flatResponse2);
355
+ };
356
+ const updatedArgs = {
357
+ ...args,
358
+ options: {
359
+ ...args.options,
360
+ onResponse: callback
361
+ }
362
+ };
363
+ const flatResponse = await directSendOperation(updatedArgs, spec);
364
+ return {
365
+ flatResponse,
366
+ rawResponse: {
367
+ statusCode: currentRawResponse.status,
368
+ body: currentRawResponse.parsedBody,
369
+ headers: currentRawResponse.headers.toJSON()
370
+ }
371
+ };
372
+ };
373
+ const lro = (0, import_lroImpl.createLroSpec)({
374
+ sendOperationFn,
375
+ args: { resourceGroupName, cacheName, storageTargetName, options },
376
+ spec: restoreDefaultsOperationSpec
377
+ });
378
+ const poller = await (0, import_core_lro.createHttpPoller)(lro, {
379
+ restoreFrom: options?.resumeFrom,
380
+ intervalInMs: options?.updateIntervalInMs,
381
+ resourceLocationConfig: "location"
382
+ });
383
+ await poller.poll();
384
+ return poller;
385
+ }
386
+ /**
387
+ * Tells a storage target to restore its settings to their default values.
388
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
389
+ * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from
390
+ * the [-0-9a-zA-Z_] char class.
391
+ * @param storageTargetName Name of Storage Target.
392
+ * @param options The options parameters.
393
+ */
394
+ async beginRestoreDefaultsAndWait(resourceGroupName, cacheName, storageTargetName, options) {
395
+ const poller = await this.beginRestoreDefaults(
396
+ resourceGroupName,
397
+ cacheName,
398
+ storageTargetName,
399
+ options
400
+ );
401
+ return poller.pollUntilDone();
402
+ }
403
+ /**
404
+ * ListByCacheNext
405
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
406
+ * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from
407
+ * the [-0-9a-zA-Z_] char class.
408
+ * @param nextLink The nextLink from the previous successful call to the ListByCache method.
409
+ * @param options The options parameters.
410
+ */
411
+ _listByCacheNext(resourceGroupName, cacheName, nextLink, options) {
412
+ return this.client.sendOperationRequest(
413
+ { resourceGroupName, cacheName, nextLink, options },
414
+ listByCacheNextOperationSpec
415
+ );
416
+ }
363
417
  }
364
- exports.StorageTargetsImpl = StorageTargetsImpl;
365
- // Operation Specifications
366
- const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
418
+ const serializer = coreClient.createSerializer(
419
+ Mappers,
420
+ /* isXml */
421
+ false
422
+ );
367
423
  const dnsRefreshOperationSpec = {
368
- path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/dnsRefresh",
369
- httpMethod: "POST",
370
- responses: {
371
- 200: {},
372
- 201: {},
373
- 202: {},
374
- 204: {},
375
- default: {
376
- bodyMapper: Mappers.CloudError,
377
- },
378
- },
379
- queryParameters: [Parameters.apiVersion],
380
- urlParameters: [
381
- Parameters.$host,
382
- Parameters.subscriptionId,
383
- Parameters.resourceGroupName,
384
- Parameters.cacheName,
385
- Parameters.storageTargetName,
386
- ],
387
- headerParameters: [Parameters.accept],
388
- serializer,
424
+ path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/dnsRefresh",
425
+ httpMethod: "POST",
426
+ responses: {
427
+ 200: {},
428
+ 201: {},
429
+ 202: {},
430
+ 204: {},
431
+ default: {
432
+ bodyMapper: Mappers.CloudError
433
+ }
434
+ },
435
+ queryParameters: [Parameters.apiVersion],
436
+ urlParameters: [
437
+ Parameters.$host,
438
+ Parameters.subscriptionId,
439
+ Parameters.resourceGroupName,
440
+ Parameters.cacheName,
441
+ Parameters.storageTargetName
442
+ ],
443
+ headerParameters: [Parameters.accept],
444
+ serializer
389
445
  };
390
446
  const listByCacheOperationSpec = {
391
- path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets",
392
- httpMethod: "GET",
393
- responses: {
394
- 200: {
395
- bodyMapper: Mappers.StorageTargetsResult,
396
- },
397
- default: {
398
- bodyMapper: Mappers.CloudError,
399
- },
447
+ path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets",
448
+ httpMethod: "GET",
449
+ responses: {
450
+ 200: {
451
+ bodyMapper: Mappers.StorageTargetsResult
400
452
  },
401
- queryParameters: [Parameters.apiVersion],
402
- urlParameters: [
403
- Parameters.$host,
404
- Parameters.subscriptionId,
405
- Parameters.resourceGroupName,
406
- Parameters.cacheName,
407
- ],
408
- headerParameters: [Parameters.accept],
409
- serializer,
453
+ default: {
454
+ bodyMapper: Mappers.CloudError
455
+ }
456
+ },
457
+ queryParameters: [Parameters.apiVersion],
458
+ urlParameters: [
459
+ Parameters.$host,
460
+ Parameters.subscriptionId,
461
+ Parameters.resourceGroupName,
462
+ Parameters.cacheName
463
+ ],
464
+ headerParameters: [Parameters.accept],
465
+ serializer
410
466
  };
411
467
  const deleteOperationSpec = {
412
- path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}",
413
- httpMethod: "DELETE",
414
- responses: {
415
- 200: {},
416
- 201: {},
417
- 202: {},
418
- 204: {},
419
- default: {
420
- bodyMapper: Mappers.CloudError,
421
- },
422
- },
423
- queryParameters: [Parameters.apiVersion, Parameters.force],
424
- urlParameters: [
425
- Parameters.$host,
426
- Parameters.subscriptionId,
427
- Parameters.resourceGroupName,
428
- Parameters.cacheName,
429
- Parameters.storageTargetName,
430
- ],
431
- headerParameters: [Parameters.accept],
432
- serializer,
468
+ path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}",
469
+ httpMethod: "DELETE",
470
+ responses: {
471
+ 200: {},
472
+ 201: {},
473
+ 202: {},
474
+ 204: {},
475
+ default: {
476
+ bodyMapper: Mappers.CloudError
477
+ }
478
+ },
479
+ queryParameters: [Parameters.apiVersion, Parameters.force],
480
+ urlParameters: [
481
+ Parameters.$host,
482
+ Parameters.subscriptionId,
483
+ Parameters.resourceGroupName,
484
+ Parameters.cacheName,
485
+ Parameters.storageTargetName
486
+ ],
487
+ headerParameters: [Parameters.accept],
488
+ serializer
433
489
  };
434
490
  const getOperationSpec = {
435
- path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}",
436
- httpMethod: "GET",
437
- responses: {
438
- 200: {
439
- bodyMapper: Mappers.StorageTarget,
440
- },
441
- default: {
442
- bodyMapper: Mappers.CloudError,
443
- },
491
+ path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}",
492
+ httpMethod: "GET",
493
+ responses: {
494
+ 200: {
495
+ bodyMapper: Mappers.StorageTarget
444
496
  },
445
- queryParameters: [Parameters.apiVersion],
446
- urlParameters: [
447
- Parameters.$host,
448
- Parameters.subscriptionId,
449
- Parameters.resourceGroupName,
450
- Parameters.cacheName,
451
- Parameters.storageTargetName,
452
- ],
453
- headerParameters: [Parameters.accept],
454
- serializer,
497
+ default: {
498
+ bodyMapper: Mappers.CloudError
499
+ }
500
+ },
501
+ queryParameters: [Parameters.apiVersion],
502
+ urlParameters: [
503
+ Parameters.$host,
504
+ Parameters.subscriptionId,
505
+ Parameters.resourceGroupName,
506
+ Parameters.cacheName,
507
+ Parameters.storageTargetName
508
+ ],
509
+ headerParameters: [Parameters.accept],
510
+ serializer
455
511
  };
456
512
  const createOrUpdateOperationSpec = {
457
- path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}",
458
- httpMethod: "PUT",
459
- responses: {
460
- 200: {
461
- bodyMapper: Mappers.StorageTarget,
462
- },
463
- 201: {
464
- bodyMapper: Mappers.StorageTarget,
465
- },
466
- 202: {
467
- bodyMapper: Mappers.StorageTarget,
468
- },
469
- 204: {
470
- bodyMapper: Mappers.StorageTarget,
471
- },
472
- default: {
473
- bodyMapper: Mappers.CloudError,
474
- },
513
+ path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}",
514
+ httpMethod: "PUT",
515
+ responses: {
516
+ 200: {
517
+ bodyMapper: Mappers.StorageTarget
518
+ },
519
+ 201: {
520
+ bodyMapper: Mappers.StorageTarget
521
+ },
522
+ 202: {
523
+ bodyMapper: Mappers.StorageTarget
524
+ },
525
+ 204: {
526
+ bodyMapper: Mappers.StorageTarget
475
527
  },
476
- requestBody: Parameters.storagetarget,
477
- queryParameters: [Parameters.apiVersion],
478
- urlParameters: [
479
- Parameters.$host,
480
- Parameters.subscriptionId,
481
- Parameters.resourceGroupName,
482
- Parameters.cacheName,
483
- Parameters.storageTargetName,
484
- ],
485
- headerParameters: [Parameters.accept, Parameters.contentType],
486
- mediaType: "json",
487
- serializer,
528
+ default: {
529
+ bodyMapper: Mappers.CloudError
530
+ }
531
+ },
532
+ requestBody: Parameters.storagetarget,
533
+ queryParameters: [Parameters.apiVersion],
534
+ urlParameters: [
535
+ Parameters.$host,
536
+ Parameters.subscriptionId,
537
+ Parameters.resourceGroupName,
538
+ Parameters.cacheName,
539
+ Parameters.storageTargetName
540
+ ],
541
+ headerParameters: [Parameters.accept, Parameters.contentType],
542
+ mediaType: "json",
543
+ serializer
488
544
  };
489
545
  const restoreDefaultsOperationSpec = {
490
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/restoreDefaults",
491
- httpMethod: "POST",
492
- responses: {
493
- 200: {},
494
- 201: {},
495
- 202: {},
496
- 204: {},
497
- default: {
498
- bodyMapper: Mappers.CloudError,
499
- },
500
- },
501
- queryParameters: [Parameters.apiVersion],
502
- urlParameters: [
503
- Parameters.$host,
504
- Parameters.subscriptionId,
505
- Parameters.resourceGroupName,
506
- Parameters.cacheName,
507
- Parameters.storageTargetName,
508
- ],
509
- headerParameters: [Parameters.accept],
510
- serializer,
546
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/restoreDefaults",
547
+ httpMethod: "POST",
548
+ responses: {
549
+ 200: {},
550
+ 201: {},
551
+ 202: {},
552
+ 204: {},
553
+ default: {
554
+ bodyMapper: Mappers.CloudError
555
+ }
556
+ },
557
+ queryParameters: [Parameters.apiVersion],
558
+ urlParameters: [
559
+ Parameters.$host,
560
+ Parameters.subscriptionId,
561
+ Parameters.resourceGroupName,
562
+ Parameters.cacheName,
563
+ Parameters.storageTargetName
564
+ ],
565
+ headerParameters: [Parameters.accept],
566
+ serializer
511
567
  };
512
568
  const listByCacheNextOperationSpec = {
513
- path: "{nextLink}",
514
- httpMethod: "GET",
515
- responses: {
516
- 200: {
517
- bodyMapper: Mappers.StorageTargetsResult,
518
- },
519
- default: {
520
- bodyMapper: Mappers.CloudError,
521
- },
569
+ path: "{nextLink}",
570
+ httpMethod: "GET",
571
+ responses: {
572
+ 200: {
573
+ bodyMapper: Mappers.StorageTargetsResult
522
574
  },
523
- urlParameters: [
524
- Parameters.$host,
525
- Parameters.subscriptionId,
526
- Parameters.resourceGroupName,
527
- Parameters.nextLink,
528
- Parameters.cacheName,
529
- ],
530
- headerParameters: [Parameters.accept],
531
- serializer,
575
+ default: {
576
+ bodyMapper: Mappers.CloudError
577
+ }
578
+ },
579
+ urlParameters: [
580
+ Parameters.$host,
581
+ Parameters.subscriptionId,
582
+ Parameters.resourceGroupName,
583
+ Parameters.nextLink,
584
+ Parameters.cacheName
585
+ ],
586
+ headerParameters: [Parameters.accept],
587
+ serializer
532
588
  };
533
- //# sourceMappingURL=storageTargets.js.map
589
+ // Annotate the CommonJS export names for ESM import in node:
590
+ 0 && (module.exports = {
591
+ StorageTargetsImpl
592
+ });