@azure/arm-networkfunction 2.0.2-alpha.20260302.1 → 2.0.2-alpha.20260303.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/commonjs/azureTrafficCollectorClient.js +131 -115
  2. package/dist/commonjs/azureTrafficCollectorClient.js.map +7 -1
  3. package/dist/commonjs/index.js +28 -19
  4. package/dist/commonjs/index.js.map +7 -1
  5. package/dist/commonjs/lroImpl.js +40 -35
  6. package/dist/commonjs/lroImpl.js.map +7 -1
  7. package/dist/commonjs/models/index.js +64 -69
  8. package/dist/commonjs/models/index.js.map +7 -1
  9. package/dist/commonjs/models/mappers.js +502 -473
  10. package/dist/commonjs/models/mappers.js.map +7 -1
  11. package/dist/commonjs/models/parameters.js +154 -127
  12. package/dist/commonjs/models/parameters.js.map +7 -1
  13. package/dist/commonjs/operations/azureTrafficCollectors.js +293 -249
  14. package/dist/commonjs/operations/azureTrafficCollectors.js.map +7 -1
  15. package/dist/commonjs/operations/azureTrafficCollectorsByResourceGroup.js +152 -122
  16. package/dist/commonjs/operations/azureTrafficCollectorsByResourceGroup.js.map +7 -1
  17. package/dist/commonjs/operations/azureTrafficCollectorsBySubscription.js +137 -114
  18. package/dist/commonjs/operations/azureTrafficCollectorsBySubscription.js.map +7 -1
  19. package/dist/commonjs/operations/collectorPolicies.js +454 -381
  20. package/dist/commonjs/operations/collectorPolicies.js.map +7 -1
  21. package/dist/commonjs/operations/index.js +21 -16
  22. package/dist/commonjs/operations/index.js.map +7 -1
  23. package/dist/commonjs/operations/networkFunction.js +100 -77
  24. package/dist/commonjs/operations/networkFunction.js.map +7 -1
  25. package/dist/commonjs/operationsInterfaces/azureTrafficCollectors.js +15 -10
  26. package/dist/commonjs/operationsInterfaces/azureTrafficCollectors.js.map +7 -1
  27. package/dist/commonjs/operationsInterfaces/azureTrafficCollectorsByResourceGroup.js +15 -10
  28. package/dist/commonjs/operationsInterfaces/azureTrafficCollectorsByResourceGroup.js.map +7 -1
  29. package/dist/commonjs/operationsInterfaces/azureTrafficCollectorsBySubscription.js +15 -10
  30. package/dist/commonjs/operationsInterfaces/azureTrafficCollectorsBySubscription.js.map +7 -1
  31. package/dist/commonjs/operationsInterfaces/collectorPolicies.js +15 -10
  32. package/dist/commonjs/operationsInterfaces/collectorPolicies.js.map +7 -1
  33. package/dist/commonjs/operationsInterfaces/index.js +21 -16
  34. package/dist/commonjs/operationsInterfaces/index.js.map +7 -1
  35. package/dist/commonjs/operationsInterfaces/networkFunction.js +15 -10
  36. package/dist/commonjs/operationsInterfaces/networkFunction.js.map +7 -1
  37. package/dist/commonjs/pagingHelper.js +34 -30
  38. package/dist/commonjs/pagingHelper.js.map +7 -1
  39. package/dist/esm/azureTrafficCollectorClient.js +107 -109
  40. package/dist/esm/azureTrafficCollectorClient.js.map +7 -1
  41. package/dist/esm/index.js +6 -11
  42. package/dist/esm/index.js.map +7 -1
  43. package/dist/esm/lroImpl.js +22 -32
  44. package/dist/esm/lroImpl.js.map +7 -1
  45. package/dist/esm/models/index.js +45 -66
  46. package/dist/esm/models/index.js.map +7 -1
  47. package/dist/esm/models/mappers.js +483 -470
  48. package/dist/esm/models/mappers.js.map +7 -1
  49. package/dist/esm/models/parameters.js +143 -128
  50. package/dist/esm/models/parameters.js.map +7 -1
  51. package/dist/esm/operations/azureTrafficCollectors.js +260 -240
  52. package/dist/esm/operations/azureTrafficCollectors.js.map +7 -1
  53. package/dist/esm/operations/azureTrafficCollectorsByResourceGroup.js +120 -114
  54. package/dist/esm/operations/azureTrafficCollectorsByResourceGroup.js.map +7 -1
  55. package/dist/esm/operations/azureTrafficCollectorsBySubscription.js +105 -106
  56. package/dist/esm/operations/azureTrafficCollectorsBySubscription.js.map +7 -1
  57. package/dist/esm/operations/collectorPolicies.js +420 -371
  58. package/dist/esm/operations/collectorPolicies.js.map +7 -1
  59. package/dist/esm/operations/index.js +0 -8
  60. package/dist/esm/operations/index.js.map +7 -1
  61. package/dist/esm/operations/networkFunction.js +69 -70
  62. package/dist/esm/operations/networkFunction.js.map +7 -1
  63. package/dist/esm/operationsInterfaces/azureTrafficCollectors.js +0 -9
  64. package/dist/esm/operationsInterfaces/azureTrafficCollectors.js.map +7 -1
  65. package/dist/esm/operationsInterfaces/azureTrafficCollectorsByResourceGroup.js +0 -9
  66. package/dist/esm/operationsInterfaces/azureTrafficCollectorsByResourceGroup.js.map +7 -1
  67. package/dist/esm/operationsInterfaces/azureTrafficCollectorsBySubscription.js +0 -9
  68. package/dist/esm/operationsInterfaces/azureTrafficCollectorsBySubscription.js.map +7 -1
  69. package/dist/esm/operationsInterfaces/collectorPolicies.js +0 -9
  70. package/dist/esm/operationsInterfaces/collectorPolicies.js.map +7 -1
  71. package/dist/esm/operationsInterfaces/index.js +0 -8
  72. package/dist/esm/operationsInterfaces/index.js.map +7 -1
  73. package/dist/esm/operationsInterfaces/networkFunction.js +0 -9
  74. package/dist/esm/operationsInterfaces/networkFunction.js.map +7 -1
  75. package/dist/esm/pagingHelper.js +17 -28
  76. package/dist/esm/pagingHelper.js.map +7 -1
  77. package/package.json +4 -21
