@azure/arm-storagecache 8.0.1-alpha.20250717.1 → 8.0.1-alpha.20250718.2

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 (115) hide show
  1. package/dist/browser/lroImpl.js +7 -3
  2. package/dist/browser/lroImpl.js.map +1 -1
  3. package/dist/browser/models/mappers.js +88 -42
  4. package/dist/browser/models/mappers.js.map +1 -1
  5. package/dist/browser/operations/amlFilesystems.js +78 -97
  6. package/dist/browser/operations/amlFilesystems.js.map +1 -1
  7. package/dist/browser/operations/ascOperations.js +1 -0
  8. package/dist/browser/operations/ascOperations.js.map +1 -1
  9. package/dist/browser/operations/ascUsages.js +23 -40
  10. package/dist/browser/operations/ascUsages.js.map +1 -1
  11. package/dist/browser/operations/caches.js +188 -157
  12. package/dist/browser/operations/caches.js.map +1 -1
  13. package/dist/browser/operations/importJobs.js +56 -58
  14. package/dist/browser/operations/importJobs.js.map +1 -1
  15. package/dist/browser/operations/operations.js +23 -40
  16. package/dist/browser/operations/operations.js.map +1 -1
  17. package/dist/browser/operations/skus.js +23 -40
  18. package/dist/browser/operations/skus.js.map +1 -1
  19. package/dist/browser/operations/storageTargetOperations.js +45 -24
  20. package/dist/browser/operations/storageTargetOperations.js.map +1 -1
  21. package/dist/browser/operations/storageTargets.js +67 -64
  22. package/dist/browser/operations/storageTargets.js.map +1 -1
  23. package/dist/browser/operations/usageModels.js +23 -40
  24. package/dist/browser/operations/usageModels.js.map +1 -1
  25. package/dist/browser/pagingHelper.js +2 -4
  26. package/dist/browser/pagingHelper.js.map +1 -1
  27. package/dist/browser/storageCacheManagementClient.js +23 -5
  28. package/dist/browser/storageCacheManagementClient.js.map +1 -1
  29. package/dist/commonjs/lroImpl.js +7 -3
  30. package/dist/commonjs/lroImpl.js.map +1 -1
  31. package/dist/commonjs/models/mappers.js +88 -42
  32. package/dist/commonjs/models/mappers.js.map +1 -1
  33. package/dist/commonjs/operations/amlFilesystems.js +78 -96
  34. package/dist/commonjs/operations/amlFilesystems.js.map +1 -1
  35. package/dist/commonjs/operations/ascOperations.js +1 -0
  36. package/dist/commonjs/operations/ascOperations.js.map +1 -1
  37. package/dist/commonjs/operations/ascUsages.js +23 -39
  38. package/dist/commonjs/operations/ascUsages.js.map +1 -1
  39. package/dist/commonjs/operations/caches.js +188 -156
  40. package/dist/commonjs/operations/caches.js.map +1 -1
  41. package/dist/commonjs/operations/importJobs.js +56 -57
  42. package/dist/commonjs/operations/importJobs.js.map +1 -1
  43. package/dist/commonjs/operations/operations.js +23 -39
  44. package/dist/commonjs/operations/operations.js.map +1 -1
  45. package/dist/commonjs/operations/skus.js +23 -39
  46. package/dist/commonjs/operations/skus.js.map +1 -1
  47. package/dist/commonjs/operations/storageTargetOperations.js +45 -24
  48. package/dist/commonjs/operations/storageTargetOperations.js.map +1 -1
  49. package/dist/commonjs/operations/storageTargets.js +67 -63
  50. package/dist/commonjs/operations/storageTargets.js.map +1 -1
  51. package/dist/commonjs/operations/usageModels.js +23 -39
  52. package/dist/commonjs/operations/usageModels.js.map +1 -1
  53. package/dist/commonjs/pagingHelper.js +2 -4
  54. package/dist/commonjs/pagingHelper.js.map +1 -1
  55. package/dist/commonjs/storageCacheManagementClient.js +23 -5
  56. package/dist/commonjs/storageCacheManagementClient.js.map +1 -1
  57. package/dist/commonjs/tsdoc-metadata.json +11 -11
  58. package/dist/esm/lroImpl.js +7 -3
  59. package/dist/esm/lroImpl.js.map +1 -1
  60. package/dist/esm/models/mappers.js +88 -42
  61. package/dist/esm/models/mappers.js.map +1 -1
  62. package/dist/esm/operations/amlFilesystems.js +78 -97
  63. package/dist/esm/operations/amlFilesystems.js.map +1 -1
  64. package/dist/esm/operations/ascOperations.js +1 -0
  65. package/dist/esm/operations/ascOperations.js.map +1 -1
  66. package/dist/esm/operations/ascUsages.js +23 -40
  67. package/dist/esm/operations/ascUsages.js.map +1 -1
  68. package/dist/esm/operations/caches.js +188 -157
  69. package/dist/esm/operations/caches.js.map +1 -1
  70. package/dist/esm/operations/importJobs.js +56 -58
  71. package/dist/esm/operations/importJobs.js.map +1 -1
  72. package/dist/esm/operations/operations.js +23 -40
  73. package/dist/esm/operations/operations.js.map +1 -1
  74. package/dist/esm/operations/skus.js +23 -40
  75. package/dist/esm/operations/skus.js.map +1 -1
  76. package/dist/esm/operations/storageTargetOperations.js +45 -24
  77. package/dist/esm/operations/storageTargetOperations.js.map +1 -1
  78. package/dist/esm/operations/storageTargets.js +67 -64
  79. package/dist/esm/operations/storageTargets.js.map +1 -1
  80. package/dist/esm/operations/usageModels.js +23 -40
  81. package/dist/esm/operations/usageModels.js.map +1 -1
  82. package/dist/esm/pagingHelper.js +2 -4
  83. package/dist/esm/pagingHelper.js.map +1 -1
  84. package/dist/esm/storageCacheManagementClient.js +23 -5
  85. package/dist/esm/storageCacheManagementClient.js.map +1 -1
  86. package/dist/react-native/lroImpl.js +7 -3
  87. package/dist/react-native/lroImpl.js.map +1 -1
  88. package/dist/react-native/models/mappers.js +88 -42
  89. package/dist/react-native/models/mappers.js.map +1 -1
  90. package/dist/react-native/operations/amlFilesystems.js +78 -97
  91. package/dist/react-native/operations/amlFilesystems.js.map +1 -1
  92. package/dist/react-native/operations/ascOperations.js +1 -0
  93. package/dist/react-native/operations/ascOperations.js.map +1 -1
  94. package/dist/react-native/operations/ascUsages.js +23 -40
  95. package/dist/react-native/operations/ascUsages.js.map +1 -1
  96. package/dist/react-native/operations/caches.js +188 -157
  97. package/dist/react-native/operations/caches.js.map +1 -1
  98. package/dist/react-native/operations/importJobs.js +56 -58
  99. package/dist/react-native/operations/importJobs.js.map +1 -1
  100. package/dist/react-native/operations/operations.js +23 -40
  101. package/dist/react-native/operations/operations.js.map +1 -1
  102. package/dist/react-native/operations/skus.js +23 -40
  103. package/dist/react-native/operations/skus.js.map +1 -1
  104. package/dist/react-native/operations/storageTargetOperations.js +45 -24
  105. package/dist/react-native/operations/storageTargetOperations.js.map +1 -1
  106. package/dist/react-native/operations/storageTargets.js +67 -64
  107. package/dist/react-native/operations/storageTargets.js.map +1 -1
  108. package/dist/react-native/operations/usageModels.js +23 -40
  109. package/dist/react-native/operations/usageModels.js.map +1 -1
  110. package/dist/react-native/pagingHelper.js +2 -4
  111. package/dist/react-native/pagingHelper.js.map +1 -1
  112. package/dist/react-native/storageCacheManagementClient.js +23 -5
  113. package/dist/react-native/storageCacheManagementClient.js.map +1 -1
  114. package/package.json +2 -2
  115. package/review/arm-storagecache-node.api.md +1647 -1647
