@azure/arm-cdn 9.1.1-alpha.20250718.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 (201) 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/esm/cdnManagementClient.js +34 -5
  102. package/dist/esm/cdnManagementClient.js.map +1 -1
  103. package/dist/esm/lroImpl.js +7 -3
  104. package/dist/esm/lroImpl.js.map +1 -1
  105. package/dist/esm/models/mappers.js +663 -294
  106. package/dist/esm/models/mappers.js.map +1 -1
  107. package/dist/esm/operations/afdCustomDomains.js +67 -64
  108. package/dist/esm/operations/afdCustomDomains.js.map +1 -1
  109. package/dist/esm/operations/afdEndpoints.js +89 -103
  110. package/dist/esm/operations/afdEndpoints.js.map +1 -1
  111. package/dist/esm/operations/afdOriginGroups.js +78 -97
  112. package/dist/esm/operations/afdOriginGroups.js.map +1 -1
  113. package/dist/esm/operations/afdOrigins.js +56 -58
  114. package/dist/esm/operations/afdOrigins.js.map +1 -1
  115. package/dist/esm/operations/afdProfiles.js +34 -46
  116. package/dist/esm/operations/afdProfiles.js.map +1 -1
  117. package/dist/esm/operations/customDomains.js +67 -64
  118. package/dist/esm/operations/customDomains.js.map +1 -1
  119. package/dist/esm/operations/edgeNodes.js +23 -40
  120. package/dist/esm/operations/edgeNodes.js.map +1 -1
  121. package/dist/esm/operations/endpoints.js +122 -121
  122. package/dist/esm/operations/endpoints.js.map +1 -1
  123. package/dist/esm/operations/logAnalytics.js +1 -0
  124. package/dist/esm/operations/logAnalytics.js.map +1 -1
  125. package/dist/esm/operations/managedRuleSets.js +23 -40
  126. package/dist/esm/operations/managedRuleSets.js.map +1 -1
  127. package/dist/esm/operations/operations.js +23 -40
  128. package/dist/esm/operations/operations.js.map +1 -1
  129. package/dist/esm/operations/originGroups.js +56 -58
  130. package/dist/esm/operations/originGroups.js.map +1 -1
  131. package/dist/esm/operations/origins.js +56 -58
  132. package/dist/esm/operations/origins.js.map +1 -1
  133. package/dist/esm/operations/policies.js +45 -52
  134. package/dist/esm/operations/policies.js.map +1 -1
  135. package/dist/esm/operations/profiles.js +133 -154
  136. package/dist/esm/operations/profiles.js.map +1 -1
  137. package/dist/esm/operations/resourceUsageOperations.js +23 -40
  138. package/dist/esm/operations/resourceUsageOperations.js.map +1 -1
  139. package/dist/esm/operations/routes.js +56 -58
  140. package/dist/esm/operations/routes.js.map +1 -1
  141. package/dist/esm/operations/ruleSets.js +56 -85
  142. package/dist/esm/operations/ruleSets.js.map +1 -1
  143. package/dist/esm/operations/rules.js +56 -58
  144. package/dist/esm/operations/rules.js.map +1 -1
  145. package/dist/esm/operations/secrets.js +45 -52
  146. package/dist/esm/operations/secrets.js.map +1 -1
  147. package/dist/esm/operations/securityPolicies.js +56 -58
  148. package/dist/esm/operations/securityPolicies.js.map +1 -1
  149. package/dist/esm/pagingHelper.js +2 -4
  150. package/dist/esm/pagingHelper.js.map +1 -1
  151. package/dist/react-native/cdnManagementClient.js +34 -5
  152. package/dist/react-native/cdnManagementClient.js.map +1 -1
  153. package/dist/react-native/lroImpl.js +7 -3
  154. package/dist/react-native/lroImpl.js.map +1 -1
  155. package/dist/react-native/models/mappers.js +663 -294
  156. package/dist/react-native/models/mappers.js.map +1 -1
  157. package/dist/react-native/operations/afdCustomDomains.js +67 -64
  158. package/dist/react-native/operations/afdCustomDomains.js.map +1 -1
  159. package/dist/react-native/operations/afdEndpoints.js +89 -103
  160. package/dist/react-native/operations/afdEndpoints.js.map +1 -1
  161. package/dist/react-native/operations/afdOriginGroups.js +78 -97
  162. package/dist/react-native/operations/afdOriginGroups.js.map +1 -1
  163. package/dist/react-native/operations/afdOrigins.js +56 -58
  164. package/dist/react-native/operations/afdOrigins.js.map +1 -1
  165. package/dist/react-native/operations/afdProfiles.js +34 -46
  166. package/dist/react-native/operations/afdProfiles.js.map +1 -1
  167. package/dist/react-native/operations/customDomains.js +67 -64
  168. package/dist/react-native/operations/customDomains.js.map +1 -1
  169. package/dist/react-native/operations/edgeNodes.js +23 -40
  170. package/dist/react-native/operations/edgeNodes.js.map +1 -1
  171. package/dist/react-native/operations/endpoints.js +122 -121
  172. package/dist/react-native/operations/endpoints.js.map +1 -1
  173. package/dist/react-native/operations/logAnalytics.js +1 -0
  174. package/dist/react-native/operations/logAnalytics.js.map +1 -1
  175. package/dist/react-native/operations/managedRuleSets.js +23 -40
  176. package/dist/react-native/operations/managedRuleSets.js.map +1 -1
  177. package/dist/react-native/operations/operations.js +23 -40
  178. package/dist/react-native/operations/operations.js.map +1 -1
  179. package/dist/react-native/operations/originGroups.js +56 -58
  180. package/dist/react-native/operations/originGroups.js.map +1 -1
  181. package/dist/react-native/operations/origins.js +56 -58
  182. package/dist/react-native/operations/origins.js.map +1 -1
  183. package/dist/react-native/operations/policies.js +45 -52
  184. package/dist/react-native/operations/policies.js.map +1 -1
  185. package/dist/react-native/operations/profiles.js +133 -154
  186. package/dist/react-native/operations/profiles.js.map +1 -1
  187. package/dist/react-native/operations/resourceUsageOperations.js +23 -40
  188. package/dist/react-native/operations/resourceUsageOperations.js.map +1 -1
  189. package/dist/react-native/operations/routes.js +56 -58
  190. package/dist/react-native/operations/routes.js.map +1 -1
  191. package/dist/react-native/operations/ruleSets.js +56 -85
  192. package/dist/react-native/operations/ruleSets.js.map +1 -1
  193. package/dist/react-native/operations/rules.js +56 -58
  194. package/dist/react-native/operations/rules.js.map +1 -1
  195. package/dist/react-native/operations/secrets.js +45 -52
  196. package/dist/react-native/operations/secrets.js.map +1 -1
  197. package/dist/react-native/operations/securityPolicies.js +56 -58
  198. package/dist/react-native/operations/securityPolicies.js.map +1 -1
  199. package/dist/react-native/pagingHelper.js +2 -4
  200. package/dist/react-native/pagingHelper.js.map +1 -1
  201. package/package.json +2 -2
