@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
@@ -12,6 +12,7 @@ import { createHttpPoller, } from "@azure/core-lro";
12
12
  import { createLroSpec } from "../lroImpl.js";
13
13
  /** Class containing StorageTargetOperations operations. */
14
14
  export class StorageTargetOperationsImpl {
15
+ client;
15
16
  /**
16
17
  * Initialize a new instance of the class StorageTargetOperations class.
17
18
  * @param client Reference to the service client
@@ -33,14 +34,19 @@ export class StorageTargetOperationsImpl {
33
34
  return this.client.sendOperationRequest(args, spec);
34
35
  };
35
36
  const sendOperationFn = async (args, spec) => {
36
- var _a;
37
37
  let currentRawResponse = undefined;
38
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
38
+ const providedCallback = args.options?.onResponse;
39
39
  const callback = (rawResponse, flatResponse) => {
40
40
  currentRawResponse = rawResponse;
41
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
41
+ providedCallback?.(rawResponse, flatResponse);
42
+ };
43
+ const updatedArgs = {
44
+ ...args,
45
+ options: {
46
+ ...args.options,
47
+ onResponse: callback,
48
+ },
42
49
  };
43
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
44
50
  const flatResponse = await directSendOperation(updatedArgs, spec);
45
51
  return {
46
52
  flatResponse,
@@ -57,8 +63,8 @@ export class StorageTargetOperationsImpl {
57
63
  spec: flushOperationSpec,
58
64
  });
59
65
  const poller = await createHttpPoller(lro, {
60
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
61
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
66
+ restoreFrom: options?.resumeFrom,
67
+ intervalInMs: options?.updateIntervalInMs,
62
68
  resourceLocationConfig: "azure-async-operation",
63
69
  });
64
70
  await poller.poll();
@@ -90,14 +96,19 @@ export class StorageTargetOperationsImpl {
90
96
  return this.client.sendOperationRequest(args, spec);
91
97
  };
92
98
  const sendOperationFn = async (args, spec) => {
93
- var _a;
94
99
  let currentRawResponse = undefined;
95
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
100
+ const providedCallback = args.options?.onResponse;
96
101
  const callback = (rawResponse, flatResponse) => {
97
102
  currentRawResponse = rawResponse;
98
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
103
+ providedCallback?.(rawResponse, flatResponse);
104
+ };
105
+ const updatedArgs = {
106
+ ...args,
107
+ options: {
108
+ ...args.options,
109
+ onResponse: callback,
110
+ },
99
111
  };
100
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
101
112
  const flatResponse = await directSendOperation(updatedArgs, spec);
102
113
  return {
103
114
  flatResponse,
@@ -114,8 +125,8 @@ export class StorageTargetOperationsImpl {
114
125
  spec: suspendOperationSpec,
115
126
  });
116
127
  const poller = await createHttpPoller(lro, {
117
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
118
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
128
+ restoreFrom: options?.resumeFrom,
129
+ intervalInMs: options?.updateIntervalInMs,
119
130
  resourceLocationConfig: "azure-async-operation",
120
131
  });
121
132
  await poller.poll();
@@ -146,14 +157,19 @@ export class StorageTargetOperationsImpl {
146
157
  return this.client.sendOperationRequest(args, spec);
147
158
  };
148
159
  const sendOperationFn = async (args, spec) => {
149
- var _a;
150
160
  let currentRawResponse = undefined;
151
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
161
+ const providedCallback = args.options?.onResponse;
152
162
  const callback = (rawResponse, flatResponse) => {
153
163
  currentRawResponse = rawResponse;
154
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
164
+ providedCallback?.(rawResponse, flatResponse);
165
+ };
166
+ const updatedArgs = {
167
+ ...args,
168
+ options: {
169
+ ...args.options,
170
+ onResponse: callback,
171
+ },
155
172
  };
156
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
157
173
  const flatResponse = await directSendOperation(updatedArgs, spec);
158
174
  return {
159
175
  flatResponse,
@@ -170,8 +186,8 @@ export class StorageTargetOperationsImpl {
170
186
  spec: resumeOperationSpec,
171
187
  });
172
188
  const poller = await createHttpPoller(lro, {
173
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
174
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
189
+ restoreFrom: options?.resumeFrom,
190
+ intervalInMs: options?.updateIntervalInMs,
175
191
  resourceLocationConfig: "azure-async-operation",
176
192
  });
177
193
  await poller.poll();
@@ -203,14 +219,19 @@ export class StorageTargetOperationsImpl {
203
219
  return this.client.sendOperationRequest(args, spec);
204
220
  };
205
221
  const sendOperationFn = async (args, spec) => {
206
- var _a;
207
222
  let currentRawResponse = undefined;
208
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
223
+ const providedCallback = args.options?.onResponse;
209
224
  const callback = (rawResponse, flatResponse) => {
210
225
  currentRawResponse = rawResponse;
211
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
226
+ providedCallback?.(rawResponse, flatResponse);
227
+ };
228
+ const updatedArgs = {
229
+ ...args,
230
+ options: {
231
+ ...args.options,
232
+ onResponse: callback,
233
+ },
212
234
  };
213
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
214
235
  const flatResponse = await directSendOperation(updatedArgs, spec);
215
236
  return {
216
237
  flatResponse,
@@ -227,8 +248,8 @@ export class StorageTargetOperationsImpl {
227
248
  spec: invalidateOperationSpec,
228
249
  });
229
250
  const poller = await createHttpPoller(lro, {
230
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
231
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
251
+ restoreFrom: options?.resumeFrom,
252
+ intervalInMs: options?.updateIntervalInMs,
232
253
  resourceLocationConfig: "azure-async-operation",
233
254
  });
234
255
  await poller.poll();
@@ -1 +1 @@
1
- {"version":3,"file":"storageTargetOperations.js","sourceRoot":"","sources":["../../../src/operations/storageTargetOperations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAQ9C,2DAA2D;AAC3D,MAAM,OAAO,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,G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,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"]}
1
+ {"version":3,"file":"storageTargetOperations.js","sourceRoot":"","sources":["../../../src/operations/storageTargetOperations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAQ9C,2DAA2D;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AiB;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,uBAAuB,GAA6B;IACxD,IAAI,EAAE,sKAAsK;IAC5K,UAAU,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"]}
@@ -5,7 +5,6 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
8
  import { setContinuationToken } from "../pagingHelper.js";
10
9
  import * as coreClient from "@azure/core-client";
11
10
  import * as Mappers from "../models/mappers.js";
@@ -15,6 +14,7 @@ import { createLroSpec } from "../lroImpl.js";
15
14
  /// <reference lib="esnext.asynciterable" />
16
15
  /** Class containing StorageTargets operations. */
17
16
  export class StorageTargetsImpl {
17
+ client;
18
18
  /**
19
19
  * Initialize a new instance of the class StorageTargets class.
20
20
  * @param client Reference to the service client
@@ -39,52 +39,35 @@ export class StorageTargetsImpl {
39
39
  return this;
40
40
  },
41
41
  byPage: (settings) => {
42
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
42
+ if (settings?.maxPageSize) {
43
43
  throw new Error("maxPageSize is not supported by this operation.");
44
44
  }
45
45
  return this.listByCachePagingPage(resourceGroupName, cacheName, options, settings);
46
46
  },
47
47
  };
48
48
  }
49
- listByCachePagingPage(resourceGroupName, cacheName, options, settings) {
50
- return __asyncGenerator(this, arguments, function* listByCachePagingPage_1() {
51
- let result;
52
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
53
- if (!continuationToken) {
54
- result = yield __await(this._listByCache(resourceGroupName, cacheName, options));
55
- let page = result.value || [];
56
- continuationToken = result.nextLink;
57
- setContinuationToken(page, continuationToken);
58
- yield yield __await(page);
59
- }
60
- while (continuationToken) {
61
- result = yield __await(this._listByCacheNext(resourceGroupName, cacheName, continuationToken, options));
62
- continuationToken = result.nextLink;
63
- let page = result.value || [];
64
- setContinuationToken(page, continuationToken);
65
- yield yield __await(page);
66
- }
67
- });
49
+ async *listByCachePagingPage(resourceGroupName, cacheName, options, settings) {
50
+ let result;
51
+ let continuationToken = settings?.continuationToken;
52
+ if (!continuationToken) {
53
+ result = await this._listByCache(resourceGroupName, cacheName, options);
54
+ let page = result.value || [];
55
+ continuationToken = result.nextLink;
56
+ setContinuationToken(page, continuationToken);
57
+ yield page;
58
+ }
59
+ while (continuationToken) {
60
+ result = await this._listByCacheNext(resourceGroupName, cacheName, continuationToken, options);
61
+ continuationToken = result.nextLink;
62
+ let page = result.value || [];
63
+ setContinuationToken(page, continuationToken);
64
+ yield page;
65
+ }
68
66
  }
69
- listByCachePagingAll(resourceGroupName, cacheName, options) {
70
- return __asyncGenerator(this, arguments, function* listByCachePagingAll_1() {
71
- var _a, e_1, _b, _c;
72
- try {
73
- for (var _d = true, _e = __asyncValues(this.listByCachePagingPage(resourceGroupName, cacheName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
74
- _c = _f.value;
75
- _d = false;
76
- const page = _c;
77
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
78
- }
79
- }
80
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
81
- finally {
82
- try {
83
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
84
- }
85
- finally { if (e_1) throw e_1.error; }
86
- }
87
- });
67
+ async *listByCachePagingAll(resourceGroupName, cacheName, options) {
68
+ for await (const page of this.listByCachePagingPage(resourceGroupName, cacheName, options)) {
69
+ yield* page;
70
+ }
88
71
  }
89
72
  /**
90
73
  * Tells a storage target to refresh its DNS information.
@@ -99,14 +82,19 @@ export class StorageTargetsImpl {
99
82
  return this.client.sendOperationRequest(args, spec);
100
83
  };
101
84
  const sendOperationFn = async (args, spec) => {
102
- var _a;
103
85
  let currentRawResponse = undefined;
104
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
86
+ const providedCallback = args.options?.onResponse;
105
87
  const callback = (rawResponse, flatResponse) => {
106
88
  currentRawResponse = rawResponse;
107
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
89
+ providedCallback?.(rawResponse, flatResponse);
90
+ };
91
+ const updatedArgs = {
92
+ ...args,
93
+ options: {
94
+ ...args.options,
95
+ onResponse: callback,
96
+ },
108
97
  };
109
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
110
98
  const flatResponse = await directSendOperation(updatedArgs, spec);
111
99
  return {
112
100
  flatResponse,
@@ -123,8 +111,8 @@ export class StorageTargetsImpl {
123
111
  spec: dnsRefreshOperationSpec,
124
112
  });
125
113
  const poller = await createHttpPoller(lro, {
126
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
127
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
114
+ restoreFrom: options?.resumeFrom,
115
+ intervalInMs: options?.updateIntervalInMs,
128
116
  resourceLocationConfig: "azure-async-operation",
129
117
  });
130
118
  await poller.poll();
@@ -168,14 +156,19 @@ export class StorageTargetsImpl {
168
156
  return this.client.sendOperationRequest(args, spec);
169
157
  };
170
158
  const sendOperationFn = async (args, spec) => {
171
- var _a;
172
159
  let currentRawResponse = undefined;
173
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
160
+ const providedCallback = args.options?.onResponse;
174
161
  const callback = (rawResponse, flatResponse) => {
175
162
  currentRawResponse = rawResponse;
176
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
163
+ providedCallback?.(rawResponse, flatResponse);
164
+ };
165
+ const updatedArgs = {
166
+ ...args,
167
+ options: {
168
+ ...args.options,
169
+ onResponse: callback,
170
+ },
177
171
  };
178
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
179
172
  const flatResponse = await directSendOperation(updatedArgs, spec);
180
173
  return {
181
174
  flatResponse,
@@ -192,8 +185,8 @@ export class StorageTargetsImpl {
192
185
  spec: deleteOperationSpec,
193
186
  });
194
187
  const poller = await createHttpPoller(lro, {
195
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
196
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
188
+ restoreFrom: options?.resumeFrom,
189
+ intervalInMs: options?.updateIntervalInMs,
197
190
  });
198
191
  await poller.poll();
199
192
  return poller;
@@ -240,14 +233,19 @@ export class StorageTargetsImpl {
240
233
  return this.client.sendOperationRequest(args, spec);
241
234
  };
242
235
  const sendOperationFn = async (args, spec) => {
243
- var _a;
244
236
  let currentRawResponse = undefined;
245
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
237
+ const providedCallback = args.options?.onResponse;
246
238
  const callback = (rawResponse, flatResponse) => {
247
239
  currentRawResponse = rawResponse;
248
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
240
+ providedCallback?.(rawResponse, flatResponse);
241
+ };
242
+ const updatedArgs = {
243
+ ...args,
244
+ options: {
245
+ ...args.options,
246
+ onResponse: callback,
247
+ },
249
248
  };
250
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
251
249
  const flatResponse = await directSendOperation(updatedArgs, spec);
252
250
  return {
253
251
  flatResponse,
@@ -270,8 +268,8 @@ export class StorageTargetsImpl {
270
268
  spec: createOrUpdateOperationSpec,
271
269
  });
272
270
  const poller = await createHttpPoller(lro, {
273
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
274
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
271
+ restoreFrom: options?.resumeFrom,
272
+ intervalInMs: options?.updateIntervalInMs,
275
273
  });
276
274
  await poller.poll();
277
275
  return poller;
@@ -304,14 +302,19 @@ export class StorageTargetsImpl {
304
302
  return this.client.sendOperationRequest(args, spec);
305
303
  };
306
304
  const sendOperationFn = async (args, spec) => {
307
- var _a;
308
305
  let currentRawResponse = undefined;
309
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
306
+ const providedCallback = args.options?.onResponse;
310
307
  const callback = (rawResponse, flatResponse) => {
311
308
  currentRawResponse = rawResponse;
312
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
309
+ providedCallback?.(rawResponse, flatResponse);
310
+ };
311
+ const updatedArgs = {
312
+ ...args,
313
+ options: {
314
+ ...args.options,
315
+ onResponse: callback,
316
+ },
313
317
  };
314
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
315
318
  const flatResponse = await directSendOperation(updatedArgs, spec);
316
319
  return {
317
320
  flatResponse,
@@ -328,8 +331,8 @@ export class StorageTargetsImpl {
328
331
  spec: restoreDefaultsOperationSpec,
329
332
  });
330
333
  const poller = await createHttpPoller(lro, {
331
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
332
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
334
+ restoreFrom: options?.resumeFrom,
335
+ intervalInMs: options?.updateIntervalInMs,
333
336
  resourceLocationConfig: "location",
334
337
  });
335
338
  await poller.poll();