@azure/arm-rediscache 8.2.1-alpha.20250618.1 → 8.2.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 +176 -80
  4. package/dist/browser/models/mappers.js.map +1 -1
  5. package/dist/browser/operations/accessPolicy.js +45 -52
  6. package/dist/browser/operations/accessPolicy.js.map +1 -1
  7. package/dist/browser/operations/accessPolicyAssignment.js +45 -52
  8. package/dist/browser/operations/accessPolicyAssignment.js.map +1 -1
  9. package/dist/browser/operations/asyncOperationStatus.js +1 -0
  10. package/dist/browser/operations/asyncOperationStatus.js.map +1 -1
  11. package/dist/browser/operations/firewallRules.js +23 -40
  12. package/dist/browser/operations/firewallRules.js.map +1 -1
  13. package/dist/browser/operations/linkedServer.js +45 -52
  14. package/dist/browser/operations/linkedServer.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/patchSchedules.js +23 -40
  18. package/dist/browser/operations/patchSchedules.js.map +1 -1
  19. package/dist/browser/operations/privateEndpointConnections.js +21 -33
  20. package/dist/browser/operations/privateEndpointConnections.js.map +1 -1
  21. package/dist/browser/operations/privateLinkResources.js +10 -27
  22. package/dist/browser/operations/privateLinkResources.js.map +1 -1
  23. package/dist/browser/operations/redis.js +136 -157
  24. package/dist/browser/operations/redis.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/redisManagementClient.js +23 -5
  28. package/dist/browser/redisManagementClient.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 +176 -80
  32. package/dist/commonjs/models/mappers.js.map +1 -1
  33. package/dist/commonjs/operations/accessPolicy.js +45 -51
  34. package/dist/commonjs/operations/accessPolicy.js.map +1 -1
  35. package/dist/commonjs/operations/accessPolicyAssignment.js +45 -51
  36. package/dist/commonjs/operations/accessPolicyAssignment.js.map +1 -1
  37. package/dist/commonjs/operations/asyncOperationStatus.js +1 -0
  38. package/dist/commonjs/operations/asyncOperationStatus.js.map +1 -1
  39. package/dist/commonjs/operations/firewallRules.js +23 -39
  40. package/dist/commonjs/operations/firewallRules.js.map +1 -1
  41. package/dist/commonjs/operations/linkedServer.js +45 -51
  42. package/dist/commonjs/operations/linkedServer.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/patchSchedules.js +23 -39
  46. package/dist/commonjs/operations/patchSchedules.js.map +1 -1
  47. package/dist/commonjs/operations/privateEndpointConnections.js +21 -32
  48. package/dist/commonjs/operations/privateEndpointConnections.js.map +1 -1
  49. package/dist/commonjs/operations/privateLinkResources.js +10 -26
  50. package/dist/commonjs/operations/privateLinkResources.js.map +1 -1
  51. package/dist/commonjs/operations/redis.js +136 -156
  52. package/dist/commonjs/operations/redis.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/redisManagementClient.js +23 -5
  56. package/dist/commonjs/redisManagementClient.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 +176 -80
  61. package/dist/esm/models/mappers.js.map +1 -1
  62. package/dist/esm/operations/accessPolicy.js +45 -52
  63. package/dist/esm/operations/accessPolicy.js.map +1 -1
  64. package/dist/esm/operations/accessPolicyAssignment.js +45 -52
  65. package/dist/esm/operations/accessPolicyAssignment.js.map +1 -1
  66. package/dist/esm/operations/asyncOperationStatus.js +1 -0
  67. package/dist/esm/operations/asyncOperationStatus.js.map +1 -1
  68. package/dist/esm/operations/firewallRules.js +23 -40
  69. package/dist/esm/operations/firewallRules.js.map +1 -1
  70. package/dist/esm/operations/linkedServer.js +45 -52
  71. package/dist/esm/operations/linkedServer.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/patchSchedules.js +23 -40
  75. package/dist/esm/operations/patchSchedules.js.map +1 -1
  76. package/dist/esm/operations/privateEndpointConnections.js +21 -33
  77. package/dist/esm/operations/privateEndpointConnections.js.map +1 -1
  78. package/dist/esm/operations/privateLinkResources.js +10 -27
  79. package/dist/esm/operations/privateLinkResources.js.map +1 -1
  80. package/dist/esm/operations/redis.js +136 -157
  81. package/dist/esm/operations/redis.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/redisManagementClient.js +23 -5
  85. package/dist/esm/redisManagementClient.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 +176 -80
  89. package/dist/react-native/models/mappers.js.map +1 -1
  90. package/dist/react-native/operations/accessPolicy.js +45 -52
  91. package/dist/react-native/operations/accessPolicy.js.map +1 -1
  92. package/dist/react-native/operations/accessPolicyAssignment.js +45 -52
  93. package/dist/react-native/operations/accessPolicyAssignment.js.map +1 -1
  94. package/dist/react-native/operations/asyncOperationStatus.js +1 -0
  95. package/dist/react-native/operations/asyncOperationStatus.js.map +1 -1
  96. package/dist/react-native/operations/firewallRules.js +23 -40
  97. package/dist/react-native/operations/firewallRules.js.map +1 -1
  98. package/dist/react-native/operations/linkedServer.js +45 -52
  99. package/dist/react-native/operations/linkedServer.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/patchSchedules.js +23 -40
  103. package/dist/react-native/operations/patchSchedules.js.map +1 -1
  104. package/dist/react-native/operations/privateEndpointConnections.js +21 -33
  105. package/dist/react-native/operations/privateEndpointConnections.js.map +1 -1
  106. package/dist/react-native/operations/privateLinkResources.js +10 -27
  107. package/dist/react-native/operations/privateLinkResources.js.map +1 -1
  108. package/dist/react-native/operations/redis.js +136 -157
  109. package/dist/react-native/operations/redis.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/redisManagementClient.js +23 -5
  113. package/dist/react-native/redisManagementClient.js.map +1 -1
  114. package/package.json +2 -2
  115. /package/review/{arm-rediscache.api.md → arm-rediscache-node.api.md} +0 -0
