@azure/arm-cdn 9.1.1-alpha.20250619.1 → 9.1.1-alpha.20250721.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/dist/browser/cdnManagementClient.js +34 -5
  2. package/dist/browser/cdnManagementClient.js.map +1 -1
  3. package/dist/browser/lroImpl.js +7 -3
  4. package/dist/browser/lroImpl.js.map +1 -1
  5. package/dist/browser/models/mappers.js +663 -294
  6. package/dist/browser/models/mappers.js.map +1 -1
  7. package/dist/browser/operations/afdCustomDomains.js +67 -64
  8. package/dist/browser/operations/afdCustomDomains.js.map +1 -1
  9. package/dist/browser/operations/afdEndpoints.js +89 -103
  10. package/dist/browser/operations/afdEndpoints.js.map +1 -1
  11. package/dist/browser/operations/afdOriginGroups.js +78 -97
  12. package/dist/browser/operations/afdOriginGroups.js.map +1 -1
  13. package/dist/browser/operations/afdOrigins.js +56 -58
  14. package/dist/browser/operations/afdOrigins.js.map +1 -1
  15. package/dist/browser/operations/afdProfiles.js +34 -46
  16. package/dist/browser/operations/afdProfiles.js.map +1 -1
  17. package/dist/browser/operations/customDomains.js +67 -64
  18. package/dist/browser/operations/customDomains.js.map +1 -1
  19. package/dist/browser/operations/edgeNodes.js +23 -40
  20. package/dist/browser/operations/edgeNodes.js.map +1 -1
  21. package/dist/browser/operations/endpoints.js +122 -121
  22. package/dist/browser/operations/endpoints.js.map +1 -1
  23. package/dist/browser/operations/logAnalytics.js +1 -0
  24. package/dist/browser/operations/logAnalytics.js.map +1 -1
  25. package/dist/browser/operations/managedRuleSets.js +23 -40
  26. package/dist/browser/operations/managedRuleSets.js.map +1 -1
  27. package/dist/browser/operations/operations.js +23 -40
  28. package/dist/browser/operations/operations.js.map +1 -1
  29. package/dist/browser/operations/originGroups.js +56 -58
  30. package/dist/browser/operations/originGroups.js.map +1 -1
  31. package/dist/browser/operations/origins.js +56 -58
  32. package/dist/browser/operations/origins.js.map +1 -1
  33. package/dist/browser/operations/policies.js +45 -52
  34. package/dist/browser/operations/policies.js.map +1 -1
  35. package/dist/browser/operations/profiles.js +133 -154
  36. package/dist/browser/operations/profiles.js.map +1 -1
  37. package/dist/browser/operations/resourceUsageOperations.js +23 -40
  38. package/dist/browser/operations/resourceUsageOperations.js.map +1 -1
  39. package/dist/browser/operations/routes.js +56 -58
  40. package/dist/browser/operations/routes.js.map +1 -1
  41. package/dist/browser/operations/ruleSets.js +56 -85
  42. package/dist/browser/operations/ruleSets.js.map +1 -1
  43. package/dist/browser/operations/rules.js +56 -58
  44. package/dist/browser/operations/rules.js.map +1 -1
  45. package/dist/browser/operations/secrets.js +45 -52
  46. package/dist/browser/operations/secrets.js.map +1 -1
  47. package/dist/browser/operations/securityPolicies.js +56 -58
  48. package/dist/browser/operations/securityPolicies.js.map +1 -1
  49. package/dist/browser/pagingHelper.js +2 -4
  50. package/dist/browser/pagingHelper.js.map +1 -1
  51. package/dist/commonjs/cdnManagementClient.js +34 -5
  52. package/dist/commonjs/cdnManagementClient.js.map +1 -1
  53. package/dist/commonjs/lroImpl.js +7 -3
  54. package/dist/commonjs/lroImpl.js.map +1 -1
  55. package/dist/commonjs/models/mappers.js +663 -294
  56. package/dist/commonjs/models/mappers.js.map +1 -1
  57. package/dist/commonjs/operations/afdCustomDomains.js +67 -63
  58. package/dist/commonjs/operations/afdCustomDomains.js.map +1 -1
  59. package/dist/commonjs/operations/afdEndpoints.js +89 -102
  60. package/dist/commonjs/operations/afdEndpoints.js.map +1 -1
  61. package/dist/commonjs/operations/afdOriginGroups.js +78 -96
  62. package/dist/commonjs/operations/afdOriginGroups.js.map +1 -1
  63. package/dist/commonjs/operations/afdOrigins.js +56 -57
  64. package/dist/commonjs/operations/afdOrigins.js.map +1 -1
  65. package/dist/commonjs/operations/afdProfiles.js +34 -45
  66. package/dist/commonjs/operations/afdProfiles.js.map +1 -1
  67. package/dist/commonjs/operations/customDomains.js +67 -63
  68. package/dist/commonjs/operations/customDomains.js.map +1 -1
  69. package/dist/commonjs/operations/edgeNodes.js +23 -39
  70. package/dist/commonjs/operations/edgeNodes.js.map +1 -1
  71. package/dist/commonjs/operations/endpoints.js +122 -120
  72. package/dist/commonjs/operations/endpoints.js.map +1 -1
  73. package/dist/commonjs/operations/logAnalytics.js +1 -0
  74. package/dist/commonjs/operations/logAnalytics.js.map +1 -1
  75. package/dist/commonjs/operations/managedRuleSets.js +23 -39
  76. package/dist/commonjs/operations/managedRuleSets.js.map +1 -1
  77. package/dist/commonjs/operations/operations.js +23 -39
  78. package/dist/commonjs/operations/operations.js.map +1 -1
  79. package/dist/commonjs/operations/originGroups.js +56 -57
  80. package/dist/commonjs/operations/originGroups.js.map +1 -1
  81. package/dist/commonjs/operations/origins.js +56 -57
  82. package/dist/commonjs/operations/origins.js.map +1 -1
  83. package/dist/commonjs/operations/policies.js +45 -51
  84. package/dist/commonjs/operations/policies.js.map +1 -1
  85. package/dist/commonjs/operations/profiles.js +133 -153
  86. package/dist/commonjs/operations/profiles.js.map +1 -1
  87. package/dist/commonjs/operations/resourceUsageOperations.js +23 -39
  88. package/dist/commonjs/operations/resourceUsageOperations.js.map +1 -1
  89. package/dist/commonjs/operations/routes.js +56 -57
  90. package/dist/commonjs/operations/routes.js.map +1 -1
  91. package/dist/commonjs/operations/ruleSets.js +56 -84
  92. package/dist/commonjs/operations/ruleSets.js.map +1 -1
  93. package/dist/commonjs/operations/rules.js +56 -57
  94. package/dist/commonjs/operations/rules.js.map +1 -1
  95. package/dist/commonjs/operations/secrets.js +45 -51
  96. package/dist/commonjs/operations/secrets.js.map +1 -1
  97. package/dist/commonjs/operations/securityPolicies.js +56 -57
  98. package/dist/commonjs/operations/securityPolicies.js.map +1 -1
  99. package/dist/commonjs/pagingHelper.js +2 -4
  100. package/dist/commonjs/pagingHelper.js.map +1 -1
  101. package/dist/commonjs/tsdoc-metadata.json +11 -11
  102. package/dist/esm/cdnManagementClient.js +34 -5
  103. package/dist/esm/cdnManagementClient.js.map +1 -1
  104. package/dist/esm/lroImpl.js +7 -3
  105. package/dist/esm/lroImpl.js.map +1 -1
  106. package/dist/esm/models/mappers.js +663 -294
  107. package/dist/esm/models/mappers.js.map +1 -1
  108. package/dist/esm/operations/afdCustomDomains.js +67 -64
  109. package/dist/esm/operations/afdCustomDomains.js.map +1 -1
  110. package/dist/esm/operations/afdEndpoints.js +89 -103
  111. package/dist/esm/operations/afdEndpoints.js.map +1 -1
  112. package/dist/esm/operations/afdOriginGroups.js +78 -97
  113. package/dist/esm/operations/afdOriginGroups.js.map +1 -1
  114. package/dist/esm/operations/afdOrigins.js +56 -58
  115. package/dist/esm/operations/afdOrigins.js.map +1 -1
  116. package/dist/esm/operations/afdProfiles.js +34 -46
  117. package/dist/esm/operations/afdProfiles.js.map +1 -1
  118. package/dist/esm/operations/customDomains.js +67 -64
  119. package/dist/esm/operations/customDomains.js.map +1 -1
  120. package/dist/esm/operations/edgeNodes.js +23 -40
  121. package/dist/esm/operations/edgeNodes.js.map +1 -1
  122. package/dist/esm/operations/endpoints.js +122 -121
  123. package/dist/esm/operations/endpoints.js.map +1 -1
  124. package/dist/esm/operations/logAnalytics.js +1 -0
  125. package/dist/esm/operations/logAnalytics.js.map +1 -1
  126. package/dist/esm/operations/managedRuleSets.js +23 -40
  127. package/dist/esm/operations/managedRuleSets.js.map +1 -1
  128. package/dist/esm/operations/operations.js +23 -40
  129. package/dist/esm/operations/operations.js.map +1 -1
  130. package/dist/esm/operations/originGroups.js +56 -58
  131. package/dist/esm/operations/originGroups.js.map +1 -1
  132. package/dist/esm/operations/origins.js +56 -58
  133. package/dist/esm/operations/origins.js.map +1 -1
  134. package/dist/esm/operations/policies.js +45 -52
  135. package/dist/esm/operations/policies.js.map +1 -1
  136. package/dist/esm/operations/profiles.js +133 -154
  137. package/dist/esm/operations/profiles.js.map +1 -1
  138. package/dist/esm/operations/resourceUsageOperations.js +23 -40
  139. package/dist/esm/operations/resourceUsageOperations.js.map +1 -1
  140. package/dist/esm/operations/routes.js +56 -58
  141. package/dist/esm/operations/routes.js.map +1 -1
  142. package/dist/esm/operations/ruleSets.js +56 -85
  143. package/dist/esm/operations/ruleSets.js.map +1 -1
  144. package/dist/esm/operations/rules.js +56 -58
  145. package/dist/esm/operations/rules.js.map +1 -1
  146. package/dist/esm/operations/secrets.js +45 -52
  147. package/dist/esm/operations/secrets.js.map +1 -1
  148. package/dist/esm/operations/securityPolicies.js +56 -58
  149. package/dist/esm/operations/securityPolicies.js.map +1 -1
  150. package/dist/esm/pagingHelper.js +2 -4
  151. package/dist/esm/pagingHelper.js.map +1 -1
  152. package/dist/react-native/cdnManagementClient.js +34 -5
  153. package/dist/react-native/cdnManagementClient.js.map +1 -1
  154. package/dist/react-native/lroImpl.js +7 -3
  155. package/dist/react-native/lroImpl.js.map +1 -1
  156. package/dist/react-native/models/mappers.js +663 -294
  157. package/dist/react-native/models/mappers.js.map +1 -1
  158. package/dist/react-native/operations/afdCustomDomains.js +67 -64
  159. package/dist/react-native/operations/afdCustomDomains.js.map +1 -1
  160. package/dist/react-native/operations/afdEndpoints.js +89 -103
  161. package/dist/react-native/operations/afdEndpoints.js.map +1 -1
  162. package/dist/react-native/operations/afdOriginGroups.js +78 -97
  163. package/dist/react-native/operations/afdOriginGroups.js.map +1 -1
  164. package/dist/react-native/operations/afdOrigins.js +56 -58
  165. package/dist/react-native/operations/afdOrigins.js.map +1 -1
  166. package/dist/react-native/operations/afdProfiles.js +34 -46
  167. package/dist/react-native/operations/afdProfiles.js.map +1 -1
  168. package/dist/react-native/operations/customDomains.js +67 -64
  169. package/dist/react-native/operations/customDomains.js.map +1 -1
  170. package/dist/react-native/operations/edgeNodes.js +23 -40
  171. package/dist/react-native/operations/edgeNodes.js.map +1 -1
  172. package/dist/react-native/operations/endpoints.js +122 -121
  173. package/dist/react-native/operations/endpoints.js.map +1 -1
  174. package/dist/react-native/operations/logAnalytics.js +1 -0
  175. package/dist/react-native/operations/logAnalytics.js.map +1 -1
  176. package/dist/react-native/operations/managedRuleSets.js +23 -40
  177. package/dist/react-native/operations/managedRuleSets.js.map +1 -1
  178. package/dist/react-native/operations/operations.js +23 -40
  179. package/dist/react-native/operations/operations.js.map +1 -1
  180. package/dist/react-native/operations/originGroups.js +56 -58
  181. package/dist/react-native/operations/originGroups.js.map +1 -1
  182. package/dist/react-native/operations/origins.js +56 -58
  183. package/dist/react-native/operations/origins.js.map +1 -1
  184. package/dist/react-native/operations/policies.js +45 -52
  185. package/dist/react-native/operations/policies.js.map +1 -1
  186. package/dist/react-native/operations/profiles.js +133 -154
  187. package/dist/react-native/operations/profiles.js.map +1 -1
  188. package/dist/react-native/operations/resourceUsageOperations.js +23 -40
  189. package/dist/react-native/operations/resourceUsageOperations.js.map +1 -1
  190. package/dist/react-native/operations/routes.js +56 -58
  191. package/dist/react-native/operations/routes.js.map +1 -1
  192. package/dist/react-native/operations/ruleSets.js +56 -85
  193. package/dist/react-native/operations/ruleSets.js.map +1 -1
  194. package/dist/react-native/operations/rules.js +56 -58
  195. package/dist/react-native/operations/rules.js.map +1 -1
  196. package/dist/react-native/operations/secrets.js +45 -52
  197. package/dist/react-native/operations/secrets.js.map +1 -1
  198. package/dist/react-native/operations/securityPolicies.js +56 -58
  199. package/dist/react-native/operations/securityPolicies.js.map +1 -1
  200. package/dist/react-native/pagingHelper.js +2 -4
  201. package/dist/react-native/pagingHelper.js.map +1 -1
  202. package/package.json +2 -2
  203. /package/review/{arm-cdn.api.md → arm-cdn-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 Origins operations. */
17
16
  export class OriginsImpl {
17
+ client;
18
18
  /**
19
19
  * Initialize a new instance of the class Origins class.
20
20
  * @param client Reference to the service client
@@ -39,52 +39,35 @@ export class OriginsImpl {
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.listByEndpointPagingPage(resourceGroupName, profileName, endpointName, options, settings);
46
46
  },
47
47
  };
48
48
  }
49
- listByEndpointPagingPage(resourceGroupName, profileName, endpointName, options, settings) {
50
- return __asyncGenerator(this, arguments, function* listByEndpointPagingPage_1() {
51
- let result;
52
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
53
- if (!continuationToken) {
54
- result = yield __await(this._listByEndpoint(resourceGroupName, profileName, endpointName, 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._listByEndpointNext(resourceGroupName, profileName, endpointName, continuationToken, options));
62
- continuationToken = result.nextLink;
63
- let page = result.value || [];
64
- setContinuationToken(page, continuationToken);
65
- yield yield __await(page);
66
- }
67
- });
49
+ async *listByEndpointPagingPage(resourceGroupName, profileName, endpointName, options, settings) {
50
+ let result;
51
+ let continuationToken = settings?.continuationToken;
52
+ if (!continuationToken) {
53
+ result = await this._listByEndpoint(resourceGroupName, profileName, endpointName, 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._listByEndpointNext(resourceGroupName, profileName, endpointName, continuationToken, options);
61
+ continuationToken = result.nextLink;
62
+ let page = result.value || [];
63
+ setContinuationToken(page, continuationToken);
64
+ yield page;
65
+ }
68
66
  }
69
- listByEndpointPagingAll(resourceGroupName, profileName, endpointName, options) {
70
- return __asyncGenerator(this, arguments, function* listByEndpointPagingAll_1() {
71
- var _a, e_1, _b, _c;
72
- try {
73
- for (var _d = true, _e = __asyncValues(this.listByEndpointPagingPage(resourceGroupName, profileName, endpointName, 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 *listByEndpointPagingAll(resourceGroupName, profileName, endpointName, options) {
68
+ for await (const page of this.listByEndpointPagingPage(resourceGroupName, profileName, endpointName, options)) {
69
+ yield* page;
70
+ }
88
71
  }
89
72
  /**
90
73
  * Lists all of the existing origins within an endpoint.
@@ -121,14 +104,19 @@ export class OriginsImpl {
121
104
  return this.client.sendOperationRequest(args, spec);
122
105
  };
123
106
  const sendOperationFn = async (args, spec) => {
124
- var _a;
125
107
  let currentRawResponse = undefined;
126
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
108
+ const providedCallback = args.options?.onResponse;
127
109
  const callback = (rawResponse, flatResponse) => {
128
110
  currentRawResponse = rawResponse;
129
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
111
+ providedCallback?.(rawResponse, flatResponse);
112
+ };
113
+ const updatedArgs = {
114
+ ...args,
115
+ options: {
116
+ ...args.options,
117
+ onResponse: callback,
118
+ },
130
119
  };
131
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
132
120
  const flatResponse = await directSendOperation(updatedArgs, spec);
133
121
  return {
134
122
  flatResponse,
@@ -152,8 +140,8 @@ export class OriginsImpl {
152
140
  spec: createOperationSpec,
153
141
  });
154
142
  const poller = await createHttpPoller(lro, {
155
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
156
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
143
+ restoreFrom: options?.resumeFrom,
144
+ intervalInMs: options?.updateIntervalInMs,
157
145
  });
158
146
  await poller.poll();
159
147
  return poller;
@@ -185,14 +173,19 @@ export class OriginsImpl {
185
173
  return this.client.sendOperationRequest(args, spec);
186
174
  };
187
175
  const sendOperationFn = async (args, spec) => {
188
- var _a;
189
176
  let currentRawResponse = undefined;
190
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
177
+ const providedCallback = args.options?.onResponse;
191
178
  const callback = (rawResponse, flatResponse) => {
192
179
  currentRawResponse = rawResponse;
193
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
180
+ providedCallback?.(rawResponse, flatResponse);
181
+ };
182
+ const updatedArgs = {
183
+ ...args,
184
+ options: {
185
+ ...args.options,
186
+ onResponse: callback,
187
+ },
194
188
  };
195
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
196
189
  const flatResponse = await directSendOperation(updatedArgs, spec);
197
190
  return {
198
191
  flatResponse,
@@ -216,8 +209,8 @@ export class OriginsImpl {
216
209
  spec: updateOperationSpec,
217
210
  });
218
211
  const poller = await createHttpPoller(lro, {
219
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
220
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
212
+ restoreFrom: options?.resumeFrom,
213
+ intervalInMs: options?.updateIntervalInMs,
221
214
  });
222
215
  await poller.poll();
223
216
  return poller;
@@ -248,14 +241,19 @@ export class OriginsImpl {
248
241
  return this.client.sendOperationRequest(args, spec);
249
242
  };
250
243
  const sendOperationFn = async (args, spec) => {
251
- var _a;
252
244
  let currentRawResponse = undefined;
253
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
245
+ const providedCallback = args.options?.onResponse;
254
246
  const callback = (rawResponse, flatResponse) => {
255
247
  currentRawResponse = rawResponse;
256
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
248
+ providedCallback?.(rawResponse, flatResponse);
249
+ };
250
+ const updatedArgs = {
251
+ ...args,
252
+ options: {
253
+ ...args.options,
254
+ onResponse: callback,
255
+ },
257
256
  };
258
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
259
257
  const flatResponse = await directSendOperation(updatedArgs, spec);
260
258
  return {
261
259
  flatResponse,
@@ -278,8 +276,8 @@ export class OriginsImpl {
278
276
  spec: deleteOperationSpec,
279
277
  });
280
278
  const poller = await createHttpPoller(lro, {
281
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
282
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
279
+ restoreFrom: options?.resumeFrom,
280
+ intervalInMs: options?.updateIntervalInMs,
283
281
  });
284
282
  await poller.poll();
285
283
  return poller;
@@ -1 +1 @@
1
- {"version":3,"file":"origins.js","sourceRoot":"","sources":["../../../src/operations/origins.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,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;AAiB9C,4CAA4C;AAC5C,2CAA2C;AAC3C,MAAM,OAAO,WAAW;IAGtB;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;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AAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,+BAA+B,GAA6B;IAChE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gBAAgB;SACrC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,YAAY;KACxB;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 { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { Origins } 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 { CdnManagementClient } from \"../cdnManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n Origin,\n OriginsListByEndpointNextOptionalParams,\n OriginsListByEndpointOptionalParams,\n OriginsListByEndpointResponse,\n OriginsGetOptionalParams,\n OriginsGetResponse,\n OriginsCreateOptionalParams,\n OriginsCreateResponse,\n OriginUpdateParameters,\n OriginsUpdateOptionalParams,\n OriginsUpdateResponse,\n OriginsDeleteOptionalParams,\n OriginsListByEndpointNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Origins operations. */\nexport class OriginsImpl implements Origins {\n private readonly client: CdnManagementClient;\n\n /**\n * Initialize a new instance of the class Origins class.\n * @param client Reference to the service client\n */\n constructor(client: CdnManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists all of the existing origins within an endpoint.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the CDN profile which is unique within the resource group.\n * @param endpointName Name of the endpoint under the profile which is unique globally.\n * @param options The options parameters.\n */\n public listByEndpoint(\n resourceGroupName: string,\n profileName: string,\n endpointName: string,\n options?: OriginsListByEndpointOptionalParams,\n ): PagedAsyncIterableIterator<Origin> {\n const iter = this.listByEndpointPagingAll(\n resourceGroupName,\n profileName,\n endpointName,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByEndpointPagingPage(\n resourceGroupName,\n profileName,\n endpointName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByEndpointPagingPage(\n resourceGroupName: string,\n profileName: string,\n endpointName: string,\n options?: OriginsListByEndpointOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<Origin[]> {\n let result: OriginsListByEndpointResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByEndpoint(\n resourceGroupName,\n profileName,\n endpointName,\n options,\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByEndpointNext(\n resourceGroupName,\n profileName,\n endpointName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByEndpointPagingAll(\n resourceGroupName: string,\n profileName: string,\n endpointName: string,\n options?: OriginsListByEndpointOptionalParams,\n ): AsyncIterableIterator<Origin> {\n for await (const page of this.listByEndpointPagingPage(\n resourceGroupName,\n profileName,\n endpointName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists all of the existing origins within an endpoint.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the CDN profile which is unique within the resource group.\n * @param endpointName Name of the endpoint under the profile which is unique globally.\n * @param options The options parameters.\n */\n private _listByEndpoint(\n resourceGroupName: string,\n profileName: string,\n endpointName: string,\n options?: OriginsListByEndpointOptionalParams,\n ): Promise<OriginsListByEndpointResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, endpointName, options },\n listByEndpointOperationSpec,\n );\n }\n\n /**\n * Gets an existing origin within an endpoint.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the CDN profile which is unique within the resource group.\n * @param endpointName Name of the endpoint under the profile which is unique globally.\n * @param originName Name of the origin which is unique within the endpoint.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n profileName: string,\n endpointName: string,\n originName: string,\n options?: OriginsGetOptionalParams,\n ): Promise<OriginsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, endpointName, originName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Creates a new origin within the specified endpoint.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the CDN profile which is unique within the resource group.\n * @param endpointName Name of the endpoint under the profile which is unique globally.\n * @param originName Name of the origin that is unique within the endpoint.\n * @param origin Origin properties\n * @param options The options parameters.\n */\n async beginCreate(\n resourceGroupName: string,\n profileName: string,\n endpointName: string,\n originName: string,\n origin: Origin,\n options?: OriginsCreateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<OriginsCreateResponse>,\n OriginsCreateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<OriginsCreateResponse> => {\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: {\n resourceGroupName,\n profileName,\n endpointName,\n originName,\n origin,\n options,\n },\n spec: createOperationSpec,\n });\n const poller = await createHttpPoller<\n OriginsCreateResponse,\n OperationState<OriginsCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates a new origin within the specified endpoint.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the CDN profile which is unique within the resource group.\n * @param endpointName Name of the endpoint under the profile which is unique globally.\n * @param originName Name of the origin that is unique within the endpoint.\n * @param origin Origin properties\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n resourceGroupName: string,\n profileName: string,\n endpointName: string,\n originName: string,\n origin: Origin,\n options?: OriginsCreateOptionalParams,\n ): Promise<OriginsCreateResponse> {\n const poller = await this.beginCreate(\n resourceGroupName,\n profileName,\n endpointName,\n originName,\n origin,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Updates an existing origin within an endpoint.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the CDN profile which is unique within the resource group.\n * @param endpointName Name of the endpoint under the profile which is unique globally.\n * @param originName Name of the origin which is unique within the endpoint.\n * @param originUpdateProperties Origin properties\n * @param options The options parameters.\n */\n async beginUpdate(\n resourceGroupName: string,\n profileName: string,\n endpointName: string,\n originName: string,\n originUpdateProperties: OriginUpdateParameters,\n options?: OriginsUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<OriginsUpdateResponse>,\n OriginsUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<OriginsUpdateResponse> => {\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: {\n resourceGroupName,\n profileName,\n endpointName,\n originName,\n originUpdateProperties,\n options,\n },\n spec: updateOperationSpec,\n });\n const poller = await createHttpPoller<\n OriginsUpdateResponse,\n OperationState<OriginsUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Updates an existing origin within an endpoint.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the CDN profile which is unique within the resource group.\n * @param endpointName Name of the endpoint under the profile which is unique globally.\n * @param originName Name of the origin which is unique within the endpoint.\n * @param originUpdateProperties Origin properties\n * @param options The options parameters.\n */\n async beginUpdateAndWait(\n resourceGroupName: string,\n profileName: string,\n endpointName: string,\n originName: string,\n originUpdateProperties: OriginUpdateParameters,\n options?: OriginsUpdateOptionalParams,\n ): Promise<OriginsUpdateResponse> {\n const poller = await this.beginUpdate(\n resourceGroupName,\n profileName,\n endpointName,\n originName,\n originUpdateProperties,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes an existing origin within an endpoint.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the CDN profile which is unique within the resource group.\n * @param endpointName Name of the endpoint under the profile which is unique globally.\n * @param originName Name of the origin which is unique within the endpoint.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n profileName: string,\n endpointName: string,\n originName: string,\n options?: OriginsDeleteOptionalParams,\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: {\n resourceGroupName,\n profileName,\n endpointName,\n originName,\n options,\n },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes an existing origin within an endpoint.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the CDN profile which is unique within the resource group.\n * @param endpointName Name of the endpoint under the profile which is unique globally.\n * @param originName Name of the origin which is unique within the endpoint.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n profileName: string,\n endpointName: string,\n originName: string,\n options?: OriginsDeleteOptionalParams,\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n profileName,\n endpointName,\n originName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * ListByEndpointNext\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the CDN profile which is unique within the resource group.\n * @param endpointName Name of the endpoint under the profile which is unique globally.\n * @param nextLink The nextLink from the previous successful call to the ListByEndpoint method.\n * @param options The options parameters.\n */\n private _listByEndpointNext(\n resourceGroupName: string,\n profileName: string,\n endpointName: string,\n nextLink: string,\n options?: OriginsListByEndpointNextOptionalParams,\n ): Promise<OriginsListByEndpointNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, endpointName, nextLink, options },\n listByEndpointNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByEndpointOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OriginListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.endpointName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Origin,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.endpointName,\n Parameters.originName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.Origin,\n },\n 201: {\n bodyMapper: Mappers.Origin,\n },\n 202: {\n bodyMapper: Mappers.Origin,\n },\n 204: {\n bodyMapper: Mappers.Origin,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.origin1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.endpointName,\n Parameters.originName,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.Origin,\n },\n 201: {\n bodyMapper: Mappers.Origin,\n },\n 202: {\n bodyMapper: Mappers.Origin,\n },\n 204: {\n bodyMapper: Mappers.Origin,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.originUpdateProperties1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.endpointName,\n Parameters.originName,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.endpointName,\n Parameters.originName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByEndpointNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OriginListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.nextLink,\n Parameters.endpointName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"origins.js","sourceRoot":"","sources":["../../../src/operations/origins.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB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AO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;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,YAAY;QACvB,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,+BAA+B,GAA6B;IAChE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gBAAgB;SACrC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,YAAY;KACxB;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 { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { Origins } 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 { CdnManagementClient } from \"../cdnManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n Origin,\n OriginsListByEndpointNextOptionalParams,\n OriginsListByEndpointOptionalParams,\n OriginsListByEndpointResponse,\n OriginsGetOptionalParams,\n OriginsGetResponse,\n OriginsCreateOptionalParams,\n OriginsCreateResponse,\n OriginUpdateParameters,\n OriginsUpdateOptionalParams,\n OriginsUpdateResponse,\n OriginsDeleteOptionalParams,\n OriginsListByEndpointNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Origins operations. */\nexport class OriginsImpl implements Origins {\n private readonly client: CdnManagementClient;\n\n /**\n * Initialize a new instance of the class Origins class.\n * @param client Reference to the service client\n */\n constructor(client: CdnManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists all of the existing origins within an endpoint.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the CDN profile which is unique within the resource group.\n * @param endpointName Name of the endpoint under the profile which is unique globally.\n * @param options The options parameters.\n */\n public listByEndpoint(\n resourceGroupName: string,\n profileName: string,\n endpointName: string,\n options?: OriginsListByEndpointOptionalParams,\n ): PagedAsyncIterableIterator<Origin> {\n const iter = this.listByEndpointPagingAll(\n resourceGroupName,\n profileName,\n endpointName,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByEndpointPagingPage(\n resourceGroupName,\n profileName,\n endpointName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByEndpointPagingPage(\n resourceGroupName: string,\n profileName: string,\n endpointName: string,\n options?: OriginsListByEndpointOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<Origin[]> {\n let result: OriginsListByEndpointResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByEndpoint(\n resourceGroupName,\n profileName,\n endpointName,\n options,\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByEndpointNext(\n resourceGroupName,\n profileName,\n endpointName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByEndpointPagingAll(\n resourceGroupName: string,\n profileName: string,\n endpointName: string,\n options?: OriginsListByEndpointOptionalParams,\n ): AsyncIterableIterator<Origin> {\n for await (const page of this.listByEndpointPagingPage(\n resourceGroupName,\n profileName,\n endpointName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists all of the existing origins within an endpoint.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the CDN profile which is unique within the resource group.\n * @param endpointName Name of the endpoint under the profile which is unique globally.\n * @param options The options parameters.\n */\n private _listByEndpoint(\n resourceGroupName: string,\n profileName: string,\n endpointName: string,\n options?: OriginsListByEndpointOptionalParams,\n ): Promise<OriginsListByEndpointResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, endpointName, options },\n listByEndpointOperationSpec,\n );\n }\n\n /**\n * Gets an existing origin within an endpoint.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the CDN profile which is unique within the resource group.\n * @param endpointName Name of the endpoint under the profile which is unique globally.\n * @param originName Name of the origin which is unique within the endpoint.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n profileName: string,\n endpointName: string,\n originName: string,\n options?: OriginsGetOptionalParams,\n ): Promise<OriginsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, endpointName, originName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Creates a new origin within the specified endpoint.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the CDN profile which is unique within the resource group.\n * @param endpointName Name of the endpoint under the profile which is unique globally.\n * @param originName Name of the origin that is unique within the endpoint.\n * @param origin Origin properties\n * @param options The options parameters.\n */\n async beginCreate(\n resourceGroupName: string,\n profileName: string,\n endpointName: string,\n originName: string,\n origin: Origin,\n options?: OriginsCreateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<OriginsCreateResponse>,\n OriginsCreateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<OriginsCreateResponse> => {\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: {\n resourceGroupName,\n profileName,\n endpointName,\n originName,\n origin,\n options,\n },\n spec: createOperationSpec,\n });\n const poller = await createHttpPoller<\n OriginsCreateResponse,\n OperationState<OriginsCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates a new origin within the specified endpoint.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the CDN profile which is unique within the resource group.\n * @param endpointName Name of the endpoint under the profile which is unique globally.\n * @param originName Name of the origin that is unique within the endpoint.\n * @param origin Origin properties\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n resourceGroupName: string,\n profileName: string,\n endpointName: string,\n originName: string,\n origin: Origin,\n options?: OriginsCreateOptionalParams,\n ): Promise<OriginsCreateResponse> {\n const poller = await this.beginCreate(\n resourceGroupName,\n profileName,\n endpointName,\n originName,\n origin,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Updates an existing origin within an endpoint.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the CDN profile which is unique within the resource group.\n * @param endpointName Name of the endpoint under the profile which is unique globally.\n * @param originName Name of the origin which is unique within the endpoint.\n * @param originUpdateProperties Origin properties\n * @param options The options parameters.\n */\n async beginUpdate(\n resourceGroupName: string,\n profileName: string,\n endpointName: string,\n originName: string,\n originUpdateProperties: OriginUpdateParameters,\n options?: OriginsUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<OriginsUpdateResponse>,\n OriginsUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<OriginsUpdateResponse> => {\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: {\n resourceGroupName,\n profileName,\n endpointName,\n originName,\n originUpdateProperties,\n options,\n },\n spec: updateOperationSpec,\n });\n const poller = await createHttpPoller<\n OriginsUpdateResponse,\n OperationState<OriginsUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Updates an existing origin within an endpoint.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the CDN profile which is unique within the resource group.\n * @param endpointName Name of the endpoint under the profile which is unique globally.\n * @param originName Name of the origin which is unique within the endpoint.\n * @param originUpdateProperties Origin properties\n * @param options The options parameters.\n */\n async beginUpdateAndWait(\n resourceGroupName: string,\n profileName: string,\n endpointName: string,\n originName: string,\n originUpdateProperties: OriginUpdateParameters,\n options?: OriginsUpdateOptionalParams,\n ): Promise<OriginsUpdateResponse> {\n const poller = await this.beginUpdate(\n resourceGroupName,\n profileName,\n endpointName,\n originName,\n originUpdateProperties,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes an existing origin within an endpoint.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the CDN profile which is unique within the resource group.\n * @param endpointName Name of the endpoint under the profile which is unique globally.\n * @param originName Name of the origin which is unique within the endpoint.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n profileName: string,\n endpointName: string,\n originName: string,\n options?: OriginsDeleteOptionalParams,\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: {\n resourceGroupName,\n profileName,\n endpointName,\n originName,\n options,\n },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes an existing origin within an endpoint.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the CDN profile which is unique within the resource group.\n * @param endpointName Name of the endpoint under the profile which is unique globally.\n * @param originName Name of the origin which is unique within the endpoint.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n profileName: string,\n endpointName: string,\n originName: string,\n options?: OriginsDeleteOptionalParams,\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n profileName,\n endpointName,\n originName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * ListByEndpointNext\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the CDN profile which is unique within the resource group.\n * @param endpointName Name of the endpoint under the profile which is unique globally.\n * @param nextLink The nextLink from the previous successful call to the ListByEndpoint method.\n * @param options The options parameters.\n */\n private _listByEndpointNext(\n resourceGroupName: string,\n profileName: string,\n endpointName: string,\n nextLink: string,\n options?: OriginsListByEndpointNextOptionalParams,\n ): Promise<OriginsListByEndpointNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, endpointName, nextLink, options },\n listByEndpointNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByEndpointOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OriginListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.endpointName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Origin,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.endpointName,\n Parameters.originName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.Origin,\n },\n 201: {\n bodyMapper: Mappers.Origin,\n },\n 202: {\n bodyMapper: Mappers.Origin,\n },\n 204: {\n bodyMapper: Mappers.Origin,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.origin1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.endpointName,\n Parameters.originName,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.Origin,\n },\n 201: {\n bodyMapper: Mappers.Origin,\n },\n 202: {\n bodyMapper: Mappers.Origin,\n },\n 204: {\n bodyMapper: Mappers.Origin,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.originUpdateProperties1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.endpointName,\n Parameters.originName,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.endpointName,\n Parameters.originName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByEndpointNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OriginListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.nextLink,\n Parameters.endpointName,\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 Policies operations. */
17
16
  export class PoliciesImpl {
17
+ client;
18
18
  /**
19
19
  * Initialize a new instance of the class Policies class.
20
20
  * @param client Reference to the service client
@@ -37,52 +37,35 @@ export class PoliciesImpl {
37
37
  return this;
38
38
  },
39
39
  byPage: (settings) => {
40
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
40
+ if (settings?.maxPageSize) {
41
41
  throw new Error("maxPageSize is not supported by this operation.");
42
42
  }
43
43
  return this.listPagingPage(resourceGroupName, options, settings);
44
44
  },
45
45
  };
46
46
  }
47
- listPagingPage(resourceGroupName, options, settings) {
48
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
49
- let result;
50
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
51
- if (!continuationToken) {
52
- result = yield __await(this._list(resourceGroupName, options));
53
- let page = result.value || [];
54
- continuationToken = result.nextLink;
55
- setContinuationToken(page, continuationToken);
56
- yield yield __await(page);
57
- }
58
- while (continuationToken) {
59
- result = yield __await(this._listNext(resourceGroupName, continuationToken, options));
60
- continuationToken = result.nextLink;
61
- let page = result.value || [];
62
- setContinuationToken(page, continuationToken);
63
- yield yield __await(page);
64
- }
65
- });
47
+ async *listPagingPage(resourceGroupName, options, settings) {
48
+ let result;
49
+ let continuationToken = settings?.continuationToken;
50
+ if (!continuationToken) {
51
+ result = await this._list(resourceGroupName, options);
52
+ let page = result.value || [];
53
+ continuationToken = result.nextLink;
54
+ setContinuationToken(page, continuationToken);
55
+ yield page;
56
+ }
57
+ while (continuationToken) {
58
+ result = await this._listNext(resourceGroupName, continuationToken, options);
59
+ continuationToken = result.nextLink;
60
+ let page = result.value || [];
61
+ setContinuationToken(page, continuationToken);
62
+ yield page;
63
+ }
66
64
  }
67
- listPagingAll(resourceGroupName, options) {
68
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
69
- var _a, e_1, _b, _c;
70
- try {
71
- for (var _d = true, _e = __asyncValues(this.listPagingPage(resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
72
- _c = _f.value;
73
- _d = false;
74
- const page = _c;
75
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
76
- }
77
- }
78
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
79
- finally {
80
- try {
81
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
82
- }
83
- finally { if (e_1) throw e_1.error; }
84
- }
85
- });
65
+ async *listPagingAll(resourceGroupName, options) {
66
+ for await (const page of this.listPagingPage(resourceGroupName, options)) {
67
+ yield* page;
68
+ }
86
69
  }
87
70
  /**
88
71
  * Lists all of the protection policies within a resource group.
@@ -113,14 +96,19 @@ export class PoliciesImpl {
113
96
  return this.client.sendOperationRequest(args, spec);
114
97
  };
115
98
  const sendOperationFn = async (args, spec) => {
116
- var _a;
117
99
  let currentRawResponse = undefined;
118
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
100
+ const providedCallback = args.options?.onResponse;
119
101
  const callback = (rawResponse, flatResponse) => {
120
102
  currentRawResponse = rawResponse;
121
- 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
+ },
122
111
  };
123
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
124
112
  const flatResponse = await directSendOperation(updatedArgs, spec);
125
113
  return {
126
114
  flatResponse,
@@ -142,8 +130,8 @@ export class PoliciesImpl {
142
130
  spec: createOrUpdateOperationSpec,
143
131
  });
144
132
  const poller = await createHttpPoller(lro, {
145
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
146
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
133
+ restoreFrom: options?.resumeFrom,
134
+ intervalInMs: options?.updateIntervalInMs,
147
135
  });
148
136
  await poller.poll();
149
137
  return poller;
@@ -173,14 +161,19 @@ export class PoliciesImpl {
173
161
  return this.client.sendOperationRequest(args, spec);
174
162
  };
175
163
  const sendOperationFn = async (args, spec) => {
176
- var _a;
177
164
  let currentRawResponse = undefined;
178
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
165
+ const providedCallback = args.options?.onResponse;
179
166
  const callback = (rawResponse, flatResponse) => {
180
167
  currentRawResponse = rawResponse;
181
- 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
+ },
182
176
  };
183
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
184
177
  const flatResponse = await directSendOperation(updatedArgs, spec);
185
178
  return {
186
179
  flatResponse,
@@ -202,8 +195,8 @@ export class PoliciesImpl {
202
195
  spec: updateOperationSpec,
203
196
  });
204
197
  const poller = await createHttpPoller(lro, {
205
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
206
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
198
+ restoreFrom: options?.resumeFrom,
199
+ intervalInMs: options?.updateIntervalInMs,
207
200
  });
208
201
  await poller.poll();
209
202
  return poller;