@@ -1,406 +1,479 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) Microsoft Corporation.
4
- * Licensed under the MIT License.
5
- *
6
- * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.CollectorPoliciesImpl = void 0;
11
- const tslib_1 = require("tslib");
12
- const pagingHelper_js_1 = require("../pagingHelper.js");
13
- const coreClient = tslib_1.__importStar(require("@azure/core-client"));
14
- const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
15
- const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
16
- const core_lro_1 = require("@azure/core-lro");
17
- const lroImpl_js_1 = require("../lroImpl.js");
18
- /// <reference lib="esnext.asynciterable" />
19
- /** Class containing CollectorPolicies operations. */
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var collectorPolicies_exports = {};
29
+ __export(collectorPolicies_exports, {
30
+ CollectorPoliciesImpl: () => CollectorPoliciesImpl
31
+ });
32
+ module.exports = __toCommonJS(collectorPolicies_exports);
33
+ var import_pagingHelper = require("../pagingHelper.js");
34
+ var coreClient = __toESM(require("@azure/core-client"));
35
+ var Mappers = __toESM(require("../models/mappers.js"));
36
+ var Parameters = __toESM(require("../models/parameters.js"));
37
+ var import_core_lro = require("@azure/core-lro");
38
+ var import_lroImpl = require("../lroImpl.js");
20
39
  class CollectorPoliciesImpl {
21
- client;
22
- /**
23
- * Initialize a new instance of the class CollectorPolicies class.
24
- * @param client Reference to the service client
25
- */
26
- constructor(client) {
27
- this.client = client;
40
+ client;
41
+ /**
42
+ * Initialize a new instance of the class CollectorPolicies class.
43
+ * @param client Reference to the service client
44
+ */
45
+ constructor(client) {
46
+ this.client = client;
47
+ }
48
+ /**
49
+ * Return list of Collector policies in a Azure Traffic Collector
50
+ * @param resourceGroupName The name of the resource group.
51
+ * @param azureTrafficCollectorName Azure Traffic Collector name
52
+ * @param options The options parameters.
53
+ */
54
+ list(resourceGroupName, azureTrafficCollectorName, options) {
55
+ const iter = this.listPagingAll(
56
+ resourceGroupName,
57
+ azureTrafficCollectorName,
58
+ options
59
+ );
60
+ return {
61
+ next() {
62
+ return iter.next();
63
+ },
64
+ [Symbol.asyncIterator]() {
65
+ return this;
66
+ },
67
+ byPage: (settings) => {
68
+ if (settings?.maxPageSize) {
69
+ throw new Error("maxPageSize is not supported by this operation.");
70
+ }
71
+ return this.listPagingPage(
72
+ resourceGroupName,
73
+ azureTrafficCollectorName,
74
+ options,
75
+ settings
76
+ );
77
+ }
78
+ };
79
+ }
80
+ async *listPagingPage(resourceGroupName, azureTrafficCollectorName, options, settings) {
81
+ let result;
82
+ let continuationToken = settings?.continuationToken;
83
+ if (!continuationToken) {
84
+ result = await this._list(
85
+ resourceGroupName,
86
+ azureTrafficCollectorName,
87
+ options
88
+ );
89
+ let page = result.value || [];
90
+ continuationToken = result.nextLink;
91
+ (0, import_pagingHelper.setContinuationToken)(page, continuationToken);
92
+ yield page;
93
+ }
94
+ while (continuationToken) {
95
+ result = await this._listNext(
96
+ resourceGroupName,
97
+ azureTrafficCollectorName,
98
+ continuationToken,
99
+ options
100
+ );
101
+ continuationToken = result.nextLink;
102
+ let page = result.value || [];
103
+ (0, import_pagingHelper.setContinuationToken)(page, continuationToken);
104
+ yield page;
28
105
  }
29
- /**
30
- * Return list of Collector policies in a Azure Traffic Collector
31
- * @param resourceGroupName The name of the resource group.
32
- * @param azureTrafficCollectorName Azure Traffic Collector name
33
- * @param options The options parameters.
34
- */
35
- list(resourceGroupName, azureTrafficCollectorName, options) {
36
- const iter = this.listPagingAll(resourceGroupName, azureTrafficCollectorName, options);
37
- return {
38
- next() {
39
- return iter.next();
40
- },
41
- [Symbol.asyncIterator]() {
42
- return this;
43
- },
44
- byPage: (settings) => {
45
- if (settings?.maxPageSize) {
46
- throw new Error("maxPageSize is not supported by this operation.");
47
- }
48
- return this.listPagingPage(resourceGroupName, azureTrafficCollectorName, options, settings);
49
- }
50
- };
106
+ }
107
+ async *listPagingAll(resourceGroupName, azureTrafficCollectorName, options) {
108
+ for await (const page of this.listPagingPage(
109
+ resourceGroupName,
110
+ azureTrafficCollectorName,
111
+ options
112
+ )) {
113
+ yield* page;
51
114
  }
52
- async *listPagingPage(resourceGroupName, azureTrafficCollectorName, options, settings) {
53
- let result;
54
- let continuationToken = settings?.continuationToken;
55
- if (!continuationToken) {
56
- result = await this._list(resourceGroupName, azureTrafficCollectorName, options);
57
- let page = result.value || [];
58
- continuationToken = result.nextLink;
59
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
60
- yield page;
115
+ }
116
+ /**
117
+ * Return list of Collector policies in a Azure Traffic Collector
118
+ * @param resourceGroupName The name of the resource group.
119
+ * @param azureTrafficCollectorName Azure Traffic Collector name
120
+ * @param options The options parameters.
121
+ */
122
+ _list(resourceGroupName, azureTrafficCollectorName, options) {
123
+ return this.client.sendOperationRequest(
124
+ { resourceGroupName, azureTrafficCollectorName, options },
125
+ listOperationSpec
126
+ );
127
+ }
128
+ /**
129
+ * Gets the collector policy in a specified Traffic Collector
130
+ * @param resourceGroupName The name of the resource group.
131
+ * @param azureTrafficCollectorName Azure Traffic Collector name
132
+ * @param collectorPolicyName Collector Policy Name
133
+ * @param options The options parameters.
134
+ */
135
+ get(resourceGroupName, azureTrafficCollectorName, collectorPolicyName, options) {
136
+ return this.client.sendOperationRequest(
137
+ {
138
+ resourceGroupName,
139
+ azureTrafficCollectorName,
140
+ collectorPolicyName,
141
+ options
142
+ },
143
+ getOperationSpec
144
+ );
145
+ }
146
+ /**
147
+ * Creates or updates a Collector Policy resource
148
+ * @param resourceGroupName The name of the resource group.
149
+ * @param azureTrafficCollectorName Azure Traffic Collector name
150
+ * @param collectorPolicyName Collector Policy Name
151
+ * @param location Resource location.
152
+ * @param options The options parameters.
153
+ */
154
+ async beginCreateOrUpdate(resourceGroupName, azureTrafficCollectorName, collectorPolicyName, location, options) {
155
+ const directSendOperation = async (args, spec) => {
156
+ return this.client.sendOperationRequest(args, spec);
157
+ };
158
+ const sendOperation = async (args, spec) => {
159
+ let currentRawResponse = void 0;
160
+ const providedCallback = args.options?.onResponse;
161
+ const callback = (rawResponse, flatResponse2) => {
162
+ currentRawResponse = rawResponse;
163
+ providedCallback?.(rawResponse, flatResponse2);
164
+ };
165
+ const updatedArgs = {
166
+ ...args,
167
+ options: {
168
+ ...args.options,
169
+ onResponse: callback
61
170
  }
62
- while (continuationToken) {
63
- result = await this._listNext(resourceGroupName, azureTrafficCollectorName, continuationToken, options);
64
- continuationToken = result.nextLink;
65
- let page = result.value || [];
66
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
67
- yield page;
171
+ };
172
+ const flatResponse = await directSendOperation(updatedArgs, spec);
173
+ return {
174
+ flatResponse,
175
+ rawResponse: {
176
+ statusCode: currentRawResponse.status,
177
+ body: currentRawResponse.parsedBody,
178
+ headers: currentRawResponse.headers.toJSON()
68
179
  }
69
- }
70
- async *listPagingAll(resourceGroupName, azureTrafficCollectorName, options) {
71
- for await (const page of this.listPagingPage(resourceGroupName, azureTrafficCollectorName, options)) {
72
- yield* page;
180
+ };
181
+ };
182
+ const lro = new import_lroImpl.LroImpl(
183
+ sendOperation,
184
+ {
185
+ resourceGroupName,
186
+ azureTrafficCollectorName,
187
+ collectorPolicyName,
188
+ location,
189
+ options
190
+ },
191
+ createOrUpdateOperationSpec
192
+ );
193
+ const poller = new import_core_lro.LroEngine(lro, {
194
+ resumeFrom: options?.resumeFrom,
195
+ intervalInMs: options?.updateIntervalInMs,
196
+ lroResourceLocationConfig: "azure-async-operation"
197
+ });
198
+ await poller.poll();
199
+ return poller;
200
+ }
201
+ /**
202
+ * Creates or updates a Collector Policy resource
203
+ * @param resourceGroupName The name of the resource group.
204
+ * @param azureTrafficCollectorName Azure Traffic Collector name
205
+ * @param collectorPolicyName Collector Policy Name
206
+ * @param location Resource location.
207
+ * @param options The options parameters.
208
+ */
209
+ async beginCreateOrUpdateAndWait(resourceGroupName, azureTrafficCollectorName, collectorPolicyName, location, options) {
210
+ const poller = await this.beginCreateOrUpdate(
211
+ resourceGroupName,
212
+ azureTrafficCollectorName,
213
+ collectorPolicyName,
214
+ location,
215
+ options
216
+ );
217
+ return poller.pollUntilDone();
218
+ }
219
+ /**
220
+ * Deletes a specified Collector Policy resource.
221
+ * @param resourceGroupName The name of the resource group.
222
+ * @param azureTrafficCollectorName Azure Traffic Collector name
223
+ * @param collectorPolicyName Collector Policy Name
224
+ * @param options The options parameters.
225
+ */
226
+ async beginDelete(resourceGroupName, azureTrafficCollectorName, collectorPolicyName, options) {
227
+ const directSendOperation = async (args, spec) => {
228
+ return this.client.sendOperationRequest(args, spec);
229
+ };
230
+ const sendOperation = async (args, spec) => {
231
+ let currentRawResponse = void 0;
232
+ const providedCallback = args.options?.onResponse;
233
+ const callback = (rawResponse, flatResponse2) => {
234
+ currentRawResponse = rawResponse;
235
+ providedCallback?.(rawResponse, flatResponse2);
236
+ };
237
+ const updatedArgs = {
238
+ ...args,
239
+ options: {
240
+ ...args.options,
241
+ onResponse: callback
73
242
  }
74
- }
75
- /**
76
- * Return list of Collector policies in a Azure Traffic Collector
77
- * @param resourceGroupName The name of the resource group.
78
- * @param azureTrafficCollectorName Azure Traffic Collector name
79
- * @param options The options parameters.
80
- */
81
- _list(resourceGroupName, azureTrafficCollectorName, options) {
82
- return this.client.sendOperationRequest({ resourceGroupName, azureTrafficCollectorName, options }, listOperationSpec);
83
- }
84
- /**
85
- * Gets the collector policy in a specified Traffic Collector
86
- * @param resourceGroupName The name of the resource group.
87
- * @param azureTrafficCollectorName Azure Traffic Collector name
88
- * @param collectorPolicyName Collector Policy Name
89
- * @param options The options parameters.
90
- */
91
- get(resourceGroupName, azureTrafficCollectorName, collectorPolicyName, options) {
92
- return this.client.sendOperationRequest({
93
- resourceGroupName,
94
- azureTrafficCollectorName,
95
- collectorPolicyName,
96
- options
97
- }, getOperationSpec);
98
- }
99
- /**
100
- * Creates or updates a Collector Policy resource
101
- * @param resourceGroupName The name of the resource group.
102
- * @param azureTrafficCollectorName Azure Traffic Collector name
103
- * @param collectorPolicyName Collector Policy Name
104
- * @param location Resource location.
105
- * @param options The options parameters.
106
- */
107
- async beginCreateOrUpdate(resourceGroupName, azureTrafficCollectorName, collectorPolicyName, location, options) {
108
- const directSendOperation = async (args, spec) => {
109
- return this.client.sendOperationRequest(args, spec);
110
- };
111
- const sendOperation = async (args, spec) => {
112
- let currentRawResponse = undefined;
113
- const providedCallback = args.options?.onResponse;
114
- const callback = (rawResponse, flatResponse) => {
115
- currentRawResponse = rawResponse;
116
- providedCallback?.(rawResponse, flatResponse);
117
- };
118
- const updatedArgs = {
119
- ...args,
120
- options: {
121
- ...args.options,
122
- onResponse: callback
123
- }
124
- };
125
- const flatResponse = await directSendOperation(updatedArgs, spec);
126
- return {
127
- flatResponse,
128
- rawResponse: {
129
- statusCode: currentRawResponse.status,
130
- body: currentRawResponse.parsedBody,
131
- headers: currentRawResponse.headers.toJSON()
132
- }
133
- };
134
- };
135
- const lro = new lroImpl_js_1.LroImpl(sendOperation, {
136
- resourceGroupName,
137
- azureTrafficCollectorName,
138
- collectorPolicyName,
139
- location,
140
- options
141
- }, createOrUpdateOperationSpec);
142
- const poller = new core_lro_1.LroEngine(lro, {
143
- resumeFrom: options?.resumeFrom,
144
- intervalInMs: options?.updateIntervalInMs,
145
- lroResourceLocationConfig: "azure-async-operation"
146
- });
147
- await poller.poll();
148
- return poller;
149
- }
150
- /**
151
- * Creates or updates a Collector Policy resource
152
- * @param resourceGroupName The name of the resource group.
153
- * @param azureTrafficCollectorName Azure Traffic Collector name
154
- * @param collectorPolicyName Collector Policy Name
155
- * @param location Resource location.
156
- * @param options The options parameters.
157
- */
158
- async beginCreateOrUpdateAndWait(resourceGroupName, azureTrafficCollectorName, collectorPolicyName, location, options) {
159
- const poller = await this.beginCreateOrUpdate(resourceGroupName, azureTrafficCollectorName, collectorPolicyName, location, options);
160
- return poller.pollUntilDone();
161
- }
162
- /**
163
- * Deletes a specified Collector Policy resource.
164
- * @param resourceGroupName The name of the resource group.
165
- * @param azureTrafficCollectorName Azure Traffic Collector name
166
- * @param collectorPolicyName Collector Policy Name
167
- * @param options The options parameters.
168
- */
169
- async beginDelete(resourceGroupName, azureTrafficCollectorName, collectorPolicyName, options) {
170
- const directSendOperation = async (args, spec) => {
171
- return this.client.sendOperationRequest(args, spec);
172
- };
173
- const sendOperation = async (args, spec) => {
174
- let currentRawResponse = undefined;
175
- const providedCallback = args.options?.onResponse;
176
- const callback = (rawResponse, flatResponse) => {
177
- currentRawResponse = rawResponse;
178
- providedCallback?.(rawResponse, flatResponse);
179
- };
180
- const updatedArgs = {
181
- ...args,
182
- options: {
183
- ...args.options,
184
- onResponse: callback
185
- }
186
- };
187
- const flatResponse = await directSendOperation(updatedArgs, spec);
188
- return {
189
- flatResponse,
190
- rawResponse: {
191
- statusCode: currentRawResponse.status,
192
- body: currentRawResponse.parsedBody,
193
- headers: currentRawResponse.headers.toJSON()
194
- }
195
- };
196
- };
197
- const lro = new lroImpl_js_1.LroImpl(sendOperation, {
198
- resourceGroupName,
199
- azureTrafficCollectorName,
200
- collectorPolicyName,
201
- options
202
- }, deleteOperationSpec);
203
- const poller = new core_lro_1.LroEngine(lro, {
204
- resumeFrom: options?.resumeFrom,
205
- intervalInMs: options?.updateIntervalInMs,
206
- lroResourceLocationConfig: "location"
207
- });
208
- await poller.poll();
209
- return poller;
210
- }
211
- /**
212
- * Deletes a specified Collector Policy resource.
213
- * @param resourceGroupName The name of the resource group.
214
- * @param azureTrafficCollectorName Azure Traffic Collector name
215
- * @param collectorPolicyName Collector Policy Name
216
- * @param options The options parameters.
217
- */
218
- async beginDeleteAndWait(resourceGroupName, azureTrafficCollectorName, collectorPolicyName, options) {
219
- const poller = await this.beginDelete(resourceGroupName, azureTrafficCollectorName, collectorPolicyName, options);
220
- return poller.pollUntilDone();
221
- }
222
- /**
223
- * Updates the specified Collector Policy tags.
224
- * @param resourceGroupName The name of the resource group.
225
- * @param azureTrafficCollectorName Azure Traffic Collector name
226
- * @param collectorPolicyName Collector Policy Name
227
- * @param parameters Parameters supplied to update Collector Policy tags.
228
- * @param options The options parameters.
229
- */
230
- updateTags(resourceGroupName, azureTrafficCollectorName, collectorPolicyName, parameters, options) {
231
- return this.client.sendOperationRequest({
232
- resourceGroupName,
233
- azureTrafficCollectorName,
234
- collectorPolicyName,
235
- parameters,
236
- options
237
- }, updateTagsOperationSpec);
238
- }
239
- /**
240
- * ListNext
241
- * @param resourceGroupName The name of the resource group.
242
- * @param azureTrafficCollectorName Azure Traffic Collector name
243
- * @param nextLink The nextLink from the previous successful call to the List method.
244
- * @param options The options parameters.
245
- */
246
- _listNext(resourceGroupName, azureTrafficCollectorName, nextLink, options) {
247
- return this.client.sendOperationRequest({ resourceGroupName, azureTrafficCollectorName, nextLink, options }, listNextOperationSpec);
248
- }
243
+ };
244
+ const flatResponse = await directSendOperation(updatedArgs, spec);
245
+ return {
246
+ flatResponse,
247
+ rawResponse: {
248
+ statusCode: currentRawResponse.status,
249
+ body: currentRawResponse.parsedBody,
250
+ headers: currentRawResponse.headers.toJSON()
251
+ }
252
+ };
253
+ };
254
+ const lro = new import_lroImpl.LroImpl(
255
+ sendOperation,
256
+ {
257
+ resourceGroupName,
258
+ azureTrafficCollectorName,
259
+ collectorPolicyName,
260
+ options
261
+ },
262
+ deleteOperationSpec
263
+ );
264
+ const poller = new import_core_lro.LroEngine(lro, {
265
+ resumeFrom: options?.resumeFrom,
266
+ intervalInMs: options?.updateIntervalInMs,
267
+ lroResourceLocationConfig: "location"
268
+ });
269
+ await poller.poll();
270
+ return poller;
271
+ }
272
+ /**
273
+ * Deletes a specified Collector Policy resource.
274
+ * @param resourceGroupName The name of the resource group.
275
+ * @param azureTrafficCollectorName Azure Traffic Collector name
276
+ * @param collectorPolicyName Collector Policy Name
277
+ * @param options The options parameters.
278
+ */
279
+ async beginDeleteAndWait(resourceGroupName, azureTrafficCollectorName, collectorPolicyName, options) {
280
+ const poller = await this.beginDelete(
281
+ resourceGroupName,
282
+ azureTrafficCollectorName,
283
+ collectorPolicyName,
284
+ options
285
+ );
286
+ return poller.pollUntilDone();
287
+ }
288
+ /**
289
+ * Updates the specified Collector Policy tags.
290
+ * @param resourceGroupName The name of the resource group.
291
+ * @param azureTrafficCollectorName Azure Traffic Collector name
292
+ * @param collectorPolicyName Collector Policy Name
293
+ * @param parameters Parameters supplied to update Collector Policy tags.
294
+ * @param options The options parameters.
295
+ */
296
+ updateTags(resourceGroupName, azureTrafficCollectorName, collectorPolicyName, parameters, options) {
297
+ return this.client.sendOperationRequest(
298
+ {
299
+ resourceGroupName,
300
+ azureTrafficCollectorName,
301
+ collectorPolicyName,
302
+ parameters,
303
+ options
304
+ },
305
+ updateTagsOperationSpec
306
+ );
307
+ }
308
+ /**
309
+ * ListNext
310
+ * @param resourceGroupName The name of the resource group.
311
+ * @param azureTrafficCollectorName Azure Traffic Collector name
312
+ * @param nextLink The nextLink from the previous successful call to the List method.
313
+ * @param options The options parameters.
314
+ */
315
+ _listNext(resourceGroupName, azureTrafficCollectorName, nextLink, options) {
316
+ return this.client.sendOperationRequest(
317
+ { resourceGroupName, azureTrafficCollectorName, nextLink, options },
318
+ listNextOperationSpec
319
+ );
320
+ }
249
321
  }
250
- exports.CollectorPoliciesImpl = CollectorPoliciesImpl;
251
- // Operation Specifications
252
- const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
322
+ const serializer = coreClient.createSerializer(
323
+ Mappers,
324
+ /* isXml */
325
+ false
326
+ );
253
327
  const listOperationSpec = {
254
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies",
255
- httpMethod: "GET",
256
- responses: {
257
- 200: {
258
- bodyMapper: Mappers.CollectorPolicyListResult
259
- },
260
- default: {
261
- bodyMapper: Mappers.CloudError
262
- }
328
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies",
329
+ httpMethod: "GET",
330
+ responses: {
331
+ 200: {
332
+ bodyMapper: Mappers.CollectorPolicyListResult
263
333
  },
264
- queryParameters: [Parameters.apiVersion],
265
- urlParameters: [
266
- Parameters.$host,
267
- Parameters.subscriptionId,
268
- Parameters.resourceGroupName,
269
- Parameters.azureTrafficCollectorName
270
- ],
271
- headerParameters: [Parameters.accept],
272
- serializer
334
+ default: {
335
+ bodyMapper: Mappers.CloudError
336
+ }
337
+ },
338
+ queryParameters: [Parameters.apiVersion],
339
+ urlParameters: [
340
+ Parameters.$host,
341
+ Parameters.subscriptionId,
342
+ Parameters.resourceGroupName,
343
+ Parameters.azureTrafficCollectorName
344
+ ],
345
+ headerParameters: [Parameters.accept],
346
+ serializer
273
347
  };
274
348
  const getOperationSpec = {
275
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}",
276
- httpMethod: "GET",
277
- responses: {
278
- 200: {
279
- bodyMapper: Mappers.CollectorPolicy
280
- },
281
- default: {
282
- bodyMapper: Mappers.CloudError
283
- }
349
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}",
350
+ httpMethod: "GET",
351
+ responses: {
352
+ 200: {
353
+ bodyMapper: Mappers.CollectorPolicy
284
354
  },
285
- queryParameters: [Parameters.apiVersion],
286
- urlParameters: [
287
- Parameters.$host,
288
- Parameters.subscriptionId,
289
- Parameters.resourceGroupName,
290
- Parameters.azureTrafficCollectorName,
291
- Parameters.collectorPolicyName
292
- ],
293
- headerParameters: [Parameters.accept],
294
- serializer
355
+ default: {
356
+ bodyMapper: Mappers.CloudError
357
+ }
358
+ },
359
+ queryParameters: [Parameters.apiVersion],
360
+ urlParameters: [
361
+ Parameters.$host,
362
+ Parameters.subscriptionId,
363
+ Parameters.resourceGroupName,
364
+ Parameters.azureTrafficCollectorName,
365
+ Parameters.collectorPolicyName
366
+ ],
367
+ headerParameters: [Parameters.accept],
368
+ serializer
295
369
  };
296
370
  const createOrUpdateOperationSpec = {
297
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}",
298
- httpMethod: "PUT",
299
- responses: {
300
- 200: {
301
- bodyMapper: Mappers.CollectorPolicy
302
- },
303
- 201: {
304
- bodyMapper: Mappers.CollectorPolicy
305
- },
306
- 202: {
307
- bodyMapper: Mappers.CollectorPolicy
308
- },
309
- 204: {
310
- bodyMapper: Mappers.CollectorPolicy
311
- },
312
- default: {
313
- bodyMapper: Mappers.CloudError
314
- }
371
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}",
372
+ httpMethod: "PUT",
373
+ responses: {
374
+ 200: {
375
+ bodyMapper: Mappers.CollectorPolicy
315
376
  },
316
- requestBody: {
317
- parameterPath: {
318
- location: ["location"],
319
- tags: ["options", "tags"],
320
- ingestionPolicy: ["options", "ingestionPolicy"],
321
- emissionPolicies: ["options", "emissionPolicies"]
322
- },
323
- mapper: { ...Mappers.CollectorPolicy, required: true }
377
+ 201: {
378
+ bodyMapper: Mappers.CollectorPolicy
379
+ },
380
+ 202: {
381
+ bodyMapper: Mappers.CollectorPolicy
382
+ },
383
+ 204: {
384
+ bodyMapper: Mappers.CollectorPolicy
385
+ },
386
+ default: {
387
+ bodyMapper: Mappers.CloudError
388
+ }
389
+ },
390
+ requestBody: {
391
+ parameterPath: {
392
+ location: ["location"],
393
+ tags: ["options", "tags"],
394
+ ingestionPolicy: ["options", "ingestionPolicy"],
395
+ emissionPolicies: ["options", "emissionPolicies"]
324
396
  },
325
- queryParameters: [Parameters.apiVersion],
326
- urlParameters: [
327
- Parameters.$host,
328
- Parameters.subscriptionId,
329
- Parameters.resourceGroupName,
330
- Parameters.azureTrafficCollectorName,
331
- Parameters.collectorPolicyName
332
- ],
333
- headerParameters: [Parameters.accept, Parameters.contentType],
334
- mediaType: "json",
335
- serializer
397
+ mapper: { ...Mappers.CollectorPolicy, required: true }
398
+ },
399
+ queryParameters: [Parameters.apiVersion],
400
+ urlParameters: [
401
+ Parameters.$host,
402
+ Parameters.subscriptionId,
403
+ Parameters.resourceGroupName,
404
+ Parameters.azureTrafficCollectorName,
405
+ Parameters.collectorPolicyName
406
+ ],
407
+ headerParameters: [Parameters.accept, Parameters.contentType],
408
+ mediaType: "json",
409
+ serializer
336
410
  };
337
411
  const deleteOperationSpec = {
338
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}",
339
- httpMethod: "DELETE",
340
- responses: {
341
- 200: {},
342
- 201: {},
343
- 202: {},
344
- 204: {},
345
- default: {
346
- bodyMapper: Mappers.CloudError
347
- }
348
- },
349
- queryParameters: [Parameters.apiVersion],
350
- urlParameters: [
351
- Parameters.$host,
352
- Parameters.subscriptionId,
353
- Parameters.resourceGroupName,
354
- Parameters.azureTrafficCollectorName,
355
- Parameters.collectorPolicyName
356
- ],
357
- headerParameters: [Parameters.accept],
358
- serializer
412
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}",
413
+ httpMethod: "DELETE",
414
+ responses: {
415
+ 200: {},
416
+ 201: {},
417
+ 202: {},
418
+ 204: {},
419
+ default: {
420
+ bodyMapper: Mappers.CloudError
421
+ }
422
+ },
423
+ queryParameters: [Parameters.apiVersion],
424
+ urlParameters: [
425
+ Parameters.$host,
426
+ Parameters.subscriptionId,
427
+ Parameters.resourceGroupName,
428
+ Parameters.azureTrafficCollectorName,
429
+ Parameters.collectorPolicyName
430
+ ],
431
+ headerParameters: [Parameters.accept],
432
+ serializer
359
433
  };
360
434
  const updateTagsOperationSpec = {
361
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}",
362
- httpMethod: "PATCH",
363
- responses: {
364
- 200: {
365
- bodyMapper: Mappers.CollectorPolicy
366
- },
367
- default: {
368
- bodyMapper: Mappers.CloudError
369
- }
435
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}",
436
+ httpMethod: "PATCH",
437
+ responses: {
438
+ 200: {
439
+ bodyMapper: Mappers.CollectorPolicy
370
440
  },
371
- requestBody: Parameters.parameters1,
372
- queryParameters: [Parameters.apiVersion],
373
- urlParameters: [
374
- Parameters.$host,
375
- Parameters.subscriptionId,
376
- Parameters.resourceGroupName,
377
- Parameters.azureTrafficCollectorName,
378
- Parameters.collectorPolicyName
379
- ],
380
- headerParameters: [Parameters.accept, Parameters.contentType],
381
- mediaType: "json",
382
- serializer
441
+ default: {
442
+ bodyMapper: Mappers.CloudError
443
+ }
444
+ },
445
+ requestBody: Parameters.parameters1,
446
+ queryParameters: [Parameters.apiVersion],
447
+ urlParameters: [
448
+ Parameters.$host,
449
+ Parameters.subscriptionId,
450
+ Parameters.resourceGroupName,
451
+ Parameters.azureTrafficCollectorName,
452
+ Parameters.collectorPolicyName
453
+ ],
454
+ headerParameters: [Parameters.accept, Parameters.contentType],
455
+ mediaType: "json",
456
+ serializer
383
457
  };
384
458
  const listNextOperationSpec = {
385
- path: "{nextLink}",
386
- httpMethod: "GET",
387
- responses: {
388
- 200: {
389
- bodyMapper: Mappers.CollectorPolicyListResult
390
- },
391
- default: {
392
- bodyMapper: Mappers.CloudError
393
- }
459
+ path: "{nextLink}",
460
+ httpMethod: "GET",
461
+ responses: {
462
+ 200: {
463
+ bodyMapper: Mappers.CollectorPolicyListResult
394
464
  },
395
- queryParameters: [Parameters.apiVersion],
396
- urlParameters: [
397
- Parameters.$host,
398
- Parameters.subscriptionId,
399
- Parameters.nextLink,
400
- Parameters.resourceGroupName,
401
- Parameters.azureTrafficCollectorName
402
- ],
403
- headerParameters: [Parameters.accept],
404
- serializer
465
+ default: {
466
+ bodyMapper: Mappers.CloudError
467
+ }
468
+ },
469
+ queryParameters: [Parameters.apiVersion],
470
+ urlParameters: [
471
+ Parameters.$host,
472
+ Parameters.subscriptionId,
473
+ Parameters.nextLink,
474
+ Parameters.resourceGroupName,
475
+ Parameters.azureTrafficCollectorName
476
+ ],
477
+ headerParameters: [Parameters.accept],
478
+ serializer
405
479
  };
406
- //# sourceMappingURL=collectorPolicies.js.map