@@ -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 Redis operations. */
17
16
  export class RedisImpl {
17
+ client;
18
18
  /**
19
19
  * Initialize a new instance of the class Redis class.
20
20
  * @param client Reference to the service client
@@ -39,52 +39,35 @@ export class RedisImpl {
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.listUpgradeNotificationsPagingPage(resourceGroupName, name, history, options, settings);
46
46
  },
47
47
  };
48
48
  }
49
- listUpgradeNotificationsPagingPage(resourceGroupName, name, history, options, settings) {
50
- return __asyncGenerator(this, arguments, function* listUpgradeNotificationsPagingPage_1() {
51
- let result;
52
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
53
- if (!continuationToken) {
54
- result = yield __await(this._listUpgradeNotifications(resourceGroupName, name, history, 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._listUpgradeNotificationsNext(resourceGroupName, name, continuationToken, options));
62
- continuationToken = result.nextLink;
63
- let page = result.value || [];
64
- setContinuationToken(page, continuationToken);
65
- yield yield __await(page);
66
- }
67
- });
68
- }
69
- listUpgradeNotificationsPagingAll(resourceGroupName, name, history, options) {
70
- return __asyncGenerator(this, arguments, function* listUpgradeNotificationsPagingAll_1() {
71
- var _a, e_1, _b, _c;
72
- try {
73
- for (var _d = true, _e = __asyncValues(this.listUpgradeNotificationsPagingPage(resourceGroupName, name, history, 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
- });
49
+ async *listUpgradeNotificationsPagingPage(resourceGroupName, name, history, options, settings) {
50
+ let result;
51
+ let continuationToken = settings?.continuationToken;
52
+ if (!continuationToken) {
53
+ result = await this._listUpgradeNotifications(resourceGroupName, name, history, 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._listUpgradeNotificationsNext(resourceGroupName, name, continuationToken, options);
61
+ continuationToken = result.nextLink;
62
+ let page = result.value || [];
63
+ setContinuationToken(page, continuationToken);
64
+ yield page;
65
+ }
66
+ }
67
+ async *listUpgradeNotificationsPagingAll(resourceGroupName, name, history, options) {
68
+ for await (const page of this.listUpgradeNotificationsPagingPage(resourceGroupName, name, history, options)) {
69
+ yield* page;
70
+ }
88
71
  }
89
72
  /**
90
73
  * Lists all Redis caches in a resource group.
@@ -101,52 +84,35 @@ export class RedisImpl {
101
84
  return this;
102
85
  },
103
86
  byPage: (settings) => {
104
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
87
+ if (settings?.maxPageSize) {
105
88
  throw new Error("maxPageSize is not supported by this operation.");
106
89
  }
107
90
  return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
108
91
  },
109
92
  };
110
93
  }
111
- listByResourceGroupPagingPage(resourceGroupName, options, settings) {
112
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
113
- let result;
114
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
115
- if (!continuationToken) {
116
- result = yield __await(this._listByResourceGroup(resourceGroupName, options));
117
- let page = result.value || [];
118
- continuationToken = result.nextLink;
119
- setContinuationToken(page, continuationToken);
120
- yield yield __await(page);
121
- }
122
- while (continuationToken) {
123
- result = yield __await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
124
- continuationToken = result.nextLink;
125
- let page = result.value || [];
126
- setContinuationToken(page, continuationToken);
127
- yield yield __await(page);
128
- }
129
- });
130
- }
131
- listByResourceGroupPagingAll(resourceGroupName, options) {
132
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
133
- var _a, e_2, _b, _c;
134
- try {
135
- for (var _d = true, _e = __asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
136
- _c = _f.value;
137
- _d = false;
138
- const page = _c;
139
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
140
- }
141
- }
142
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
143
- finally {
144
- try {
145
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
146
- }
147
- finally { if (e_2) throw e_2.error; }
148
- }
149
- });
94
+ async *listByResourceGroupPagingPage(resourceGroupName, options, settings) {
95
+ let result;
96
+ let continuationToken = settings?.continuationToken;
97
+ if (!continuationToken) {
98
+ result = await this._listByResourceGroup(resourceGroupName, options);
99
+ let page = result.value || [];
100
+ continuationToken = result.nextLink;
101
+ setContinuationToken(page, continuationToken);
102
+ yield page;
103
+ }
104
+ while (continuationToken) {
105
+ result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options);
106
+ continuationToken = result.nextLink;
107
+ let page = result.value || [];
108
+ setContinuationToken(page, continuationToken);
109
+ yield page;
110
+ }
111
+ }
112
+ async *listByResourceGroupPagingAll(resourceGroupName, options) {
113
+ for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
114
+ yield* page;
115
+ }
150
116
  }
151
117
  /**
152
118
  * Gets all Redis caches in the specified subscription.
@@ -162,52 +128,35 @@ export class RedisImpl {
162
128
  return this;
163
129
  },
164
130
  byPage: (settings) => {
165
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
131
+ if (settings?.maxPageSize) {
166
132
  throw new Error("maxPageSize is not supported by this operation.");
167
133
  }
168
134
  return this.listBySubscriptionPagingPage(options, settings);
169
135
  },
170
136
  };
171
137
  }
172
- listBySubscriptionPagingPage(options, settings) {
173
- return __asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
174
- let result;
175
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
176
- if (!continuationToken) {
177
- result = yield __await(this._listBySubscription(options));
178
- let page = result.value || [];
179
- continuationToken = result.nextLink;
180
- setContinuationToken(page, continuationToken);
181
- yield yield __await(page);
182
- }
183
- while (continuationToken) {
184
- result = yield __await(this._listBySubscriptionNext(continuationToken, options));
185
- continuationToken = result.nextLink;
186
- let page = result.value || [];
187
- setContinuationToken(page, continuationToken);
188
- yield yield __await(page);
189
- }
190
- });
191
- }
192
- listBySubscriptionPagingAll(options) {
193
- return __asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
194
- var _a, e_3, _b, _c;
195
- try {
196
- for (var _d = true, _e = __asyncValues(this.listBySubscriptionPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
197
- _c = _f.value;
198
- _d = false;
199
- const page = _c;
200
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
201
- }
202
- }
203
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
204
- finally {
205
- try {
206
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
207
- }
208
- finally { if (e_3) throw e_3.error; }
209
- }
210
- });
138
+ async *listBySubscriptionPagingPage(options, settings) {
139
+ let result;
140
+ let continuationToken = settings?.continuationToken;
141
+ if (!continuationToken) {
142
+ result = await this._listBySubscription(options);
143
+ let page = result.value || [];
144
+ continuationToken = result.nextLink;
145
+ setContinuationToken(page, continuationToken);
146
+ yield page;
147
+ }
148
+ while (continuationToken) {
149
+ result = await this._listBySubscriptionNext(continuationToken, options);
150
+ continuationToken = result.nextLink;
151
+ let page = result.value || [];
152
+ setContinuationToken(page, continuationToken);
153
+ yield page;
154
+ }
155
+ }
156
+ async *listBySubscriptionPagingAll(options) {
157
+ for await (const page of this.listBySubscriptionPagingPage(options)) {
158
+ yield* page;
159
+ }
211
160
  }
212
161
  /**
213
162
  * Checks that the redis cache name is valid and is not already in use.
@@ -240,14 +189,19 @@ export class RedisImpl {
240
189
  return this.client.sendOperationRequest(args, spec);
241
190
  };
242
191
  const sendOperationFn = async (args, spec) => {
243
- var _a;
244
192
  let currentRawResponse = undefined;
245
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
193
+ const providedCallback = args.options?.onResponse;
246
194
  const callback = (rawResponse, flatResponse) => {
247
195
  currentRawResponse = rawResponse;
248
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
196
+ providedCallback?.(rawResponse, flatResponse);
197
+ };
198
+ const updatedArgs = {
199
+ ...args,
200
+ options: {
201
+ ...args.options,
202
+ onResponse: callback,
203
+ },
249
204
  };
250
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
251
205
  const flatResponse = await directSendOperation(updatedArgs, spec);
252
206
  return {
253
207
  flatResponse,
@@ -264,8 +218,8 @@ export class RedisImpl {
264
218
  spec: createOperationSpec,
265
219
  });
266
220
  const poller = await createHttpPoller(lro, {
267
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
268
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
221
+ restoreFrom: options?.resumeFrom,
222
+ intervalInMs: options?.updateIntervalInMs,
269
223
  });
270
224
  await poller.poll();
271
225
  return poller;
@@ -293,14 +247,19 @@ export class RedisImpl {
293
247
  return this.client.sendOperationRequest(args, spec);
294
248
  };
295
249
  const sendOperationFn = async (args, spec) => {
296
- var _a;
297
250
  let currentRawResponse = undefined;
298
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
251
+ const providedCallback = args.options?.onResponse;
299
252
  const callback = (rawResponse, flatResponse) => {
300
253
  currentRawResponse = rawResponse;
301
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
254
+ providedCallback?.(rawResponse, flatResponse);
255
+ };
256
+ const updatedArgs = {
257
+ ...args,
258
+ options: {
259
+ ...args.options,
260
+ onResponse: callback,
261
+ },
302
262
  };
303
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
304
263
  const flatResponse = await directSendOperation(updatedArgs, spec);
305
264
  return {
306
265
  flatResponse,
@@ -317,8 +276,8 @@ export class RedisImpl {
317
276
  spec: updateOperationSpec,
318
277
  });
319
278
  const poller = await createHttpPoller(lro, {
320
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
321
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
279
+ restoreFrom: options?.resumeFrom,
280
+ intervalInMs: options?.updateIntervalInMs,
322
281
  });
323
282
  await poller.poll();
324
283
  return poller;
@@ -345,14 +304,19 @@ export class RedisImpl {
345
304
  return this.client.sendOperationRequest(args, spec);
346
305
  };
347
306
  const sendOperationFn = async (args, spec) => {
348
- var _a;
349
307
  let currentRawResponse = undefined;
350
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
308
+ const providedCallback = args.options?.onResponse;
351
309
  const callback = (rawResponse, flatResponse) => {
352
310
  currentRawResponse = rawResponse;
353
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
311
+ providedCallback?.(rawResponse, flatResponse);
312
+ };
313
+ const updatedArgs = {
314
+ ...args,
315
+ options: {
316
+ ...args.options,
317
+ onResponse: callback,
318
+ },
354
319
  };
355
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
356
320
  const flatResponse = await directSendOperation(updatedArgs, spec);
357
321
  return {
358
322
  flatResponse,
@@ -369,8 +333,8 @@ export class RedisImpl {
369
333
  spec: deleteOperationSpec,
370
334
  });
371
335
  const poller = await createHttpPoller(lro, {
372
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
373
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
336
+ restoreFrom: options?.resumeFrom,
337
+ intervalInMs: options?.updateIntervalInMs,
374
338
  });
375
339
  await poller.poll();
376
340
  return poller;
@@ -453,14 +417,19 @@ export class RedisImpl {
453
417
  return this.client.sendOperationRequest(args, spec);
454
418
  };
455
419
  const sendOperationFn = async (args, spec) => {
456
- var _a;
457
420
  let currentRawResponse = undefined;
458
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
421
+ const providedCallback = args.options?.onResponse;
459
422
  const callback = (rawResponse, flatResponse) => {
460
423
  currentRawResponse = rawResponse;
461
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
424
+ providedCallback?.(rawResponse, flatResponse);
425
+ };
426
+ const updatedArgs = {
427
+ ...args,
428
+ options: {
429
+ ...args.options,
430
+ onResponse: callback,
431
+ },
462
432
  };
463
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
464
433
  const flatResponse = await directSendOperation(updatedArgs, spec);
465
434
  return {
466
435
  flatResponse,
@@ -477,8 +446,8 @@ export class RedisImpl {
477
446
  spec: importDataOperationSpec,
478
447
  });
479
448
  const poller = await createHttpPoller(lro, {
480
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
481
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
449
+ restoreFrom: options?.resumeFrom,
450
+ intervalInMs: options?.updateIntervalInMs,
482
451
  });
483
452
  await poller.poll();
484
453
  return poller;
@@ -506,14 +475,19 @@ export class RedisImpl {
506
475
  return this.client.sendOperationRequest(args, spec);
507
476
  };
508
477
  const sendOperationFn = async (args, spec) => {
509
- var _a;
510
478
  let currentRawResponse = undefined;
511
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
479
+ const providedCallback = args.options?.onResponse;
512
480
  const callback = (rawResponse, flatResponse) => {
513
481
  currentRawResponse = rawResponse;
514
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
482
+ providedCallback?.(rawResponse, flatResponse);
483
+ };
484
+ const updatedArgs = {
485
+ ...args,
486
+ options: {
487
+ ...args.options,
488
+ onResponse: callback,
489
+ },
515
490
  };
516
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
517
491
  const flatResponse = await directSendOperation(updatedArgs, spec);
518
492
  return {
519
493
  flatResponse,
@@ -530,8 +504,8 @@ export class RedisImpl {
530
504
  spec: exportDataOperationSpec,
531
505
  });
532
506
  const poller = await createHttpPoller(lro, {
533
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
534
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
507
+ restoreFrom: options?.resumeFrom,
508
+ intervalInMs: options?.updateIntervalInMs,
535
509
  });
536
510
  await poller.poll();
537
511
  return poller;
@@ -558,14 +532,19 @@ export class RedisImpl {
558
532
  return this.client.sendOperationRequest(args, spec);
559
533
  };
560
534
  const sendOperationFn = async (args, spec) => {
561
- var _a;
562
535
  let currentRawResponse = undefined;
563
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
536
+ const providedCallback = args.options?.onResponse;
564
537
  const callback = (rawResponse, flatResponse) => {
565
538
  currentRawResponse = rawResponse;
566
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
539
+ providedCallback?.(rawResponse, flatResponse);
540
+ };
541
+ const updatedArgs = {
542
+ ...args,
543
+ options: {
544
+ ...args.options,
545
+ onResponse: callback,
546
+ },
567
547
  };
568
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
569
548
  const flatResponse = await directSendOperation(updatedArgs, spec);
570
549
  return {
571
550
  flatResponse,
@@ -582,8 +561,8 @@ export class RedisImpl {
582
561
  spec: flushCacheOperationSpec,
583
562
  });
584
563
  const poller = await createHttpPoller(lro, {
585
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
586
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
564
+ restoreFrom: options?.resumeFrom,
565
+ intervalInMs: options?.updateIntervalInMs,
587
566
  resourceLocationConfig: "location",
588
567
  });
589
568
  await poller.poll();