@@ -16,6 +16,7 @@ const core_lro_1 = require("@azure/core-lro");
16
16
  const lroImpl_js_1 = require("../lroImpl.js");
17
17
  /** Class containing StorageTargetOperations operations. */
18
18
  class StorageTargetOperationsImpl {
19
+ client;
19
20
  /**
20
21
  * Initialize a new instance of the class StorageTargetOperations class.
21
22
  * @param client Reference to the service client
@@ -37,14 +38,19 @@ class StorageTargetOperationsImpl {
37
38
  return this.client.sendOperationRequest(args, spec);
38
39
  };
39
40
  const sendOperationFn = async (args, spec) => {
40
- var _a;
41
41
  let currentRawResponse = undefined;
42
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
42
+ const providedCallback = args.options?.onResponse;
43
43
  const callback = (rawResponse, flatResponse) => {
44
44
  currentRawResponse = rawResponse;
45
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
45
+ providedCallback?.(rawResponse, flatResponse);
46
+ };
47
+ const updatedArgs = {
48
+ ...args,
49
+ options: {
50
+ ...args.options,
51
+ onResponse: callback,
52
+ },
46
53
  };
47
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
48
54
  const flatResponse = await directSendOperation(updatedArgs, spec);
49
55
  return {
50
56
  flatResponse,
@@ -61,8 +67,8 @@ class StorageTargetOperationsImpl {
61
67
  spec: flushOperationSpec,
62
68
  });
63
69
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
64
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
65
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
70
+ restoreFrom: options?.resumeFrom,
71
+ intervalInMs: options?.updateIntervalInMs,
66
72
  resourceLocationConfig: "azure-async-operation",
67
73
  });
68
74
  await poller.poll();
@@ -94,14 +100,19 @@ class StorageTargetOperationsImpl {
94
100
  return this.client.sendOperationRequest(args, spec);
95
101
  };
96
102
  const sendOperationFn = async (args, spec) => {
97
- var _a;
98
103
  let currentRawResponse = undefined;
99
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
104
+ const providedCallback = args.options?.onResponse;
100
105
  const callback = (rawResponse, flatResponse) => {
101
106
  currentRawResponse = rawResponse;
102
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
107
+ providedCallback?.(rawResponse, flatResponse);
108
+ };
109
+ const updatedArgs = {
110
+ ...args,
111
+ options: {
112
+ ...args.options,
113
+ onResponse: callback,
114
+ },
103
115
  };
104
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
105
116
  const flatResponse = await directSendOperation(updatedArgs, spec);
106
117
  return {
107
118
  flatResponse,
@@ -118,8 +129,8 @@ class StorageTargetOperationsImpl {
118
129
  spec: suspendOperationSpec,
119
130
  });
120
131
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
121
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
122
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
132
+ restoreFrom: options?.resumeFrom,
133
+ intervalInMs: options?.updateIntervalInMs,
123
134
  resourceLocationConfig: "azure-async-operation",
124
135
  });
125
136
  await poller.poll();
@@ -150,14 +161,19 @@ class StorageTargetOperationsImpl {
150
161
  return this.client.sendOperationRequest(args, spec);
151
162
  };
152
163
  const sendOperationFn = async (args, spec) => {
153
- var _a;
154
164
  let currentRawResponse = undefined;
155
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
165
+ const providedCallback = args.options?.onResponse;
156
166
  const callback = (rawResponse, flatResponse) => {
157
167
  currentRawResponse = rawResponse;
158
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
168
+ providedCallback?.(rawResponse, flatResponse);
169
+ };
170
+ const updatedArgs = {
171
+ ...args,
172
+ options: {
173
+ ...args.options,
174
+ onResponse: callback,
175
+ },
159
176
  };
160
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
161
177
  const flatResponse = await directSendOperation(updatedArgs, spec);
162
178
  return {
163
179
  flatResponse,
@@ -174,8 +190,8 @@ class StorageTargetOperationsImpl {
174
190
  spec: resumeOperationSpec,
175
191
  });
176
192
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
177
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
178
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
193
+ restoreFrom: options?.resumeFrom,
194
+ intervalInMs: options?.updateIntervalInMs,
179
195
  resourceLocationConfig: "azure-async-operation",
180
196
  });
181
197
  await poller.poll();
@@ -207,14 +223,19 @@ class StorageTargetOperationsImpl {
207
223
  return this.client.sendOperationRequest(args, spec);
208
224
  };
209
225
  const sendOperationFn = async (args, spec) => {
210
- var _a;
211
226
  let currentRawResponse = undefined;
212
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
227
+ const providedCallback = args.options?.onResponse;
213
228
  const callback = (rawResponse, flatResponse) => {
214
229
  currentRawResponse = rawResponse;
215
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
230
+ providedCallback?.(rawResponse, flatResponse);
231
+ };
232
+ const updatedArgs = {
233
+ ...args,
234
+ options: {
235
+ ...args.options,
236
+ onResponse: callback,
237
+ },
216
238
  };
217
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
218
239
  const flatResponse = await directSendOperation(updatedArgs, spec);
219
240
  return {
220
241
  flatResponse,
@@ -231,8 +252,8 @@ class StorageTargetOperationsImpl {
231
252
  spec: invalidateOperationSpec,
232
253
  });
233
254
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
234
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
235
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
255
+ restoreFrom: options?.resumeFrom,
256
+ intervalInMs: options?.updateIntervalInMs,
236
257
  resourceLocationConfig: "azure-async-operation",
237
258
  });
238
259
  await poller.poll();
@@ -1 +1 @@
1
- {"version":3,"file":"storageTargetOperations.js","sourceRoot":"","sources":["../../../src/operations/storageTargetOperations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAQ9C,2DAA2D;AAC3D,MAAa,2BAA2B;IAGtC;;;OAGG;IACH,YAAY,MAAoC;QAC9C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,UAAU,CACd,iBAAyB,EACzB,SAAiB,EACjB,iBAAyB,EACzB,OAA0C;QAE1C,MAAM,mBAAmB,GAAG,KAAK,EAC/B,IAAmC,EACnC,IAA8B,EACf,EAAE;YACjB,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACtD,CAAC,CAAC;QACF,MAAM,eAAe,GAAG,KAAK,EAC3B,IAAmC,EACnC,IAA8B,EAC9B,EAAE;;YACF,IAAI,kBAAkB,GACpB,SAAS,CAAC;YACZ,MAAM,gBAAgB,GAAG,MAAA,IAAI,CAAC,OAAO,0CAAE,UAAU,CAAC;YAClD,MAAM,QAAQ,GAAmC,CAC/C,WAA6C,EAC7C,YAAqB,EACrB,EAAE;gBACF,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,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,iBAAiB;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { StorageTargetOperations } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { StorageCacheManagementClient } from \"../storageCacheManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n StorageTargetFlushOptionalParams,\n StorageTargetSuspendOptionalParams,\n StorageTargetResumeOptionalParams,\n StorageTargetInvalidateOptionalParams,\n} from \"../models/index.js\";\n\n/** Class containing StorageTargetOperations operations. */\nexport class StorageTargetOperationsImpl implements StorageTargetOperations {\n private readonly client: StorageCacheManagementClient;\n\n /**\n * Initialize a new instance of the class StorageTargetOperations class.\n * @param client Reference to the service client\n */\n constructor(client: StorageCacheManagementClient) {\n this.client = client;\n }\n\n /**\n * Tells the cache to write all dirty data to the Storage Target's backend storage. Client requests to\n * this storage target's namespace will return errors until the flush operation completes.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from\n * the [-0-9a-zA-Z_] char class.\n * @param storageTargetName Name of Storage Target.\n * @param options The options parameters.\n */\n async beginFlush(\n resourceGroupName: string,\n cacheName: string,\n storageTargetName: string,\n options?: StorageTargetFlushOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, cacheName, storageTargetName, options },\n spec: flushOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Tells the cache to write all dirty data to the Storage Target's backend storage. Client requests to\n * this storage target's namespace will return errors until the flush operation completes.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from\n * the [-0-9a-zA-Z_] char class.\n * @param storageTargetName Name of Storage Target.\n * @param options The options parameters.\n */\n async beginFlushAndWait(\n resourceGroupName: string,\n cacheName: string,\n storageTargetName: string,\n options?: StorageTargetFlushOptionalParams,\n ): Promise<void> {\n const poller = await this.beginFlush(\n resourceGroupName,\n cacheName,\n storageTargetName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Suspends client access to a storage target.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from\n * the [-0-9a-zA-Z_] char class.\n * @param storageTargetName Name of Storage Target.\n * @param options The options parameters.\n */\n async beginSuspend(\n resourceGroupName: string,\n cacheName: string,\n storageTargetName: string,\n options?: StorageTargetSuspendOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, cacheName, storageTargetName, options },\n spec: suspendOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Suspends client access to a storage target.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from\n * the [-0-9a-zA-Z_] char class.\n * @param storageTargetName Name of Storage Target.\n * @param options The options parameters.\n */\n async beginSuspendAndWait(\n resourceGroupName: string,\n cacheName: string,\n storageTargetName: string,\n options?: StorageTargetSuspendOptionalParams,\n ): Promise<void> {\n const poller = await this.beginSuspend(\n resourceGroupName,\n cacheName,\n storageTargetName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Resumes client access to a previously suspended storage target.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from\n * the [-0-9a-zA-Z_] char class.\n * @param storageTargetName Name of Storage Target.\n * @param options The options parameters.\n */\n async beginResume(\n resourceGroupName: string,\n cacheName: string,\n storageTargetName: string,\n options?: StorageTargetResumeOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, cacheName, storageTargetName, options },\n spec: resumeOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Resumes client access to a previously suspended storage target.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from\n * the [-0-9a-zA-Z_] char class.\n * @param storageTargetName Name of Storage Target.\n * @param options The options parameters.\n */\n async beginResumeAndWait(\n resourceGroupName: string,\n cacheName: string,\n storageTargetName: string,\n options?: StorageTargetResumeOptionalParams,\n ): Promise<void> {\n const poller = await this.beginResume(\n resourceGroupName,\n cacheName,\n storageTargetName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Invalidate all cached data for a storage target. Cached files are discarded and fetched from the\n * back end on the next request.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from\n * the [-0-9a-zA-Z_] char class.\n * @param storageTargetName Name of Storage Target.\n * @param options The options parameters.\n */\n async beginInvalidate(\n resourceGroupName: string,\n cacheName: string,\n storageTargetName: string,\n options?: StorageTargetInvalidateOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, cacheName, storageTargetName, options },\n spec: invalidateOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Invalidate all cached data for a storage target. Cached files are discarded and fetched from the\n * back end on the next request.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from\n * the [-0-9a-zA-Z_] char class.\n * @param storageTargetName Name of Storage Target.\n * @param options The options parameters.\n */\n async beginInvalidateAndWait(\n resourceGroupName: string,\n cacheName: string,\n storageTargetName: string,\n options?: StorageTargetInvalidateOptionalParams,\n ): Promise<void> {\n const poller = await this.beginInvalidate(\n resourceGroupName,\n cacheName,\n storageTargetName,\n options,\n );\n return poller.pollUntilDone();\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst flushOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/flush\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.storageTargetName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst suspendOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/suspend\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.storageTargetName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst resumeOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/resume\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.storageTargetName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst invalidateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/invalidate\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.storageTargetName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"storageTargetOperations.js","sourceRoot":"","sources":["../../../src/operations/storageTargetOperations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAQ9C,2DAA2D;AAC3D,MAAa,2BAA2B;IACrB,MAAM,CAA+B;IAEtD;;;OAGG;IACH,YAAY,MAAoC;QAC9C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,UAAU,CACd,iBAAyB,EACzB,SAAiB,EACjB,iBAAyB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,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,iBAAiB;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { StorageTargetOperations } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { StorageCacheManagementClient } from \"../storageCacheManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n StorageTargetFlushOptionalParams,\n StorageTargetSuspendOptionalParams,\n StorageTargetResumeOptionalParams,\n StorageTargetInvalidateOptionalParams,\n} from \"../models/index.js\";\n\n/** Class containing StorageTargetOperations operations. */\nexport class StorageTargetOperationsImpl implements StorageTargetOperations {\n private readonly client: StorageCacheManagementClient;\n\n /**\n * Initialize a new instance of the class StorageTargetOperations class.\n * @param client Reference to the service client\n */\n constructor(client: StorageCacheManagementClient) {\n this.client = client;\n }\n\n /**\n * Tells the cache to write all dirty data to the Storage Target's backend storage. Client requests to\n * this storage target's namespace will return errors until the flush operation completes.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from\n * the [-0-9a-zA-Z_] char class.\n * @param storageTargetName Name of Storage Target.\n * @param options The options parameters.\n */\n async beginFlush(\n resourceGroupName: string,\n cacheName: string,\n storageTargetName: string,\n options?: StorageTargetFlushOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, cacheName, storageTargetName, options },\n spec: flushOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Tells the cache to write all dirty data to the Storage Target's backend storage. Client requests to\n * this storage target's namespace will return errors until the flush operation completes.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from\n * the [-0-9a-zA-Z_] char class.\n * @param storageTargetName Name of Storage Target.\n * @param options The options parameters.\n */\n async beginFlushAndWait(\n resourceGroupName: string,\n cacheName: string,\n storageTargetName: string,\n options?: StorageTargetFlushOptionalParams,\n ): Promise<void> {\n const poller = await this.beginFlush(\n resourceGroupName,\n cacheName,\n storageTargetName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Suspends client access to a storage target.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from\n * the [-0-9a-zA-Z_] char class.\n * @param storageTargetName Name of Storage Target.\n * @param options The options parameters.\n */\n async beginSuspend(\n resourceGroupName: string,\n cacheName: string,\n storageTargetName: string,\n options?: StorageTargetSuspendOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, cacheName, storageTargetName, options },\n spec: suspendOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Suspends client access to a storage target.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from\n * the [-0-9a-zA-Z_] char class.\n * @param storageTargetName Name of Storage Target.\n * @param options The options parameters.\n */\n async beginSuspendAndWait(\n resourceGroupName: string,\n cacheName: string,\n storageTargetName: string,\n options?: StorageTargetSuspendOptionalParams,\n ): Promise<void> {\n const poller = await this.beginSuspend(\n resourceGroupName,\n cacheName,\n storageTargetName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Resumes client access to a previously suspended storage target.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from\n * the [-0-9a-zA-Z_] char class.\n * @param storageTargetName Name of Storage Target.\n * @param options The options parameters.\n */\n async beginResume(\n resourceGroupName: string,\n cacheName: string,\n storageTargetName: string,\n options?: StorageTargetResumeOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, cacheName, storageTargetName, options },\n spec: resumeOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Resumes client access to a previously suspended storage target.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from\n * the [-0-9a-zA-Z_] char class.\n * @param storageTargetName Name of Storage Target.\n * @param options The options parameters.\n */\n async beginResumeAndWait(\n resourceGroupName: string,\n cacheName: string,\n storageTargetName: string,\n options?: StorageTargetResumeOptionalParams,\n ): Promise<void> {\n const poller = await this.beginResume(\n resourceGroupName,\n cacheName,\n storageTargetName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Invalidate all cached data for a storage target. Cached files are discarded and fetched from the\n * back end on the next request.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from\n * the [-0-9a-zA-Z_] char class.\n * @param storageTargetName Name of Storage Target.\n * @param options The options parameters.\n */\n async beginInvalidate(\n resourceGroupName: string,\n cacheName: string,\n storageTargetName: string,\n options?: StorageTargetInvalidateOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, cacheName, storageTargetName, options },\n spec: invalidateOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Invalidate all cached data for a storage target. Cached files are discarded and fetched from the\n * back end on the next request.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param cacheName Name of cache. Length of name must not be greater than 80 and chars must be from\n * the [-0-9a-zA-Z_] char class.\n * @param storageTargetName Name of Storage Target.\n * @param options The options parameters.\n */\n async beginInvalidateAndWait(\n resourceGroupName: string,\n cacheName: string,\n storageTargetName: string,\n options?: StorageTargetInvalidateOptionalParams,\n ): Promise<void> {\n const poller = await this.beginInvalidate(\n resourceGroupName,\n cacheName,\n storageTargetName,\n options,\n );\n return poller.pollUntilDone();\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst flushOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/flush\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.storageTargetName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst suspendOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/suspend\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.storageTargetName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst resumeOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/resume\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.storageTargetName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst invalidateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/invalidate\",\n httpMethod: \"POST\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.cacheName,\n Parameters.storageTargetName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
18
18
  /// <reference lib="esnext.asynciterable" />
19
19
  /** Class containing StorageTargets operations. */
20
20
  class StorageTargetsImpl {
21
+ client;
21
22
  /**
22
23
  * Initialize a new instance of the class StorageTargets class.
23
24
  * @param client Reference to the service client
@@ -42,52 +43,35 @@ class StorageTargetsImpl {
42
43
  return this;
43
44
  },
44
45
  byPage: (settings) => {
45
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
46
+ if (settings?.maxPageSize) {
46
47
  throw new Error("maxPageSize is not supported by this operation.");
47
48
  }
48
49
  return this.listByCachePagingPage(resourceGroupName, cacheName, options, settings);
49
50
  },
50
51
  };
51
52
  }
52
- listByCachePagingPage(resourceGroupName, cacheName, options, settings) {
53
- return tslib_1.__asyncGenerator(this, arguments, function* listByCachePagingPage_1() {
54
- let result;
55
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
56
- if (!continuationToken) {
57
- result = yield tslib_1.__await(this._listByCache(resourceGroupName, cacheName, options));
58
- let page = result.value || [];
59
- continuationToken = result.nextLink;
60
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
61
- yield yield tslib_1.__await(page);
62
- }
63
- while (continuationToken) {
64
- result = yield tslib_1.__await(this._listByCacheNext(resourceGroupName, cacheName, continuationToken, options));
65
- continuationToken = result.nextLink;
66
- let page = result.value || [];
67
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
68
- yield yield tslib_1.__await(page);
69
- }
70
- });
53
+ async *listByCachePagingPage(resourceGroupName, cacheName, options, settings) {
54
+ let result;
55
+ let continuationToken = settings?.continuationToken;
56
+ if (!continuationToken) {
57
+ result = await this._listByCache(resourceGroupName, cacheName, options);
58
+ let page = result.value || [];
59
+ continuationToken = result.nextLink;
60
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
61
+ yield page;
62
+ }
63
+ while (continuationToken) {
64
+ result = await this._listByCacheNext(resourceGroupName, cacheName, continuationToken, options);
65
+ continuationToken = result.nextLink;
66
+ let page = result.value || [];
67
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
68
+ yield page;
69
+ }
71
70
  }
72
- listByCachePagingAll(resourceGroupName, cacheName, options) {
73
- return tslib_1.__asyncGenerator(this, arguments, function* listByCachePagingAll_1() {
74
- var _a, e_1, _b, _c;
75
- try {
76
- for (var _d = true, _e = tslib_1.__asyncValues(this.listByCachePagingPage(resourceGroupName, cacheName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
77
- _c = _f.value;
78
- _d = false;
79
- const page = _c;
80
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
81
- }
82
- }
83
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
84
- finally {
85
- try {
86
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
87
- }
88
- finally { if (e_1) throw e_1.error; }
89
- }
90
- });
71
+ async *listByCachePagingAll(resourceGroupName, cacheName, options) {
72
+ for await (const page of this.listByCachePagingPage(resourceGroupName, cacheName, options)) {
73
+ yield* page;
74
+ }
91
75
  }
92
76
  /**
93
77
  * Tells a storage target to refresh its DNS information.
@@ -102,14 +86,19 @@ class StorageTargetsImpl {
102
86
  return this.client.sendOperationRequest(args, spec);
103
87
  };
104
88
  const sendOperationFn = async (args, spec) => {
105
- var _a;
106
89
  let currentRawResponse = undefined;
107
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
90
+ const providedCallback = args.options?.onResponse;
108
91
  const callback = (rawResponse, flatResponse) => {
109
92
  currentRawResponse = rawResponse;
110
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
93
+ providedCallback?.(rawResponse, flatResponse);
94
+ };
95
+ const updatedArgs = {
96
+ ...args,
97
+ options: {
98
+ ...args.options,
99
+ onResponse: callback,
100
+ },
111
101
  };
112
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
113
102
  const flatResponse = await directSendOperation(updatedArgs, spec);
114
103
  return {
115
104
  flatResponse,
@@ -126,8 +115,8 @@ class StorageTargetsImpl {
126
115
  spec: dnsRefreshOperationSpec,
127
116
  });
128
117
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
129
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
130
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
118
+ restoreFrom: options?.resumeFrom,
119
+ intervalInMs: options?.updateIntervalInMs,
131
120
  resourceLocationConfig: "azure-async-operation",
132
121
  });
133
122
  await poller.poll();
@@ -171,14 +160,19 @@ class StorageTargetsImpl {
171
160
  return this.client.sendOperationRequest(args, spec);
172
161
  };
173
162
  const sendOperationFn = async (args, spec) => {
174
- var _a;
175
163
  let currentRawResponse = undefined;
176
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
164
+ const providedCallback = args.options?.onResponse;
177
165
  const callback = (rawResponse, flatResponse) => {
178
166
  currentRawResponse = rawResponse;
179
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
167
+ providedCallback?.(rawResponse, flatResponse);
168
+ };
169
+ const updatedArgs = {
170
+ ...args,
171
+ options: {
172
+ ...args.options,
173
+ onResponse: callback,
174
+ },
180
175
  };
181
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
182
176
  const flatResponse = await directSendOperation(updatedArgs, spec);
183
177
  return {
184
178
  flatResponse,
@@ -195,8 +189,8 @@ class StorageTargetsImpl {
195
189
  spec: deleteOperationSpec,
196
190
  });
197
191
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
198
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
199
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
192
+ restoreFrom: options?.resumeFrom,
193
+ intervalInMs: options?.updateIntervalInMs,
200
194
  });
201
195
  await poller.poll();
202
196
  return poller;
@@ -243,14 +237,19 @@ class StorageTargetsImpl {
243
237
  return this.client.sendOperationRequest(args, spec);
244
238
  };
245
239
  const sendOperationFn = async (args, spec) => {
246
- var _a;
247
240
  let currentRawResponse = undefined;
248
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
241
+ const providedCallback = args.options?.onResponse;
249
242
  const callback = (rawResponse, flatResponse) => {
250
243
  currentRawResponse = rawResponse;
251
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
244
+ providedCallback?.(rawResponse, flatResponse);
245
+ };
246
+ const updatedArgs = {
247
+ ...args,
248
+ options: {
249
+ ...args.options,
250
+ onResponse: callback,
251
+ },
252
252
  };
253
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
254
253
  const flatResponse = await directSendOperation(updatedArgs, spec);
255
254
  return {
256
255
  flatResponse,
@@ -273,8 +272,8 @@ class StorageTargetsImpl {
273
272
  spec: createOrUpdateOperationSpec,
274
273
  });
275
274
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
276
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
277
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
275
+ restoreFrom: options?.resumeFrom,
276
+ intervalInMs: options?.updateIntervalInMs,
278
277
  });
279
278
  await poller.poll();
280
279
  return poller;
@@ -307,14 +306,19 @@ class StorageTargetsImpl {
307
306
  return this.client.sendOperationRequest(args, spec);
308
307
  };
309
308
  const sendOperationFn = async (args, spec) => {
310
- var _a;
311
309
  let currentRawResponse = undefined;
312
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
310
+ const providedCallback = args.options?.onResponse;
313
311
  const callback = (rawResponse, flatResponse) => {
314
312
  currentRawResponse = rawResponse;
315
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
313
+ providedCallback?.(rawResponse, flatResponse);
314
+ };
315
+ const updatedArgs = {
316
+ ...args,
317
+ options: {
318
+ ...args.options,
319
+ onResponse: callback,
320
+ },
316
321
  };
317
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
318
322
  const flatResponse = await directSendOperation(updatedArgs, spec);
319
323
  return {
320
324
  flatResponse,
@@ -331,8 +335,8 @@ class StorageTargetsImpl {
331
335
  spec: restoreDefaultsOperationSpec,
332
336
  });
333
337
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
334
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
335
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
338
+ restoreFrom: options?.resumeFrom,
339
+ intervalInMs: options?.updateIntervalInMs,
336
340
  resourceLocationConfig: "location",
337
341
  });
338
342
  await poller.poll();