@@ -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 AfdOriginGroups operations. */
17
16
  export class AfdOriginGroupsImpl {
17
+ client;
18
18
  /**
19
19
  * Initialize a new instance of the class AfdOriginGroups class.
20
20
  * @param client Reference to the service client
@@ -39,52 +39,35 @@ export class AfdOriginGroupsImpl {
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.listByProfilePagingPage(resourceGroupName, profileName, options, settings);
46
46
  },
47
47
  };
48
48
  }
49
- listByProfilePagingPage(resourceGroupName, profileName, options, settings) {
50
- return __asyncGenerator(this, arguments, function* listByProfilePagingPage_1() {
51
- let result;
52
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
53
- if (!continuationToken) {
54
- result = yield __await(this._listByProfile(resourceGroupName, profileName, 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._listByProfileNext(resourceGroupName, profileName, continuationToken, options));
62
- continuationToken = result.nextLink;
63
- let page = result.value || [];
64
- setContinuationToken(page, continuationToken);
65
- yield yield __await(page);
66
- }
67
- });
49
+ async *listByProfilePagingPage(resourceGroupName, profileName, options, settings) {
50
+ let result;
51
+ let continuationToken = settings?.continuationToken;
52
+ if (!continuationToken) {
53
+ result = await this._listByProfile(resourceGroupName, profileName, 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._listByProfileNext(resourceGroupName, profileName, continuationToken, options);
61
+ continuationToken = result.nextLink;
62
+ let page = result.value || [];
63
+ setContinuationToken(page, continuationToken);
64
+ yield page;
65
+ }
68
66
  }
69
- listByProfilePagingAll(resourceGroupName, profileName, options) {
70
- return __asyncGenerator(this, arguments, function* listByProfilePagingAll_1() {
71
- var _a, e_1, _b, _c;
72
- try {
73
- for (var _d = true, _e = __asyncValues(this.listByProfilePagingPage(resourceGroupName, profileName, 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 *listByProfilePagingAll(resourceGroupName, profileName, options) {
68
+ for await (const page of this.listByProfilePagingPage(resourceGroupName, profileName, options)) {
69
+ yield* page;
70
+ }
88
71
  }
89
72
  /**
90
73
  * Checks the quota and actual usage of endpoints under the given Azure Front Door profile..
@@ -104,52 +87,35 @@ export class AfdOriginGroupsImpl {
104
87
  return this;
105
88
  },
106
89
  byPage: (settings) => {
107
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
90
+ if (settings?.maxPageSize) {
108
91
  throw new Error("maxPageSize is not supported by this operation.");
109
92
  }
110
93
  return this.listResourceUsagePagingPage(resourceGroupName, profileName, originGroupName, options, settings);
111
94
  },
112
95
  };
113
96
  }
114
- listResourceUsagePagingPage(resourceGroupName, profileName, originGroupName, options, settings) {
115
- return __asyncGenerator(this, arguments, function* listResourceUsagePagingPage_1() {
116
- let result;
117
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
118
- if (!continuationToken) {
119
- result = yield __await(this._listResourceUsage(resourceGroupName, profileName, originGroupName, options));
120
- let page = result.value || [];
121
- continuationToken = result.nextLink;
122
- setContinuationToken(page, continuationToken);
123
- yield yield __await(page);
124
- }
125
- while (continuationToken) {
126
- result = yield __await(this._listResourceUsageNext(resourceGroupName, profileName, originGroupName, continuationToken, options));
127
- continuationToken = result.nextLink;
128
- let page = result.value || [];
129
- setContinuationToken(page, continuationToken);
130
- yield yield __await(page);
131
- }
132
- });
97
+ async *listResourceUsagePagingPage(resourceGroupName, profileName, originGroupName, options, settings) {
98
+ let result;
99
+ let continuationToken = settings?.continuationToken;
100
+ if (!continuationToken) {
101
+ result = await this._listResourceUsage(resourceGroupName, profileName, originGroupName, options);
102
+ let page = result.value || [];
103
+ continuationToken = result.nextLink;
104
+ setContinuationToken(page, continuationToken);
105
+ yield page;
106
+ }
107
+ while (continuationToken) {
108
+ result = await this._listResourceUsageNext(resourceGroupName, profileName, originGroupName, continuationToken, options);
109
+ continuationToken = result.nextLink;
110
+ let page = result.value || [];
111
+ setContinuationToken(page, continuationToken);
112
+ yield page;
113
+ }
133
114
  }
134
- listResourceUsagePagingAll(resourceGroupName, profileName, originGroupName, options) {
135
- return __asyncGenerator(this, arguments, function* listResourceUsagePagingAll_1() {
136
- var _a, e_2, _b, _c;
137
- try {
138
- for (var _d = true, _e = __asyncValues(this.listResourceUsagePagingPage(resourceGroupName, profileName, originGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
139
- _c = _f.value;
140
- _d = false;
141
- const page = _c;
142
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
143
- }
144
- }
145
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
146
- finally {
147
- try {
148
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
149
- }
150
- finally { if (e_2) throw e_2.error; }
151
- }
152
- });
115
+ async *listResourceUsagePagingAll(resourceGroupName, profileName, originGroupName, options) {
116
+ for await (const page of this.listResourceUsagePagingPage(resourceGroupName, profileName, originGroupName, options)) {
117
+ yield* page;
118
+ }
153
119
  }
154
120
  /**
155
121
  * Lists all of the existing origin groups within a profile.
@@ -186,14 +152,19 @@ export class AfdOriginGroupsImpl {
186
152
  return this.client.sendOperationRequest(args, spec);
187
153
  };
188
154
  const sendOperationFn = async (args, spec) => {
189
- var _a;
190
155
  let currentRawResponse = undefined;
191
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
156
+ const providedCallback = args.options?.onResponse;
192
157
  const callback = (rawResponse, flatResponse) => {
193
158
  currentRawResponse = rawResponse;
194
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
159
+ providedCallback?.(rawResponse, flatResponse);
160
+ };
161
+ const updatedArgs = {
162
+ ...args,
163
+ options: {
164
+ ...args.options,
165
+ onResponse: callback,
166
+ },
195
167
  };
196
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
197
168
  const flatResponse = await directSendOperation(updatedArgs, spec);
198
169
  return {
199
170
  flatResponse,
@@ -216,8 +187,8 @@ export class AfdOriginGroupsImpl {
216
187
  spec: createOperationSpec,
217
188
  });
218
189
  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,
190
+ restoreFrom: options?.resumeFrom,
191
+ intervalInMs: options?.updateIntervalInMs,
221
192
  resourceLocationConfig: "azure-async-operation",
222
193
  });
223
194
  await poller.poll();
@@ -250,14 +221,19 @@ export class AfdOriginGroupsImpl {
250
221
  return this.client.sendOperationRequest(args, spec);
251
222
  };
252
223
  const sendOperationFn = async (args, spec) => {
253
- var _a;
254
224
  let currentRawResponse = undefined;
255
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
225
+ const providedCallback = args.options?.onResponse;
256
226
  const callback = (rawResponse, flatResponse) => {
257
227
  currentRawResponse = rawResponse;
258
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
228
+ providedCallback?.(rawResponse, flatResponse);
229
+ };
230
+ const updatedArgs = {
231
+ ...args,
232
+ options: {
233
+ ...args.options,
234
+ onResponse: callback,
235
+ },
259
236
  };
260
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
261
237
  const flatResponse = await directSendOperation(updatedArgs, spec);
262
238
  return {
263
239
  flatResponse,
@@ -280,8 +256,8 @@ export class AfdOriginGroupsImpl {
280
256
  spec: updateOperationSpec,
281
257
  });
282
258
  const poller = await createHttpPoller(lro, {
283
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
284
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
259
+ restoreFrom: options?.resumeFrom,
260
+ intervalInMs: options?.updateIntervalInMs,
285
261
  resourceLocationConfig: "azure-async-operation",
286
262
  });
287
263
  await poller.poll();
@@ -313,14 +289,19 @@ export class AfdOriginGroupsImpl {
313
289
  return this.client.sendOperationRequest(args, spec);
314
290
  };
315
291
  const sendOperationFn = async (args, spec) => {
316
- var _a;
317
292
  let currentRawResponse = undefined;
318
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
293
+ const providedCallback = args.options?.onResponse;
319
294
  const callback = (rawResponse, flatResponse) => {
320
295
  currentRawResponse = rawResponse;
321
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
296
+ providedCallback?.(rawResponse, flatResponse);
297
+ };
298
+ const updatedArgs = {
299
+ ...args,
300
+ options: {
301
+ ...args.options,
302
+ onResponse: callback,
303
+ },
322
304
  };
323
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
324
305
  const flatResponse = await directSendOperation(updatedArgs, spec);
325
306
  return {
326
307
  flatResponse,
@@ -337,8 +318,8 @@ export class AfdOriginGroupsImpl {
337
318
  spec: deleteOperationSpec,
338
319
  });
339
320
  const poller = await createHttpPoller(lro, {
340
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
341
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
321
+ restoreFrom: options?.resumeFrom,
322
+ intervalInMs: options?.updateIntervalInMs,
342
323
  resourceLocationConfig: "azure-async-operation",
343
324
  });
344
325
  await poller.poll();
@@ -1 +1 @@
1
- {"version":3,"file":"afdOriginGroups.js","sourceRoot":"","s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AC,iBAAiB;QAC5B,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,kCAAkC,GAA6B;IACnE,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,gBAAgB;SACrC;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,eAAe;KAC3B;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 { AfdOriginGroups } 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 AFDOriginGroup,\n AfdOriginGroupsListByProfileNextOptionalParams,\n AfdOriginGroupsListByProfileOptionalParams,\n AfdOriginGroupsListByProfileResponse,\n Usage,\n AfdOriginGroupsListResourceUsageNextOptionalParams,\n AfdOriginGroupsListResourceUsageOptionalParams,\n AfdOriginGroupsListResourceUsageResponse,\n AfdOriginGroupsGetOptionalParams,\n AfdOriginGroupsGetResponse,\n AfdOriginGroupsCreateOptionalParams,\n AfdOriginGroupsCreateResponse,\n AFDOriginGroupUpdateParameters,\n AfdOriginGroupsUpdateOptionalParams,\n AfdOriginGroupsUpdateResponse,\n AfdOriginGroupsDeleteOptionalParams,\n AfdOriginGroupsListByProfileNextResponse,\n AfdOriginGroupsListResourceUsageNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AfdOriginGroups operations. */\nexport class AfdOriginGroupsImpl implements AfdOriginGroups {\n private readonly client: CdnManagementClient;\n\n /**\n * Initialize a new instance of the class AfdOriginGroups 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 origin groups within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param options The options parameters.\n */\n public listByProfile(\n resourceGroupName: string,\n profileName: string,\n options?: AfdOriginGroupsListByProfileOptionalParams,\n ): PagedAsyncIterableIterator<AFDOriginGroup> {\n const iter = this.listByProfilePagingAll(\n resourceGroupName,\n profileName,\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.listByProfilePagingPage(\n resourceGroupName,\n profileName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByProfilePagingPage(\n resourceGroupName: string,\n profileName: string,\n options?: AfdOriginGroupsListByProfileOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<AFDOriginGroup[]> {\n let result: AfdOriginGroupsListByProfileResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByProfile(\n resourceGroupName,\n profileName,\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._listByProfileNext(\n resourceGroupName,\n profileName,\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 *listByProfilePagingAll(\n resourceGroupName: string,\n profileName: string,\n options?: AfdOriginGroupsListByProfileOptionalParams,\n ): AsyncIterableIterator<AFDOriginGroup> {\n for await (const page of this.listByProfilePagingPage(\n resourceGroupName,\n profileName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Checks the quota and actual usage of endpoints under the given Azure Front Door profile..\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the endpoint.\n * @param options The options parameters.\n */\n public listResourceUsage(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsListResourceUsageOptionalParams,\n ): PagedAsyncIterableIterator<Usage> {\n const iter = this.listResourceUsagePagingAll(\n resourceGroupName,\n profileName,\n originGroupName,\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.listResourceUsagePagingPage(\n resourceGroupName,\n profileName,\n originGroupName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listResourceUsagePagingPage(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsListResourceUsageOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<Usage[]> {\n let result: AfdOriginGroupsListResourceUsageResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listResourceUsage(\n resourceGroupName,\n profileName,\n originGroupName,\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._listResourceUsageNext(\n resourceGroupName,\n profileName,\n originGroupName,\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 *listResourceUsagePagingAll(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsListResourceUsageOptionalParams,\n ): AsyncIterableIterator<Usage> {\n for await (const page of this.listResourceUsagePagingPage(\n resourceGroupName,\n profileName,\n originGroupName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists all of the existing origin groups within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param options The options parameters.\n */\n private _listByProfile(\n resourceGroupName: string,\n profileName: string,\n options?: AfdOriginGroupsListByProfileOptionalParams,\n ): Promise<AfdOriginGroupsListByProfileResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, options },\n listByProfileOperationSpec,\n );\n }\n\n /**\n * Gets an existing origin group within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the endpoint.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsGetOptionalParams,\n ): Promise<AfdOriginGroupsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, originGroupName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Creates a new origin group within the specified profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the endpoint.\n * @param originGroup Origin group properties\n * @param options The options parameters.\n */\n async beginCreate(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n originGroup: AFDOriginGroup,\n options?: AfdOriginGroupsCreateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<AfdOriginGroupsCreateResponse>,\n AfdOriginGroupsCreateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<AfdOriginGroupsCreateResponse> => {\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 originGroupName,\n originGroup,\n options,\n },\n spec: createOperationSpec,\n });\n const poller = await createHttpPoller<\n AfdOriginGroupsCreateResponse,\n OperationState<AfdOriginGroupsCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates a new origin group within the specified profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the endpoint.\n * @param originGroup Origin group properties\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n originGroup: AFDOriginGroup,\n options?: AfdOriginGroupsCreateOptionalParams,\n ): Promise<AfdOriginGroupsCreateResponse> {\n const poller = await this.beginCreate(\n resourceGroupName,\n profileName,\n originGroupName,\n originGroup,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Updates an existing origin group within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the profile.\n * @param originGroupUpdateProperties Origin group properties\n * @param options The options parameters.\n */\n async beginUpdate(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n originGroupUpdateProperties: AFDOriginGroupUpdateParameters,\n options?: AfdOriginGroupsUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<AfdOriginGroupsUpdateResponse>,\n AfdOriginGroupsUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<AfdOriginGroupsUpdateResponse> => {\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 originGroupName,\n originGroupUpdateProperties,\n options,\n },\n spec: updateOperationSpec,\n });\n const poller = await createHttpPoller<\n AfdOriginGroupsUpdateResponse,\n OperationState<AfdOriginGroupsUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Updates an existing origin group within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the profile.\n * @param originGroupUpdateProperties Origin group properties\n * @param options The options parameters.\n */\n async beginUpdateAndWait(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n originGroupUpdateProperties: AFDOriginGroupUpdateParameters,\n options?: AfdOriginGroupsUpdateOptionalParams,\n ): Promise<AfdOriginGroupsUpdateResponse> {\n const poller = await this.beginUpdate(\n resourceGroupName,\n profileName,\n originGroupName,\n originGroupUpdateProperties,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes an existing origin group within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the profile.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsDeleteOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, profileName, originGroupName, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes an existing origin group within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the profile.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsDeleteOptionalParams,\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n profileName,\n originGroupName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Checks the quota and actual usage of endpoints under the given Azure Front Door profile..\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the endpoint.\n * @param options The options parameters.\n */\n private _listResourceUsage(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsListResourceUsageOptionalParams,\n ): Promise<AfdOriginGroupsListResourceUsageResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, originGroupName, options },\n listResourceUsageOperationSpec,\n );\n }\n\n /**\n * ListByProfileNext\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param nextLink The nextLink from the previous successful call to the ListByProfile method.\n * @param options The options parameters.\n */\n private _listByProfileNext(\n resourceGroupName: string,\n profileName: string,\n nextLink: string,\n options?: AfdOriginGroupsListByProfileNextOptionalParams,\n ): Promise<AfdOriginGroupsListByProfileNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, nextLink, options },\n listByProfileNextOperationSpec,\n );\n }\n\n /**\n * ListResourceUsageNext\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the endpoint.\n * @param nextLink The nextLink from the previous successful call to the ListResourceUsage method.\n * @param options The options parameters.\n */\n private _listResourceUsageNext(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n nextLink: string,\n options?: AfdOriginGroupsListResourceUsageNextOptionalParams,\n ): Promise<AfdOriginGroupsListResourceUsageNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, originGroupName, nextLink, options },\n listResourceUsageNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByProfileOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AFDOriginGroupListResult,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.originGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n 201: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n 202: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n 204: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n requestBody: Parameters.originGroup,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.originGroupName,\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}/originGroups/{originGroupName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n 201: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n 202: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n 204: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n requestBody: Parameters.originGroupUpdateProperties,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.originGroupName,\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}/originGroups/{originGroupName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.originGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listResourceUsageOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/usages\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.UsagesListResult,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.originGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByProfileNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AFDOriginGroupListResult,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listResourceUsageNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.UsagesListResult,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.nextLink,\n Parameters.originGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"afdOriginGroups.js","sourceRoot":"","sources":["../../../src/operations/afdOriginGroups.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;AAsB9C,4CAA4C;AAC5C,mDAAmD;AACnD,MAAM,OAAO,mBAAmB;IACb,MAAM,CAAsB;IAE7C;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACI,aAAa,CAClB,iBAAyB,EACzB,WAAmB,EACnB,OAAoD;QAEpD,MAAM,IAAI,GAAG,IAAI,CAAC,sBAAsB,CACtC,iBAAiB,EACjB,WAAW,EACX,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;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AA6B;IACnE,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,gBAAgB;SACrC;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,eAAe;KAC3B;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 { AfdOriginGroups } 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 AFDOriginGroup,\n AfdOriginGroupsListByProfileNextOptionalParams,\n AfdOriginGroupsListByProfileOptionalParams,\n AfdOriginGroupsListByProfileResponse,\n Usage,\n AfdOriginGroupsListResourceUsageNextOptionalParams,\n AfdOriginGroupsListResourceUsageOptionalParams,\n AfdOriginGroupsListResourceUsageResponse,\n AfdOriginGroupsGetOptionalParams,\n AfdOriginGroupsGetResponse,\n AfdOriginGroupsCreateOptionalParams,\n AfdOriginGroupsCreateResponse,\n AFDOriginGroupUpdateParameters,\n AfdOriginGroupsUpdateOptionalParams,\n AfdOriginGroupsUpdateResponse,\n AfdOriginGroupsDeleteOptionalParams,\n AfdOriginGroupsListByProfileNextResponse,\n AfdOriginGroupsListResourceUsageNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AfdOriginGroups operations. */\nexport class AfdOriginGroupsImpl implements AfdOriginGroups {\n private readonly client: CdnManagementClient;\n\n /**\n * Initialize a new instance of the class AfdOriginGroups 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 origin groups within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param options The options parameters.\n */\n public listByProfile(\n resourceGroupName: string,\n profileName: string,\n options?: AfdOriginGroupsListByProfileOptionalParams,\n ): PagedAsyncIterableIterator<AFDOriginGroup> {\n const iter = this.listByProfilePagingAll(\n resourceGroupName,\n profileName,\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.listByProfilePagingPage(\n resourceGroupName,\n profileName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByProfilePagingPage(\n resourceGroupName: string,\n profileName: string,\n options?: AfdOriginGroupsListByProfileOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<AFDOriginGroup[]> {\n let result: AfdOriginGroupsListByProfileResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByProfile(\n resourceGroupName,\n profileName,\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._listByProfileNext(\n resourceGroupName,\n profileName,\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 *listByProfilePagingAll(\n resourceGroupName: string,\n profileName: string,\n options?: AfdOriginGroupsListByProfileOptionalParams,\n ): AsyncIterableIterator<AFDOriginGroup> {\n for await (const page of this.listByProfilePagingPage(\n resourceGroupName,\n profileName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Checks the quota and actual usage of endpoints under the given Azure Front Door profile..\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the endpoint.\n * @param options The options parameters.\n */\n public listResourceUsage(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsListResourceUsageOptionalParams,\n ): PagedAsyncIterableIterator<Usage> {\n const iter = this.listResourceUsagePagingAll(\n resourceGroupName,\n profileName,\n originGroupName,\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.listResourceUsagePagingPage(\n resourceGroupName,\n profileName,\n originGroupName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listResourceUsagePagingPage(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsListResourceUsageOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<Usage[]> {\n let result: AfdOriginGroupsListResourceUsageResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listResourceUsage(\n resourceGroupName,\n profileName,\n originGroupName,\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._listResourceUsageNext(\n resourceGroupName,\n profileName,\n originGroupName,\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 *listResourceUsagePagingAll(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsListResourceUsageOptionalParams,\n ): AsyncIterableIterator<Usage> {\n for await (const page of this.listResourceUsagePagingPage(\n resourceGroupName,\n profileName,\n originGroupName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists all of the existing origin groups within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param options The options parameters.\n */\n private _listByProfile(\n resourceGroupName: string,\n profileName: string,\n options?: AfdOriginGroupsListByProfileOptionalParams,\n ): Promise<AfdOriginGroupsListByProfileResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, options },\n listByProfileOperationSpec,\n );\n }\n\n /**\n * Gets an existing origin group within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the endpoint.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsGetOptionalParams,\n ): Promise<AfdOriginGroupsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, originGroupName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Creates a new origin group within the specified profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the endpoint.\n * @param originGroup Origin group properties\n * @param options The options parameters.\n */\n async beginCreate(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n originGroup: AFDOriginGroup,\n options?: AfdOriginGroupsCreateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<AfdOriginGroupsCreateResponse>,\n AfdOriginGroupsCreateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<AfdOriginGroupsCreateResponse> => {\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 originGroupName,\n originGroup,\n options,\n },\n spec: createOperationSpec,\n });\n const poller = await createHttpPoller<\n AfdOriginGroupsCreateResponse,\n OperationState<AfdOriginGroupsCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates a new origin group within the specified profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the endpoint.\n * @param originGroup Origin group properties\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n originGroup: AFDOriginGroup,\n options?: AfdOriginGroupsCreateOptionalParams,\n ): Promise<AfdOriginGroupsCreateResponse> {\n const poller = await this.beginCreate(\n resourceGroupName,\n profileName,\n originGroupName,\n originGroup,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Updates an existing origin group within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the profile.\n * @param originGroupUpdateProperties Origin group properties\n * @param options The options parameters.\n */\n async beginUpdate(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n originGroupUpdateProperties: AFDOriginGroupUpdateParameters,\n options?: AfdOriginGroupsUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<AfdOriginGroupsUpdateResponse>,\n AfdOriginGroupsUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<AfdOriginGroupsUpdateResponse> => {\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 originGroupName,\n originGroupUpdateProperties,\n options,\n },\n spec: updateOperationSpec,\n });\n const poller = await createHttpPoller<\n AfdOriginGroupsUpdateResponse,\n OperationState<AfdOriginGroupsUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Updates an existing origin group within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the profile.\n * @param originGroupUpdateProperties Origin group properties\n * @param options The options parameters.\n */\n async beginUpdateAndWait(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n originGroupUpdateProperties: AFDOriginGroupUpdateParameters,\n options?: AfdOriginGroupsUpdateOptionalParams,\n ): Promise<AfdOriginGroupsUpdateResponse> {\n const poller = await this.beginUpdate(\n resourceGroupName,\n profileName,\n originGroupName,\n originGroupUpdateProperties,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes an existing origin group within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the profile.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsDeleteOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, profileName, originGroupName, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes an existing origin group within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the profile.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsDeleteOptionalParams,\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n profileName,\n originGroupName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Checks the quota and actual usage of endpoints under the given Azure Front Door profile..\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the endpoint.\n * @param options The options parameters.\n */\n private _listResourceUsage(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsListResourceUsageOptionalParams,\n ): Promise<AfdOriginGroupsListResourceUsageResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, originGroupName, options },\n listResourceUsageOperationSpec,\n );\n }\n\n /**\n * ListByProfileNext\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param nextLink The nextLink from the previous successful call to the ListByProfile method.\n * @param options The options parameters.\n */\n private _listByProfileNext(\n resourceGroupName: string,\n profileName: string,\n nextLink: string,\n options?: AfdOriginGroupsListByProfileNextOptionalParams,\n ): Promise<AfdOriginGroupsListByProfileNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, nextLink, options },\n listByProfileNextOperationSpec,\n );\n }\n\n /**\n * ListResourceUsageNext\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the endpoint.\n * @param nextLink The nextLink from the previous successful call to the ListResourceUsage method.\n * @param options The options parameters.\n */\n private _listResourceUsageNext(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n nextLink: string,\n options?: AfdOriginGroupsListResourceUsageNextOptionalParams,\n ): Promise<AfdOriginGroupsListResourceUsageNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, originGroupName, nextLink, options },\n listResourceUsageNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByProfileOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AFDOriginGroupListResult,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.originGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n 201: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n 202: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n 204: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n requestBody: Parameters.originGroup,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.originGroupName,\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}/originGroups/{originGroupName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n 201: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n 202: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n 204: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n requestBody: Parameters.originGroupUpdateProperties,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.originGroupName,\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}/originGroups/{originGroupName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.originGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listResourceUsageOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/usages\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.UsagesListResult,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.originGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByProfileNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AFDOriginGroupListResult,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listResourceUsageNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.UsagesListResult,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.nextLink,\n Parameters.originGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}