@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.
- package/dist/browser/cdnManagementClient.js +34 -5
- package/dist/browser/cdnManagementClient.js.map +1 -1
- package/dist/browser/lroImpl.js +7 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +663 -294
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/afdCustomDomains.js +67 -64
- package/dist/browser/operations/afdCustomDomains.js.map +1 -1
- package/dist/browser/operations/afdEndpoints.js +89 -103
- package/dist/browser/operations/afdEndpoints.js.map +1 -1
- package/dist/browser/operations/afdOriginGroups.js +78 -97
- package/dist/browser/operations/afdOriginGroups.js.map +1 -1
- package/dist/browser/operations/afdOrigins.js +56 -58
- package/dist/browser/operations/afdOrigins.js.map +1 -1
- package/dist/browser/operations/afdProfiles.js +34 -46
- package/dist/browser/operations/afdProfiles.js.map +1 -1
- package/dist/browser/operations/customDomains.js +67 -64
- package/dist/browser/operations/customDomains.js.map +1 -1
- package/dist/browser/operations/edgeNodes.js +23 -40
- package/dist/browser/operations/edgeNodes.js.map +1 -1
- package/dist/browser/operations/endpoints.js +122 -121
- package/dist/browser/operations/endpoints.js.map +1 -1
- package/dist/browser/operations/logAnalytics.js +1 -0
- package/dist/browser/operations/logAnalytics.js.map +1 -1
- package/dist/browser/operations/managedRuleSets.js +23 -40
- package/dist/browser/operations/managedRuleSets.js.map +1 -1
- package/dist/browser/operations/operations.js +23 -40
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/originGroups.js +56 -58
- package/dist/browser/operations/originGroups.js.map +1 -1
- package/dist/browser/operations/origins.js +56 -58
- package/dist/browser/operations/origins.js.map +1 -1
- package/dist/browser/operations/policies.js +45 -52
- package/dist/browser/operations/policies.js.map +1 -1
- package/dist/browser/operations/profiles.js +133 -154
- package/dist/browser/operations/profiles.js.map +1 -1
- package/dist/browser/operations/resourceUsageOperations.js +23 -40
- package/dist/browser/operations/resourceUsageOperations.js.map +1 -1
- package/dist/browser/operations/routes.js +56 -58
- package/dist/browser/operations/routes.js.map +1 -1
- package/dist/browser/operations/ruleSets.js +56 -85
- package/dist/browser/operations/ruleSets.js.map +1 -1
- package/dist/browser/operations/rules.js +56 -58
- package/dist/browser/operations/rules.js.map +1 -1
- package/dist/browser/operations/secrets.js +45 -52
- package/dist/browser/operations/secrets.js.map +1 -1
- package/dist/browser/operations/securityPolicies.js +56 -58
- package/dist/browser/operations/securityPolicies.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/cdnManagementClient.js +34 -5
- package/dist/commonjs/cdnManagementClient.js.map +1 -1
- package/dist/commonjs/lroImpl.js +7 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +663 -294
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/afdCustomDomains.js +67 -63
- package/dist/commonjs/operations/afdCustomDomains.js.map +1 -1
- package/dist/commonjs/operations/afdEndpoints.js +89 -102
- package/dist/commonjs/operations/afdEndpoints.js.map +1 -1
- package/dist/commonjs/operations/afdOriginGroups.js +78 -96
- package/dist/commonjs/operations/afdOriginGroups.js.map +1 -1
- package/dist/commonjs/operations/afdOrigins.js +56 -57
- package/dist/commonjs/operations/afdOrigins.js.map +1 -1
- package/dist/commonjs/operations/afdProfiles.js +34 -45
- package/dist/commonjs/operations/afdProfiles.js.map +1 -1
- package/dist/commonjs/operations/customDomains.js +67 -63
- package/dist/commonjs/operations/customDomains.js.map +1 -1
- package/dist/commonjs/operations/edgeNodes.js +23 -39
- package/dist/commonjs/operations/edgeNodes.js.map +1 -1
- package/dist/commonjs/operations/endpoints.js +122 -120
- package/dist/commonjs/operations/endpoints.js.map +1 -1
- package/dist/commonjs/operations/logAnalytics.js +1 -0
- package/dist/commonjs/operations/logAnalytics.js.map +1 -1
- package/dist/commonjs/operations/managedRuleSets.js +23 -39
- package/dist/commonjs/operations/managedRuleSets.js.map +1 -1
- package/dist/commonjs/operations/operations.js +23 -39
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/originGroups.js +56 -57
- package/dist/commonjs/operations/originGroups.js.map +1 -1
- package/dist/commonjs/operations/origins.js +56 -57
- package/dist/commonjs/operations/origins.js.map +1 -1
- package/dist/commonjs/operations/policies.js +45 -51
- package/dist/commonjs/operations/policies.js.map +1 -1
- package/dist/commonjs/operations/profiles.js +133 -153
- package/dist/commonjs/operations/profiles.js.map +1 -1
- package/dist/commonjs/operations/resourceUsageOperations.js +23 -39
- package/dist/commonjs/operations/resourceUsageOperations.js.map +1 -1
- package/dist/commonjs/operations/routes.js +56 -57
- package/dist/commonjs/operations/routes.js.map +1 -1
- package/dist/commonjs/operations/ruleSets.js +56 -84
- package/dist/commonjs/operations/ruleSets.js.map +1 -1
- package/dist/commonjs/operations/rules.js +56 -57
- package/dist/commonjs/operations/rules.js.map +1 -1
- package/dist/commonjs/operations/secrets.js +45 -51
- package/dist/commonjs/operations/secrets.js.map +1 -1
- package/dist/commonjs/operations/securityPolicies.js +56 -57
- package/dist/commonjs/operations/securityPolicies.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/cdnManagementClient.js +34 -5
- package/dist/esm/cdnManagementClient.js.map +1 -1
- package/dist/esm/lroImpl.js +7 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +663 -294
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/afdCustomDomains.js +67 -64
- package/dist/esm/operations/afdCustomDomains.js.map +1 -1
- package/dist/esm/operations/afdEndpoints.js +89 -103
- package/dist/esm/operations/afdEndpoints.js.map +1 -1
- package/dist/esm/operations/afdOriginGroups.js +78 -97
- package/dist/esm/operations/afdOriginGroups.js.map +1 -1
- package/dist/esm/operations/afdOrigins.js +56 -58
- package/dist/esm/operations/afdOrigins.js.map +1 -1
- package/dist/esm/operations/afdProfiles.js +34 -46
- package/dist/esm/operations/afdProfiles.js.map +1 -1
- package/dist/esm/operations/customDomains.js +67 -64
- package/dist/esm/operations/customDomains.js.map +1 -1
- package/dist/esm/operations/edgeNodes.js +23 -40
- package/dist/esm/operations/edgeNodes.js.map +1 -1
- package/dist/esm/operations/endpoints.js +122 -121
- package/dist/esm/operations/endpoints.js.map +1 -1
- package/dist/esm/operations/logAnalytics.js +1 -0
- package/dist/esm/operations/logAnalytics.js.map +1 -1
- package/dist/esm/operations/managedRuleSets.js +23 -40
- package/dist/esm/operations/managedRuleSets.js.map +1 -1
- package/dist/esm/operations/operations.js +23 -40
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/originGroups.js +56 -58
- package/dist/esm/operations/originGroups.js.map +1 -1
- package/dist/esm/operations/origins.js +56 -58
- package/dist/esm/operations/origins.js.map +1 -1
- package/dist/esm/operations/policies.js +45 -52
- package/dist/esm/operations/policies.js.map +1 -1
- package/dist/esm/operations/profiles.js +133 -154
- package/dist/esm/operations/profiles.js.map +1 -1
- package/dist/esm/operations/resourceUsageOperations.js +23 -40
- package/dist/esm/operations/resourceUsageOperations.js.map +1 -1
- package/dist/esm/operations/routes.js +56 -58
- package/dist/esm/operations/routes.js.map +1 -1
- package/dist/esm/operations/ruleSets.js +56 -85
- package/dist/esm/operations/ruleSets.js.map +1 -1
- package/dist/esm/operations/rules.js +56 -58
- package/dist/esm/operations/rules.js.map +1 -1
- package/dist/esm/operations/secrets.js +45 -52
- package/dist/esm/operations/secrets.js.map +1 -1
- package/dist/esm/operations/securityPolicies.js +56 -58
- package/dist/esm/operations/securityPolicies.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/cdnManagementClient.js +34 -5
- package/dist/react-native/cdnManagementClient.js.map +1 -1
- package/dist/react-native/lroImpl.js +7 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +663 -294
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/afdCustomDomains.js +67 -64
- package/dist/react-native/operations/afdCustomDomains.js.map +1 -1
- package/dist/react-native/operations/afdEndpoints.js +89 -103
- package/dist/react-native/operations/afdEndpoints.js.map +1 -1
- package/dist/react-native/operations/afdOriginGroups.js +78 -97
- package/dist/react-native/operations/afdOriginGroups.js.map +1 -1
- package/dist/react-native/operations/afdOrigins.js +56 -58
- package/dist/react-native/operations/afdOrigins.js.map +1 -1
- package/dist/react-native/operations/afdProfiles.js +34 -46
- package/dist/react-native/operations/afdProfiles.js.map +1 -1
- package/dist/react-native/operations/customDomains.js +67 -64
- package/dist/react-native/operations/customDomains.js.map +1 -1
- package/dist/react-native/operations/edgeNodes.js +23 -40
- package/dist/react-native/operations/edgeNodes.js.map +1 -1
- package/dist/react-native/operations/endpoints.js +122 -121
- package/dist/react-native/operations/endpoints.js.map +1 -1
- package/dist/react-native/operations/logAnalytics.js +1 -0
- package/dist/react-native/operations/logAnalytics.js.map +1 -1
- package/dist/react-native/operations/managedRuleSets.js +23 -40
- package/dist/react-native/operations/managedRuleSets.js.map +1 -1
- package/dist/react-native/operations/operations.js +23 -40
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/originGroups.js +56 -58
- package/dist/react-native/operations/originGroups.js.map +1 -1
- package/dist/react-native/operations/origins.js +56 -58
- package/dist/react-native/operations/origins.js.map +1 -1
- package/dist/react-native/operations/policies.js +45 -52
- package/dist/react-native/operations/policies.js.map +1 -1
- package/dist/react-native/operations/profiles.js +133 -154
- package/dist/react-native/operations/profiles.js.map +1 -1
- package/dist/react-native/operations/resourceUsageOperations.js +23 -40
- package/dist/react-native/operations/resourceUsageOperations.js.map +1 -1
- package/dist/react-native/operations/routes.js +56 -58
- package/dist/react-native/operations/routes.js.map +1 -1
- package/dist/react-native/operations/ruleSets.js +56 -85
- package/dist/react-native/operations/ruleSets.js.map +1 -1
- package/dist/react-native/operations/rules.js +56 -58
- package/dist/react-native/operations/rules.js.map +1 -1
- package/dist/react-native/operations/secrets.js +45 -52
- package/dist/react-native/operations/secrets.js.map +1 -1
- package/dist/react-native/operations/securityPolicies.js +56 -58
- package/dist/react-native/operations/securityPolicies.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/package.json +2 -2
- /package/review/{arm-cdn.api.md → arm-cdn-node.api.md} +0 -0
|
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
|
|
|
18
18
|
/// <reference lib="esnext.asynciterable" />
|
|
19
19
|
/** Class containing Origins operations. */
|
|
20
20
|
class OriginsImpl {
|
|
21
|
+
client;
|
|
21
22
|
/**
|
|
22
23
|
* Initialize a new instance of the class Origins class.
|
|
23
24
|
* @param client Reference to the service client
|
|
@@ -42,52 +43,35 @@ class OriginsImpl {
|
|
|
42
43
|
return this;
|
|
43
44
|
},
|
|
44
45
|
byPage: (settings) => {
|
|
45
|
-
if (settings
|
|
46
|
+
if (settings?.maxPageSize) {
|
|
46
47
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
47
48
|
}
|
|
48
49
|
return this.listByEndpointPagingPage(resourceGroupName, profileName, endpointName, options, settings);
|
|
49
50
|
},
|
|
50
51
|
};
|
|
51
52
|
}
|
|
52
|
-
listByEndpointPagingPage(resourceGroupName, profileName, endpointName, options, settings) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
});
|
|
53
|
+
async *listByEndpointPagingPage(resourceGroupName, profileName, endpointName, options, settings) {
|
|
54
|
+
let result;
|
|
55
|
+
let continuationToken = settings?.continuationToken;
|
|
56
|
+
if (!continuationToken) {
|
|
57
|
+
result = await this._listByEndpoint(resourceGroupName, profileName, endpointName, options);
|
|
58
|
+
let page = result.value || [];
|
|
59
|
+
continuationToken = result.nextLink;
|
|
60
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
61
|
+
yield page;
|
|
62
|
+
}
|
|
63
|
+
while (continuationToken) {
|
|
64
|
+
result = await this._listByEndpointNext(resourceGroupName, profileName, endpointName, continuationToken, options);
|
|
65
|
+
continuationToken = result.nextLink;
|
|
66
|
+
let page = result.value || [];
|
|
67
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
68
|
+
yield page;
|
|
69
|
+
}
|
|
71
70
|
}
|
|
72
|
-
listByEndpointPagingAll(resourceGroupName, profileName, endpointName, options) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listByEndpointPagingPage(resourceGroupName, profileName, endpointName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
77
|
-
_c = _f.value;
|
|
78
|
-
_d = false;
|
|
79
|
-
const page = _c;
|
|
80
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
84
|
-
finally {
|
|
85
|
-
try {
|
|
86
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
87
|
-
}
|
|
88
|
-
finally { if (e_1) throw e_1.error; }
|
|
89
|
-
}
|
|
90
|
-
});
|
|
71
|
+
async *listByEndpointPagingAll(resourceGroupName, profileName, endpointName, options) {
|
|
72
|
+
for await (const page of this.listByEndpointPagingPage(resourceGroupName, profileName, endpointName, options)) {
|
|
73
|
+
yield* page;
|
|
74
|
+
}
|
|
91
75
|
}
|
|
92
76
|
/**
|
|
93
77
|
* Lists all of the existing origins within an endpoint.
|
|
@@ -124,14 +108,19 @@ class OriginsImpl {
|
|
|
124
108
|
return this.client.sendOperationRequest(args, spec);
|
|
125
109
|
};
|
|
126
110
|
const sendOperationFn = async (args, spec) => {
|
|
127
|
-
var _a;
|
|
128
111
|
let currentRawResponse = undefined;
|
|
129
|
-
const providedCallback =
|
|
112
|
+
const providedCallback = args.options?.onResponse;
|
|
130
113
|
const callback = (rawResponse, flatResponse) => {
|
|
131
114
|
currentRawResponse = rawResponse;
|
|
132
|
-
providedCallback
|
|
115
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
116
|
+
};
|
|
117
|
+
const updatedArgs = {
|
|
118
|
+
...args,
|
|
119
|
+
options: {
|
|
120
|
+
...args.options,
|
|
121
|
+
onResponse: callback,
|
|
122
|
+
},
|
|
133
123
|
};
|
|
134
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
135
124
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
136
125
|
return {
|
|
137
126
|
flatResponse,
|
|
@@ -155,8 +144,8 @@ class OriginsImpl {
|
|
|
155
144
|
spec: createOperationSpec,
|
|
156
145
|
});
|
|
157
146
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
158
|
-
restoreFrom: options
|
|
159
|
-
intervalInMs: options
|
|
147
|
+
restoreFrom: options?.resumeFrom,
|
|
148
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
160
149
|
});
|
|
161
150
|
await poller.poll();
|
|
162
151
|
return poller;
|
|
@@ -188,14 +177,19 @@ class OriginsImpl {
|
|
|
188
177
|
return this.client.sendOperationRequest(args, spec);
|
|
189
178
|
};
|
|
190
179
|
const sendOperationFn = async (args, spec) => {
|
|
191
|
-
var _a;
|
|
192
180
|
let currentRawResponse = undefined;
|
|
193
|
-
const providedCallback =
|
|
181
|
+
const providedCallback = args.options?.onResponse;
|
|
194
182
|
const callback = (rawResponse, flatResponse) => {
|
|
195
183
|
currentRawResponse = rawResponse;
|
|
196
|
-
providedCallback
|
|
184
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
185
|
+
};
|
|
186
|
+
const updatedArgs = {
|
|
187
|
+
...args,
|
|
188
|
+
options: {
|
|
189
|
+
...args.options,
|
|
190
|
+
onResponse: callback,
|
|
191
|
+
},
|
|
197
192
|
};
|
|
198
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
199
193
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
200
194
|
return {
|
|
201
195
|
flatResponse,
|
|
@@ -219,8 +213,8 @@ class OriginsImpl {
|
|
|
219
213
|
spec: updateOperationSpec,
|
|
220
214
|
});
|
|
221
215
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
222
|
-
restoreFrom: options
|
|
223
|
-
intervalInMs: options
|
|
216
|
+
restoreFrom: options?.resumeFrom,
|
|
217
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
224
218
|
});
|
|
225
219
|
await poller.poll();
|
|
226
220
|
return poller;
|
|
@@ -251,14 +245,19 @@ class OriginsImpl {
|
|
|
251
245
|
return this.client.sendOperationRequest(args, spec);
|
|
252
246
|
};
|
|
253
247
|
const sendOperationFn = async (args, spec) => {
|
|
254
|
-
var _a;
|
|
255
248
|
let currentRawResponse = undefined;
|
|
256
|
-
const providedCallback =
|
|
249
|
+
const providedCallback = args.options?.onResponse;
|
|
257
250
|
const callback = (rawResponse, flatResponse) => {
|
|
258
251
|
currentRawResponse = rawResponse;
|
|
259
|
-
providedCallback
|
|
252
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
253
|
+
};
|
|
254
|
+
const updatedArgs = {
|
|
255
|
+
...args,
|
|
256
|
+
options: {
|
|
257
|
+
...args.options,
|
|
258
|
+
onResponse: callback,
|
|
259
|
+
},
|
|
260
260
|
};
|
|
261
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
262
261
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
263
262
|
return {
|
|
264
263
|
flatResponse,
|
|
@@ -281,8 +280,8 @@ class OriginsImpl {
|
|
|
281
280
|
spec: deleteOperationSpec,
|
|
282
281
|
});
|
|
283
282
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
284
|
-
restoreFrom: options
|
|
285
|
-
intervalInMs: options
|
|
283
|
+
restoreFrom: options?.resumeFrom,
|
|
284
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
286
285
|
});
|
|
287
286
|
await poller.poll();
|
|
288
287
|
return poller;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"origins.js","sourceRoot":"","sources":["../../../src/operations/origins.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAiB9C,4CAA4C;AAC5C,2CAA2C;AAC3C,MAAa,WAAW;IAGtB;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACI,cAAc,CACnB,iBAAyB,EACzB,WAAmB,EACnB,YAAoB,EACpB,OAA6C;QAE7C,MAAM,IAAI,GAAG,IAAI,CAAC,uBAAuB,CACvC,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,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;gBAClC,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6B;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,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAiB9C,4CAA4C;AAC5C,2CAA2C;AAC3C,MAAa,WAAW;IACL,MAAM,CAAsB;IAE7C;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACI,cAAc,CACnB,iBAAyB,EACzB,WAAmB,EACnB,YAAoB,EACpB,OAA6C;Q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,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"]}
|
|
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
|
|
|
18
18
|
/// <reference lib="esnext.asynciterable" />
|
|
19
19
|
/** Class containing Policies operations. */
|
|
20
20
|
class PoliciesImpl {
|
|
21
|
+
client;
|
|
21
22
|
/**
|
|
22
23
|
* Initialize a new instance of the class Policies class.
|
|
23
24
|
* @param client Reference to the service client
|
|
@@ -40,52 +41,35 @@ class PoliciesImpl {
|
|
|
40
41
|
return this;
|
|
41
42
|
},
|
|
42
43
|
byPage: (settings) => {
|
|
43
|
-
if (settings
|
|
44
|
+
if (settings?.maxPageSize) {
|
|
44
45
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
45
46
|
}
|
|
46
47
|
return this.listPagingPage(resourceGroupName, options, settings);
|
|
47
48
|
},
|
|
48
49
|
};
|
|
49
50
|
}
|
|
50
|
-
listPagingPage(resourceGroupName, options, settings) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
});
|
|
51
|
+
async *listPagingPage(resourceGroupName, options, settings) {
|
|
52
|
+
let result;
|
|
53
|
+
let continuationToken = settings?.continuationToken;
|
|
54
|
+
if (!continuationToken) {
|
|
55
|
+
result = await this._list(resourceGroupName, options);
|
|
56
|
+
let page = result.value || [];
|
|
57
|
+
continuationToken = result.nextLink;
|
|
58
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
59
|
+
yield page;
|
|
60
|
+
}
|
|
61
|
+
while (continuationToken) {
|
|
62
|
+
result = await this._listNext(resourceGroupName, continuationToken, options);
|
|
63
|
+
continuationToken = result.nextLink;
|
|
64
|
+
let page = result.value || [];
|
|
65
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
66
|
+
yield page;
|
|
67
|
+
}
|
|
69
68
|
}
|
|
70
|
-
listPagingAll(resourceGroupName, options) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(resourceGroupName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
75
|
-
_c = _f.value;
|
|
76
|
-
_d = false;
|
|
77
|
-
const page = _c;
|
|
78
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
82
|
-
finally {
|
|
83
|
-
try {
|
|
84
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
85
|
-
}
|
|
86
|
-
finally { if (e_1) throw e_1.error; }
|
|
87
|
-
}
|
|
88
|
-
});
|
|
69
|
+
async *listPagingAll(resourceGroupName, options) {
|
|
70
|
+
for await (const page of this.listPagingPage(resourceGroupName, options)) {
|
|
71
|
+
yield* page;
|
|
72
|
+
}
|
|
89
73
|
}
|
|
90
74
|
/**
|
|
91
75
|
* Lists all of the protection policies within a resource group.
|
|
@@ -116,14 +100,19 @@ class PoliciesImpl {
|
|
|
116
100
|
return this.client.sendOperationRequest(args, spec);
|
|
117
101
|
};
|
|
118
102
|
const sendOperationFn = async (args, spec) => {
|
|
119
|
-
var _a;
|
|
120
103
|
let currentRawResponse = undefined;
|
|
121
|
-
const providedCallback =
|
|
104
|
+
const providedCallback = args.options?.onResponse;
|
|
122
105
|
const callback = (rawResponse, flatResponse) => {
|
|
123
106
|
currentRawResponse = rawResponse;
|
|
124
|
-
providedCallback
|
|
107
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
108
|
+
};
|
|
109
|
+
const updatedArgs = {
|
|
110
|
+
...args,
|
|
111
|
+
options: {
|
|
112
|
+
...args.options,
|
|
113
|
+
onResponse: callback,
|
|
114
|
+
},
|
|
125
115
|
};
|
|
126
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
127
116
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
128
117
|
return {
|
|
129
118
|
flatResponse,
|
|
@@ -145,8 +134,8 @@ class PoliciesImpl {
|
|
|
145
134
|
spec: createOrUpdateOperationSpec,
|
|
146
135
|
});
|
|
147
136
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
148
|
-
restoreFrom: options
|
|
149
|
-
intervalInMs: options
|
|
137
|
+
restoreFrom: options?.resumeFrom,
|
|
138
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
150
139
|
});
|
|
151
140
|
await poller.poll();
|
|
152
141
|
return poller;
|
|
@@ -176,14 +165,19 @@ class PoliciesImpl {
|
|
|
176
165
|
return this.client.sendOperationRequest(args, spec);
|
|
177
166
|
};
|
|
178
167
|
const sendOperationFn = async (args, spec) => {
|
|
179
|
-
var _a;
|
|
180
168
|
let currentRawResponse = undefined;
|
|
181
|
-
const providedCallback =
|
|
169
|
+
const providedCallback = args.options?.onResponse;
|
|
182
170
|
const callback = (rawResponse, flatResponse) => {
|
|
183
171
|
currentRawResponse = rawResponse;
|
|
184
|
-
providedCallback
|
|
172
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
173
|
+
};
|
|
174
|
+
const updatedArgs = {
|
|
175
|
+
...args,
|
|
176
|
+
options: {
|
|
177
|
+
...args.options,
|
|
178
|
+
onResponse: callback,
|
|
179
|
+
},
|
|
185
180
|
};
|
|
186
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
187
181
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
188
182
|
return {
|
|
189
183
|
flatResponse,
|
|
@@ -205,8 +199,8 @@ class PoliciesImpl {
|
|
|
205
199
|
spec: updateOperationSpec,
|
|
206
200
|
});
|
|
207
201
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
208
|
-
restoreFrom: options
|
|
209
|
-
intervalInMs: options
|
|
202
|
+
restoreFrom: options?.resumeFrom,
|
|
203
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
210
204
|
});
|
|
211
205
|
await poller.poll();
|
|
212
206
|
return poller;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policies.js","sourceRoot":"","sources":["../../../src/operations/policies.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAiB9C,4CAA4C;AAC5C,4CAA4C;A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,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,2IAA2I;IACjJ,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,OAAO,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,kBAAkB;QAC7B,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mCAAmC;SACxD;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,QAAQ;QACnB,UAAU,CAAC,kBAAkB;KAC9B;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 { Policies } 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 CdnWebApplicationFirewallPolicy,\n PoliciesListNextOptionalParams,\n PoliciesListOptionalParams,\n PoliciesListResponse,\n PoliciesGetOptionalParams,\n PoliciesGetResponse,\n PoliciesCreateOrUpdateOptionalParams,\n PoliciesCreateOrUpdateResponse,\n CdnWebApplicationFirewallPolicyPatchParameters,\n PoliciesUpdateOptionalParams,\n PoliciesUpdateResponse,\n PoliciesDeleteOptionalParams,\n PoliciesListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Policies operations. */\nexport class PoliciesImpl implements Policies {\n private readonly client: CdnManagementClient;\n\n /**\n * Initialize a new instance of the class Policies 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 protection policies within a resource group.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param options The options parameters.\n */\n public list(\n resourceGroupName: string,\n options?: PoliciesListOptionalParams,\n ): PagedAsyncIterableIterator<CdnWebApplicationFirewallPolicy> {\n const iter = this.listPagingAll(resourceGroupName, options);\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.listPagingPage(resourceGroupName, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n resourceGroupName: string,\n options?: PoliciesListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<CdnWebApplicationFirewallPolicy[]> {\n let result: PoliciesListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(resourceGroupName, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(\n resourceGroupName,\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 *listPagingAll(\n resourceGroupName: string,\n options?: PoliciesListOptionalParams,\n ): AsyncIterableIterator<CdnWebApplicationFirewallPolicy> {\n for await (const page of this.listPagingPage(resourceGroupName, options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all of the protection policies within a resource group.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param options The options parameters.\n */\n private _list(\n resourceGroupName: string,\n options?: PoliciesListOptionalParams,\n ): Promise<PoliciesListResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listOperationSpec,\n );\n }\n\n /**\n * Retrieve protection policy with specified name within a resource group.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param policyName The name of the CdnWebApplicationFirewallPolicy.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n policyName: string,\n options?: PoliciesGetOptionalParams,\n ): Promise<PoliciesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, policyName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Create or update policy with specified rule set name within a resource group.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param policyName The name of the CdnWebApplicationFirewallPolicy.\n * @param cdnWebApplicationFirewallPolicy Policy to be created.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n policyName: string,\n cdnWebApplicationFirewallPolicy: CdnWebApplicationFirewallPolicy,\n options?: PoliciesCreateOrUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<PoliciesCreateOrUpdateResponse>,\n PoliciesCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<PoliciesCreateOrUpdateResponse> => {\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 policyName,\n cdnWebApplicationFirewallPolicy,\n options,\n },\n spec: createOrUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n PoliciesCreateOrUpdateResponse,\n OperationState<PoliciesCreateOrUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Create or update policy with specified rule set name within a resource group.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param policyName The name of the CdnWebApplicationFirewallPolicy.\n * @param cdnWebApplicationFirewallPolicy Policy to be created.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n policyName: string,\n cdnWebApplicationFirewallPolicy: CdnWebApplicationFirewallPolicy,\n options?: PoliciesCreateOrUpdateOptionalParams,\n ): Promise<PoliciesCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n policyName,\n cdnWebApplicationFirewallPolicy,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the\n * specified subscription and resource group\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param policyName The name of the CdnWebApplicationFirewallPolicy.\n * @param cdnWebApplicationFirewallPolicyPatchParameters CdnWebApplicationFirewallPolicy parameters to\n * be patched.\n * @param options The options parameters.\n */\n async beginUpdate(\n resourceGroupName: string,\n policyName: string,\n cdnWebApplicationFirewallPolicyPatchParameters: CdnWebApplicationFirewallPolicyPatchParameters,\n options?: PoliciesUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<PoliciesUpdateResponse>,\n PoliciesUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<PoliciesUpdateResponse> => {\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 policyName,\n cdnWebApplicationFirewallPolicyPatchParameters,\n options,\n },\n spec: updateOperationSpec,\n });\n const poller = await createHttpPoller<\n PoliciesUpdateResponse,\n OperationState<PoliciesUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the\n * specified subscription and resource group\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param policyName The name of the CdnWebApplicationFirewallPolicy.\n * @param cdnWebApplicationFirewallPolicyPatchParameters CdnWebApplicationFirewallPolicy parameters to\n * be patched.\n * @param options The options parameters.\n */\n async beginUpdateAndWait(\n resourceGroupName: string,\n policyName: string,\n cdnWebApplicationFirewallPolicyPatchParameters: CdnWebApplicationFirewallPolicyPatchParameters,\n options?: PoliciesUpdateOptionalParams,\n ): Promise<PoliciesUpdateResponse> {\n const poller = await this.beginUpdate(\n resourceGroupName,\n policyName,\n cdnWebApplicationFirewallPolicyPatchParameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes Policy\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param policyName The name of the CdnWebApplicationFirewallPolicy.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n policyName: string,\n options?: PoliciesDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, policyName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * ListNext\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n resourceGroupName: string,\n nextLink: string,\n options?: PoliciesListNextOptionalParams,\n ): Promise<PoliciesListNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.CdnWebApplicationFirewallPolicyList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName1,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies/{policyName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.CdnWebApplicationFirewallPolicy,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName1,\n Parameters.policyName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies/{policyName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.CdnWebApplicationFirewallPolicy,\n },\n 201: {\n bodyMapper: Mappers.CdnWebApplicationFirewallPolicy,\n },\n 202: {\n bodyMapper: Mappers.CdnWebApplicationFirewallPolicy,\n },\n 204: {\n bodyMapper: Mappers.CdnWebApplicationFirewallPolicy,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.cdnWebApplicationFirewallPolicy,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName1,\n Parameters.policyName,\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/cdnWebApplicationFirewallPolicies/{policyName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.CdnWebApplicationFirewallPolicy,\n },\n 201: {\n bodyMapper: Mappers.CdnWebApplicationFirewallPolicy,\n },\n 202: {\n bodyMapper: Mappers.CdnWebApplicationFirewallPolicy,\n },\n 204: {\n bodyMapper: Mappers.CdnWebApplicationFirewallPolicy,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.cdnWebApplicationFirewallPolicyPatchParameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName1,\n Parameters.policyName,\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/cdnWebApplicationFirewallPolicies/{policyName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName1,\n Parameters.policyName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.CdnWebApplicationFirewallPolicyList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n Parameters.resourceGroupName1,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"policies.js","sourceRoot":"","sources":["../../../src/operations/policies.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAiB9C,4CAA4C;AAC5C,4CAA4C;AAC5C,MAAa,YAAY;IACN,MAAM,CAAsB;IAE7C;;;OAGG;IACH,Y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ACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,kBAAkB;QAC7B,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mCAAmC;SACxD;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,QAAQ;QACnB,UAAU,CAAC,kBAAkB;KAC9B;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 { Policies } 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 CdnWebApplicationFirewallPolicy,\n PoliciesListNextOptionalParams,\n PoliciesListOptionalParams,\n PoliciesListResponse,\n PoliciesGetOptionalParams,\n PoliciesGetResponse,\n PoliciesCreateOrUpdateOptionalParams,\n PoliciesCreateOrUpdateResponse,\n CdnWebApplicationFirewallPolicyPatchParameters,\n PoliciesUpdateOptionalParams,\n PoliciesUpdateResponse,\n PoliciesDeleteOptionalParams,\n PoliciesListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Policies operations. */\nexport class PoliciesImpl implements Policies {\n private readonly client: CdnManagementClient;\n\n /**\n * Initialize a new instance of the class Policies 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 protection policies within a resource group.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param options The options parameters.\n */\n public list(\n resourceGroupName: string,\n options?: PoliciesListOptionalParams,\n ): PagedAsyncIterableIterator<CdnWebApplicationFirewallPolicy> {\n const iter = this.listPagingAll(resourceGroupName, options);\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.listPagingPage(resourceGroupName, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n resourceGroupName: string,\n options?: PoliciesListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<CdnWebApplicationFirewallPolicy[]> {\n let result: PoliciesListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(resourceGroupName, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(\n resourceGroupName,\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 *listPagingAll(\n resourceGroupName: string,\n options?: PoliciesListOptionalParams,\n ): AsyncIterableIterator<CdnWebApplicationFirewallPolicy> {\n for await (const page of this.listPagingPage(resourceGroupName, options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all of the protection policies within a resource group.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param options The options parameters.\n */\n private _list(\n resourceGroupName: string,\n options?: PoliciesListOptionalParams,\n ): Promise<PoliciesListResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listOperationSpec,\n );\n }\n\n /**\n * Retrieve protection policy with specified name within a resource group.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param policyName The name of the CdnWebApplicationFirewallPolicy.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n policyName: string,\n options?: PoliciesGetOptionalParams,\n ): Promise<PoliciesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, policyName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Create or update policy with specified rule set name within a resource group.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param policyName The name of the CdnWebApplicationFirewallPolicy.\n * @param cdnWebApplicationFirewallPolicy Policy to be created.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n policyName: string,\n cdnWebApplicationFirewallPolicy: CdnWebApplicationFirewallPolicy,\n options?: PoliciesCreateOrUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<PoliciesCreateOrUpdateResponse>,\n PoliciesCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<PoliciesCreateOrUpdateResponse> => {\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 policyName,\n cdnWebApplicationFirewallPolicy,\n options,\n },\n spec: createOrUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n PoliciesCreateOrUpdateResponse,\n OperationState<PoliciesCreateOrUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Create or update policy with specified rule set name within a resource group.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param policyName The name of the CdnWebApplicationFirewallPolicy.\n * @param cdnWebApplicationFirewallPolicy Policy to be created.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n policyName: string,\n cdnWebApplicationFirewallPolicy: CdnWebApplicationFirewallPolicy,\n options?: PoliciesCreateOrUpdateOptionalParams,\n ): Promise<PoliciesCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n policyName,\n cdnWebApplicationFirewallPolicy,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the\n * specified subscription and resource group\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param policyName The name of the CdnWebApplicationFirewallPolicy.\n * @param cdnWebApplicationFirewallPolicyPatchParameters CdnWebApplicationFirewallPolicy parameters to\n * be patched.\n * @param options The options parameters.\n */\n async beginUpdate(\n resourceGroupName: string,\n policyName: string,\n cdnWebApplicationFirewallPolicyPatchParameters: CdnWebApplicationFirewallPolicyPatchParameters,\n options?: PoliciesUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<PoliciesUpdateResponse>,\n PoliciesUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<PoliciesUpdateResponse> => {\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 policyName,\n cdnWebApplicationFirewallPolicyPatchParameters,\n options,\n },\n spec: updateOperationSpec,\n });\n const poller = await createHttpPoller<\n PoliciesUpdateResponse,\n OperationState<PoliciesUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the\n * specified subscription and resource group\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param policyName The name of the CdnWebApplicationFirewallPolicy.\n * @param cdnWebApplicationFirewallPolicyPatchParameters CdnWebApplicationFirewallPolicy parameters to\n * be patched.\n * @param options The options parameters.\n */\n async beginUpdateAndWait(\n resourceGroupName: string,\n policyName: string,\n cdnWebApplicationFirewallPolicyPatchParameters: CdnWebApplicationFirewallPolicyPatchParameters,\n options?: PoliciesUpdateOptionalParams,\n ): Promise<PoliciesUpdateResponse> {\n const poller = await this.beginUpdate(\n resourceGroupName,\n policyName,\n cdnWebApplicationFirewallPolicyPatchParameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes Policy\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param policyName The name of the CdnWebApplicationFirewallPolicy.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n policyName: string,\n options?: PoliciesDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, policyName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * ListNext\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n resourceGroupName: string,\n nextLink: string,\n options?: PoliciesListNextOptionalParams,\n ): Promise<PoliciesListNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.CdnWebApplicationFirewallPolicyList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName1,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies/{policyName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.CdnWebApplicationFirewallPolicy,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName1,\n Parameters.policyName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/cdnWebApplicationFirewallPolicies/{policyName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.CdnWebApplicationFirewallPolicy,\n },\n 201: {\n bodyMapper: Mappers.CdnWebApplicationFirewallPolicy,\n },\n 202: {\n bodyMapper: Mappers.CdnWebApplicationFirewallPolicy,\n },\n 204: {\n bodyMapper: Mappers.CdnWebApplicationFirewallPolicy,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.cdnWebApplicationFirewallPolicy,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName1,\n Parameters.policyName,\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/cdnWebApplicationFirewallPolicies/{policyName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.CdnWebApplicationFirewallPolicy,\n },\n 201: {\n bodyMapper: Mappers.CdnWebApplicationFirewallPolicy,\n },\n 202: {\n bodyMapper: Mappers.CdnWebApplicationFirewallPolicy,\n },\n 204: {\n bodyMapper: Mappers.CdnWebApplicationFirewallPolicy,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.cdnWebApplicationFirewallPolicyPatchParameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName1,\n Parameters.policyName,\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/cdnWebApplicationFirewallPolicies/{policyName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName1,\n Parameters.policyName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.CdnWebApplicationFirewallPolicyList,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n Parameters.resourceGroupName1,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|