@azure/arm-azurestackhci 4.0.0-alpha.20250718.1 → 4.0.0-alpha.20250730.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/azureStackHCIClient.js +26 -5
- package/dist/browser/azureStackHCIClient.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 +313 -148
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/arcSettings.js +56 -58
- package/dist/browser/operations/arcSettings.js.map +1 -1
- package/dist/browser/operations/clusters.js +111 -115
- package/dist/browser/operations/clusters.js.map +1 -1
- package/dist/browser/operations/deploymentSettings.js +45 -52
- package/dist/browser/operations/deploymentSettings.js.map +1 -1
- package/dist/browser/operations/edgeDevices.js +56 -58
- package/dist/browser/operations/edgeDevices.js.map +1 -1
- package/dist/browser/operations/extensions.js +67 -64
- package/dist/browser/operations/extensions.js.map +1 -1
- package/dist/browser/operations/offers.js +45 -79
- package/dist/browser/operations/offers.js.map +1 -1
- package/dist/browser/operations/operations.js +1 -0
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/publishers.js +23 -40
- package/dist/browser/operations/publishers.js.map +1 -1
- package/dist/browser/operations/securitySettings.js +45 -52
- package/dist/browser/operations/securitySettings.js.map +1 -1
- package/dist/browser/operations/skus.js +23 -40
- package/dist/browser/operations/skus.js.map +1 -1
- package/dist/browser/operations/updateRuns.js +34 -46
- package/dist/browser/operations/updateRuns.js.map +1 -1
- package/dist/browser/operations/updateSummariesOperations.js +34 -46
- package/dist/browser/operations/updateSummariesOperations.js.map +1 -1
- package/dist/browser/operations/updates.js +45 -52
- package/dist/browser/operations/updates.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/azureStackHCIClient.js +26 -5
- package/dist/commonjs/azureStackHCIClient.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 +313 -148
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/arcSettings.js +56 -57
- package/dist/commonjs/operations/arcSettings.js.map +1 -1
- package/dist/commonjs/operations/clusters.js +111 -114
- package/dist/commonjs/operations/clusters.js.map +1 -1
- package/dist/commonjs/operations/deploymentSettings.js +45 -51
- package/dist/commonjs/operations/deploymentSettings.js.map +1 -1
- package/dist/commonjs/operations/edgeDevices.js +56 -57
- package/dist/commonjs/operations/edgeDevices.js.map +1 -1
- package/dist/commonjs/operations/extensions.js +67 -63
- package/dist/commonjs/operations/extensions.js.map +1 -1
- package/dist/commonjs/operations/offers.js +45 -78
- package/dist/commonjs/operations/offers.js.map +1 -1
- package/dist/commonjs/operations/operations.js +1 -0
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/publishers.js +23 -39
- package/dist/commonjs/operations/publishers.js.map +1 -1
- package/dist/commonjs/operations/securitySettings.js +45 -51
- package/dist/commonjs/operations/securitySettings.js.map +1 -1
- package/dist/commonjs/operations/skus.js +23 -39
- package/dist/commonjs/operations/skus.js.map +1 -1
- package/dist/commonjs/operations/updateRuns.js +34 -45
- package/dist/commonjs/operations/updateRuns.js.map +1 -1
- package/dist/commonjs/operations/updateSummariesOperations.js +34 -45
- package/dist/commonjs/operations/updateSummariesOperations.js.map +1 -1
- package/dist/commonjs/operations/updates.js +45 -51
- package/dist/commonjs/operations/updates.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/azureStackHCIClient.js +26 -5
- package/dist/esm/azureStackHCIClient.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 +313 -148
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/arcSettings.js +56 -58
- package/dist/esm/operations/arcSettings.js.map +1 -1
- package/dist/esm/operations/clusters.js +111 -115
- package/dist/esm/operations/clusters.js.map +1 -1
- package/dist/esm/operations/deploymentSettings.js +45 -52
- package/dist/esm/operations/deploymentSettings.js.map +1 -1
- package/dist/esm/operations/edgeDevices.js +56 -58
- package/dist/esm/operations/edgeDevices.js.map +1 -1
- package/dist/esm/operations/extensions.js +67 -64
- package/dist/esm/operations/extensions.js.map +1 -1
- package/dist/esm/operations/offers.js +45 -79
- package/dist/esm/operations/offers.js.map +1 -1
- package/dist/esm/operations/operations.js +1 -0
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/publishers.js +23 -40
- package/dist/esm/operations/publishers.js.map +1 -1
- package/dist/esm/operations/securitySettings.js +45 -52
- package/dist/esm/operations/securitySettings.js.map +1 -1
- package/dist/esm/operations/skus.js +23 -40
- package/dist/esm/operations/skus.js.map +1 -1
- package/dist/esm/operations/updateRuns.js +34 -46
- package/dist/esm/operations/updateRuns.js.map +1 -1
- package/dist/esm/operations/updateSummariesOperations.js +34 -46
- package/dist/esm/operations/updateSummariesOperations.js.map +1 -1
- package/dist/esm/operations/updates.js +45 -52
- package/dist/esm/operations/updates.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/azureStackHCIClient.js +26 -5
- package/dist/react-native/azureStackHCIClient.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 +313 -148
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/arcSettings.js +56 -58
- package/dist/react-native/operations/arcSettings.js.map +1 -1
- package/dist/react-native/operations/clusters.js +111 -115
- package/dist/react-native/operations/clusters.js.map +1 -1
- package/dist/react-native/operations/deploymentSettings.js +45 -52
- package/dist/react-native/operations/deploymentSettings.js.map +1 -1
- package/dist/react-native/operations/edgeDevices.js +56 -58
- package/dist/react-native/operations/edgeDevices.js.map +1 -1
- package/dist/react-native/operations/extensions.js +67 -64
- package/dist/react-native/operations/extensions.js.map +1 -1
- package/dist/react-native/operations/offers.js +45 -79
- package/dist/react-native/operations/offers.js.map +1 -1
- package/dist/react-native/operations/operations.js +1 -0
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/publishers.js +23 -40
- package/dist/react-native/operations/publishers.js.map +1 -1
- package/dist/react-native/operations/securitySettings.js +45 -52
- package/dist/react-native/operations/securitySettings.js.map +1 -1
- package/dist/react-native/operations/skus.js +23 -40
- package/dist/react-native/operations/skus.js.map +1 -1
- package/dist/react-native/operations/updateRuns.js +34 -46
- package/dist/react-native/operations/updateRuns.js.map +1 -1
- package/dist/react-native/operations/updateSummariesOperations.js +34 -46
- package/dist/react-native/operations/updateSummariesOperations.js.map +1 -1
- package/dist/react-native/operations/updates.js +45 -52
- package/dist/react-native/operations/updates.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-azurestackhci-node.api.md +2416 -2416
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
|
10
9
|
import * as coreClient from "@azure/core-client";
|
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
|
@@ -15,6 +14,7 @@ import { createLroSpec } from "../lroImpl.js";
|
|
|
15
14
|
/// <reference lib="esnext.asynciterable" />
|
|
16
15
|
/** Class containing EdgeDevices operations. */
|
|
17
16
|
export class EdgeDevicesImpl {
|
|
17
|
+
client;
|
|
18
18
|
/**
|
|
19
19
|
* Initialize a new instance of the class EdgeDevices class.
|
|
20
20
|
* @param client Reference to the service client
|
|
@@ -37,52 +37,35 @@ export class EdgeDevicesImpl {
|
|
|
37
37
|
return this;
|
|
38
38
|
},
|
|
39
39
|
byPage: (settings) => {
|
|
40
|
-
if (settings
|
|
40
|
+
if (settings?.maxPageSize) {
|
|
41
41
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
42
42
|
}
|
|
43
43
|
return this.listPagingPage(resourceUri, options, settings);
|
|
44
44
|
},
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
listPagingPage(resourceUri, options, settings) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
});
|
|
47
|
+
async *listPagingPage(resourceUri, options, settings) {
|
|
48
|
+
let result;
|
|
49
|
+
let continuationToken = settings?.continuationToken;
|
|
50
|
+
if (!continuationToken) {
|
|
51
|
+
result = await this._list(resourceUri, options);
|
|
52
|
+
let page = result.value || [];
|
|
53
|
+
continuationToken = result.nextLink;
|
|
54
|
+
setContinuationToken(page, continuationToken);
|
|
55
|
+
yield page;
|
|
56
|
+
}
|
|
57
|
+
while (continuationToken) {
|
|
58
|
+
result = await this._listNext(resourceUri, continuationToken, options);
|
|
59
|
+
continuationToken = result.nextLink;
|
|
60
|
+
let page = result.value || [];
|
|
61
|
+
setContinuationToken(page, continuationToken);
|
|
62
|
+
yield page;
|
|
63
|
+
}
|
|
66
64
|
}
|
|
67
|
-
listPagingAll(resourceUri, options) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
for (var _d = true, _e = __asyncValues(this.listPagingPage(resourceUri, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
72
|
-
_c = _f.value;
|
|
73
|
-
_d = false;
|
|
74
|
-
const page = _c;
|
|
75
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
79
|
-
finally {
|
|
80
|
-
try {
|
|
81
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
82
|
-
}
|
|
83
|
-
finally { if (e_1) throw e_1.error; }
|
|
84
|
-
}
|
|
85
|
-
});
|
|
65
|
+
async *listPagingAll(resourceUri, options) {
|
|
66
|
+
for await (const page of this.listPagingPage(resourceUri, options)) {
|
|
67
|
+
yield* page;
|
|
68
|
+
}
|
|
86
69
|
}
|
|
87
70
|
/**
|
|
88
71
|
* List EdgeDevice resources by parent
|
|
@@ -113,14 +96,19 @@ export class EdgeDevicesImpl {
|
|
|
113
96
|
return this.client.sendOperationRequest(args, spec);
|
|
114
97
|
};
|
|
115
98
|
const sendOperationFn = async (args, spec) => {
|
|
116
|
-
var _a;
|
|
117
99
|
let currentRawResponse = undefined;
|
|
118
|
-
const providedCallback =
|
|
100
|
+
const providedCallback = args.options?.onResponse;
|
|
119
101
|
const callback = (rawResponse, flatResponse) => {
|
|
120
102
|
currentRawResponse = rawResponse;
|
|
121
|
-
providedCallback
|
|
103
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
104
|
+
};
|
|
105
|
+
const updatedArgs = {
|
|
106
|
+
...args,
|
|
107
|
+
options: {
|
|
108
|
+
...args.options,
|
|
109
|
+
onResponse: callback,
|
|
110
|
+
},
|
|
122
111
|
};
|
|
123
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
124
112
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
125
113
|
return {
|
|
126
114
|
flatResponse,
|
|
@@ -137,8 +125,8 @@ export class EdgeDevicesImpl {
|
|
|
137
125
|
spec: createOrUpdateOperationSpec,
|
|
138
126
|
});
|
|
139
127
|
const poller = await createHttpPoller(lro, {
|
|
140
|
-
restoreFrom: options
|
|
141
|
-
intervalInMs: options
|
|
128
|
+
restoreFrom: options?.resumeFrom,
|
|
129
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
142
130
|
resourceLocationConfig: "azure-async-operation",
|
|
143
131
|
});
|
|
144
132
|
await poller.poll();
|
|
@@ -166,14 +154,19 @@ export class EdgeDevicesImpl {
|
|
|
166
154
|
return this.client.sendOperationRequest(args, spec);
|
|
167
155
|
};
|
|
168
156
|
const sendOperationFn = async (args, spec) => {
|
|
169
|
-
var _a;
|
|
170
157
|
let currentRawResponse = undefined;
|
|
171
|
-
const providedCallback =
|
|
158
|
+
const providedCallback = args.options?.onResponse;
|
|
172
159
|
const callback = (rawResponse, flatResponse) => {
|
|
173
160
|
currentRawResponse = rawResponse;
|
|
174
|
-
providedCallback
|
|
161
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
162
|
+
};
|
|
163
|
+
const updatedArgs = {
|
|
164
|
+
...args,
|
|
165
|
+
options: {
|
|
166
|
+
...args.options,
|
|
167
|
+
onResponse: callback,
|
|
168
|
+
},
|
|
175
169
|
};
|
|
176
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
177
170
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
178
171
|
return {
|
|
179
172
|
flatResponse,
|
|
@@ -190,8 +183,8 @@ export class EdgeDevicesImpl {
|
|
|
190
183
|
spec: deleteOperationSpec,
|
|
191
184
|
});
|
|
192
185
|
const poller = await createHttpPoller(lro, {
|
|
193
|
-
restoreFrom: options
|
|
194
|
-
intervalInMs: options
|
|
186
|
+
restoreFrom: options?.resumeFrom,
|
|
187
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
195
188
|
resourceLocationConfig: "location",
|
|
196
189
|
});
|
|
197
190
|
await poller.poll();
|
|
@@ -219,14 +212,19 @@ export class EdgeDevicesImpl {
|
|
|
219
212
|
return this.client.sendOperationRequest(args, spec);
|
|
220
213
|
};
|
|
221
214
|
const sendOperationFn = async (args, spec) => {
|
|
222
|
-
var _a;
|
|
223
215
|
let currentRawResponse = undefined;
|
|
224
|
-
const providedCallback =
|
|
216
|
+
const providedCallback = args.options?.onResponse;
|
|
225
217
|
const callback = (rawResponse, flatResponse) => {
|
|
226
218
|
currentRawResponse = rawResponse;
|
|
227
|
-
providedCallback
|
|
219
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
220
|
+
};
|
|
221
|
+
const updatedArgs = {
|
|
222
|
+
...args,
|
|
223
|
+
options: {
|
|
224
|
+
...args.options,
|
|
225
|
+
onResponse: callback,
|
|
226
|
+
},
|
|
228
227
|
};
|
|
229
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
230
228
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
231
229
|
return {
|
|
232
230
|
flatResponse,
|
|
@@ -243,8 +241,8 @@ export class EdgeDevicesImpl {
|
|
|
243
241
|
spec: validateOperationSpec,
|
|
244
242
|
});
|
|
245
243
|
const poller = await createHttpPoller(lro, {
|
|
246
|
-
restoreFrom: options
|
|
247
|
-
intervalInMs: options
|
|
244
|
+
restoreFrom: options?.resumeFrom,
|
|
245
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
248
246
|
resourceLocationConfig: "location",
|
|
249
247
|
});
|
|
250
248
|
await poller.poll();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edgeDevices.js","sourceRoot":"","sources":["../../../src/operations/edgeDevices.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yB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B;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 { EdgeDevices } 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 { AzureStackHCIClient } from \"../azureStackHCIClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n EdgeDeviceUnion,\n EdgeDevicesListNextOptionalParams,\n EdgeDevicesListOptionalParams,\n EdgeDevicesListResponse,\n EdgeDevicesGetOptionalParams,\n EdgeDevicesGetResponse,\n EdgeDevicesCreateOrUpdateOptionalParams,\n EdgeDevicesCreateOrUpdateResponse,\n EdgeDevicesDeleteOptionalParams,\n EdgeDevicesDeleteResponse,\n ValidateRequest,\n EdgeDevicesValidateOptionalParams,\n EdgeDevicesValidateResponse,\n EdgeDevicesListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing EdgeDevices operations. */\nexport class EdgeDevicesImpl implements EdgeDevices {\n private readonly client: AzureStackHCIClient;\n\n /**\n * Initialize a new instance of the class EdgeDevices class.\n * @param client Reference to the service client\n */\n constructor(client: AzureStackHCIClient) {\n this.client = client;\n }\n\n /**\n * List EdgeDevice resources by parent\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param options The options parameters.\n */\n public list(\n resourceUri: string,\n options?: EdgeDevicesListOptionalParams,\n ): PagedAsyncIterableIterator<EdgeDeviceUnion> {\n const iter = this.listPagingAll(resourceUri, 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(resourceUri, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n resourceUri: string,\n options?: EdgeDevicesListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<EdgeDeviceUnion[]> {\n let result: EdgeDevicesListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(resourceUri, 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(resourceUri, continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n resourceUri: string,\n options?: EdgeDevicesListOptionalParams,\n ): AsyncIterableIterator<EdgeDeviceUnion> {\n for await (const page of this.listPagingPage(resourceUri, options)) {\n yield* page;\n }\n }\n\n /**\n * List EdgeDevice resources by parent\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param options The options parameters.\n */\n private _list(\n resourceUri: string,\n options?: EdgeDevicesListOptionalParams,\n ): Promise<EdgeDevicesListResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, options },\n listOperationSpec,\n );\n }\n\n /**\n * Get a EdgeDevice\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param options The options parameters.\n */\n get(\n resourceUri: string,\n edgeDeviceName: string,\n options?: EdgeDevicesGetOptionalParams,\n ): Promise<EdgeDevicesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, edgeDeviceName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Create a EdgeDevice\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param resource Resource create parameters.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceUri: string,\n edgeDeviceName: string,\n resource: EdgeDeviceUnion,\n options?: EdgeDevicesCreateOrUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<EdgeDevicesCreateOrUpdateResponse>,\n EdgeDevicesCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<EdgeDevicesCreateOrUpdateResponse> => {\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: { resourceUri, edgeDeviceName, resource, options },\n spec: createOrUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n EdgeDevicesCreateOrUpdateResponse,\n OperationState<EdgeDevicesCreateOrUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Create a EdgeDevice\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param resource Resource create parameters.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceUri: string,\n edgeDeviceName: string,\n resource: EdgeDeviceUnion,\n options?: EdgeDevicesCreateOrUpdateOptionalParams,\n ): Promise<EdgeDevicesCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceUri,\n edgeDeviceName,\n resource,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Delete a EdgeDevice\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param options The options parameters.\n */\n async beginDelete(\n resourceUri: string,\n edgeDeviceName: string,\n options?: EdgeDevicesDeleteOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<EdgeDevicesDeleteResponse>,\n EdgeDevicesDeleteResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<EdgeDevicesDeleteResponse> => {\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: { resourceUri, edgeDeviceName, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<\n EdgeDevicesDeleteResponse,\n OperationState<EdgeDevicesDeleteResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Delete a EdgeDevice\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceUri: string,\n edgeDeviceName: string,\n options?: EdgeDevicesDeleteOptionalParams,\n ): Promise<EdgeDevicesDeleteResponse> {\n const poller = await this.beginDelete(resourceUri, edgeDeviceName, options);\n return poller.pollUntilDone();\n }\n\n /**\n * A long-running resource action.\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param validateRequest The content of the action request\n * @param options The options parameters.\n */\n async beginValidate(\n resourceUri: string,\n edgeDeviceName: string,\n validateRequest: ValidateRequest,\n options?: EdgeDevicesValidateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<EdgeDevicesValidateResponse>,\n EdgeDevicesValidateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<EdgeDevicesValidateResponse> => {\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: { resourceUri, edgeDeviceName, validateRequest, options },\n spec: validateOperationSpec,\n });\n const poller = await createHttpPoller<\n EdgeDevicesValidateResponse,\n OperationState<EdgeDevicesValidateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * A long-running resource action.\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param validateRequest The content of the action request\n * @param options The options parameters.\n */\n async beginValidateAndWait(\n resourceUri: string,\n edgeDeviceName: string,\n validateRequest: ValidateRequest,\n options?: EdgeDevicesValidateOptionalParams,\n ): Promise<EdgeDevicesValidateResponse> {\n const poller = await this.beginValidate(\n resourceUri,\n edgeDeviceName,\n validateRequest,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * ListNext\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\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 resourceUri: string,\n nextLink: string,\n options?: EdgeDevicesListNextOptionalParams,\n ): Promise<EdgeDevicesListNextResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EdgeDeviceListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.resourceUri],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EdgeDevice,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceUri,\n Parameters.edgeDeviceName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.EdgeDevice,\n },\n 201: {\n bodyMapper: Mappers.EdgeDevice,\n },\n 202: {\n bodyMapper: Mappers.EdgeDevice,\n },\n 204: {\n bodyMapper: Mappers.EdgeDevice,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.resource1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceUri,\n Parameters.edgeDeviceName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n headersMapper: Mappers.EdgeDevicesDeleteHeaders,\n },\n 201: {\n headersMapper: Mappers.EdgeDevicesDeleteHeaders,\n },\n 202: {\n headersMapper: Mappers.EdgeDevicesDeleteHeaders,\n },\n 204: {\n headersMapper: Mappers.EdgeDevicesDeleteHeaders,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceUri,\n Parameters.edgeDeviceName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst validateOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}/validate\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.ValidateResponse,\n },\n 201: {\n bodyMapper: Mappers.ValidateResponse,\n },\n 202: {\n bodyMapper: Mappers.ValidateResponse,\n },\n 204: {\n bodyMapper: Mappers.ValidateResponse,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.validateRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceUri,\n Parameters.edgeDeviceName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EdgeDeviceListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.resourceUri,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"edgeDevices.js","sourceRoot":"","sources":["../../../src/operations/edgeDevices.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAkB9C,4CAA4C;AAC5C,+CAA+C;AAC/C,MAAM,OAAO,eAAe;IACT,MAAM,CAAsB;IAE7C;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,IAAI,CACT,WAAmB,EACnB,OAAuC;QAEvC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,OAAO,CA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,CAAC,KAAK;QAChB,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,cAAc;KAC1B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,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,oBAAoB;SACzC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,WAAW;KACvB;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 { EdgeDevices } 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 { AzureStackHCIClient } from \"../azureStackHCIClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n EdgeDeviceUnion,\n EdgeDevicesListNextOptionalParams,\n EdgeDevicesListOptionalParams,\n EdgeDevicesListResponse,\n EdgeDevicesGetOptionalParams,\n EdgeDevicesGetResponse,\n EdgeDevicesCreateOrUpdateOptionalParams,\n EdgeDevicesCreateOrUpdateResponse,\n EdgeDevicesDeleteOptionalParams,\n EdgeDevicesDeleteResponse,\n ValidateRequest,\n EdgeDevicesValidateOptionalParams,\n EdgeDevicesValidateResponse,\n EdgeDevicesListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing EdgeDevices operations. */\nexport class EdgeDevicesImpl implements EdgeDevices {\n private readonly client: AzureStackHCIClient;\n\n /**\n * Initialize a new instance of the class EdgeDevices class.\n * @param client Reference to the service client\n */\n constructor(client: AzureStackHCIClient) {\n this.client = client;\n }\n\n /**\n * List EdgeDevice resources by parent\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param options The options parameters.\n */\n public list(\n resourceUri: string,\n options?: EdgeDevicesListOptionalParams,\n ): PagedAsyncIterableIterator<EdgeDeviceUnion> {\n const iter = this.listPagingAll(resourceUri, 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(resourceUri, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n resourceUri: string,\n options?: EdgeDevicesListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<EdgeDeviceUnion[]> {\n let result: EdgeDevicesListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(resourceUri, 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(resourceUri, continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n resourceUri: string,\n options?: EdgeDevicesListOptionalParams,\n ): AsyncIterableIterator<EdgeDeviceUnion> {\n for await (const page of this.listPagingPage(resourceUri, options)) {\n yield* page;\n }\n }\n\n /**\n * List EdgeDevice resources by parent\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param options The options parameters.\n */\n private _list(\n resourceUri: string,\n options?: EdgeDevicesListOptionalParams,\n ): Promise<EdgeDevicesListResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, options },\n listOperationSpec,\n );\n }\n\n /**\n * Get a EdgeDevice\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param options The options parameters.\n */\n get(\n resourceUri: string,\n edgeDeviceName: string,\n options?: EdgeDevicesGetOptionalParams,\n ): Promise<EdgeDevicesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, edgeDeviceName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Create a EdgeDevice\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param resource Resource create parameters.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceUri: string,\n edgeDeviceName: string,\n resource: EdgeDeviceUnion,\n options?: EdgeDevicesCreateOrUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<EdgeDevicesCreateOrUpdateResponse>,\n EdgeDevicesCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<EdgeDevicesCreateOrUpdateResponse> => {\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: { resourceUri, edgeDeviceName, resource, options },\n spec: createOrUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n EdgeDevicesCreateOrUpdateResponse,\n OperationState<EdgeDevicesCreateOrUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Create a EdgeDevice\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param resource Resource create parameters.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceUri: string,\n edgeDeviceName: string,\n resource: EdgeDeviceUnion,\n options?: EdgeDevicesCreateOrUpdateOptionalParams,\n ): Promise<EdgeDevicesCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceUri,\n edgeDeviceName,\n resource,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Delete a EdgeDevice\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param options The options parameters.\n */\n async beginDelete(\n resourceUri: string,\n edgeDeviceName: string,\n options?: EdgeDevicesDeleteOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<EdgeDevicesDeleteResponse>,\n EdgeDevicesDeleteResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<EdgeDevicesDeleteResponse> => {\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: { resourceUri, edgeDeviceName, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<\n EdgeDevicesDeleteResponse,\n OperationState<EdgeDevicesDeleteResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Delete a EdgeDevice\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceUri: string,\n edgeDeviceName: string,\n options?: EdgeDevicesDeleteOptionalParams,\n ): Promise<EdgeDevicesDeleteResponse> {\n const poller = await this.beginDelete(resourceUri, edgeDeviceName, options);\n return poller.pollUntilDone();\n }\n\n /**\n * A long-running resource action.\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param validateRequest The content of the action request\n * @param options The options parameters.\n */\n async beginValidate(\n resourceUri: string,\n edgeDeviceName: string,\n validateRequest: ValidateRequest,\n options?: EdgeDevicesValidateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<EdgeDevicesValidateResponse>,\n EdgeDevicesValidateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<EdgeDevicesValidateResponse> => {\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: { resourceUri, edgeDeviceName, validateRequest, options },\n spec: validateOperationSpec,\n });\n const poller = await createHttpPoller<\n EdgeDevicesValidateResponse,\n OperationState<EdgeDevicesValidateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * A long-running resource action.\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\n * @param edgeDeviceName Name of Device\n * @param validateRequest The content of the action request\n * @param options The options parameters.\n */\n async beginValidateAndWait(\n resourceUri: string,\n edgeDeviceName: string,\n validateRequest: ValidateRequest,\n options?: EdgeDevicesValidateOptionalParams,\n ): Promise<EdgeDevicesValidateResponse> {\n const poller = await this.beginValidate(\n resourceUri,\n edgeDeviceName,\n validateRequest,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * ListNext\n * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.\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 resourceUri: string,\n nextLink: string,\n options?: EdgeDevicesListNextOptionalParams,\n ): Promise<EdgeDevicesListNextResponse> {\n return this.client.sendOperationRequest(\n { resourceUri, nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EdgeDeviceListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.resourceUri],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EdgeDevice,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceUri,\n Parameters.edgeDeviceName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.EdgeDevice,\n },\n 201: {\n bodyMapper: Mappers.EdgeDevice,\n },\n 202: {\n bodyMapper: Mappers.EdgeDevice,\n },\n 204: {\n bodyMapper: Mappers.EdgeDevice,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.resource1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceUri,\n Parameters.edgeDeviceName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n headersMapper: Mappers.EdgeDevicesDeleteHeaders,\n },\n 201: {\n headersMapper: Mappers.EdgeDevicesDeleteHeaders,\n },\n 202: {\n headersMapper: Mappers.EdgeDevicesDeleteHeaders,\n },\n 204: {\n headersMapper: Mappers.EdgeDevicesDeleteHeaders,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceUri,\n Parameters.edgeDeviceName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst validateOperationSpec: coreClient.OperationSpec = {\n path: \"/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}/validate\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.ValidateResponse,\n },\n 201: {\n bodyMapper: Mappers.ValidateResponse,\n },\n 202: {\n bodyMapper: Mappers.ValidateResponse,\n },\n 204: {\n bodyMapper: Mappers.ValidateResponse,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.validateRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceUri,\n Parameters.edgeDeviceName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EdgeDeviceListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.resourceUri,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
|
10
9
|
import * as coreClient from "@azure/core-client";
|
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
|
@@ -15,6 +14,7 @@ import { createLroSpec } from "../lroImpl.js";
|
|
|
15
14
|
/// <reference lib="esnext.asynciterable" />
|
|
16
15
|
/** Class containing Extensions operations. */
|
|
17
16
|
export class ExtensionsImpl {
|
|
17
|
+
client;
|
|
18
18
|
/**
|
|
19
19
|
* Initialize a new instance of the class Extensions class.
|
|
20
20
|
* @param client Reference to the service client
|
|
@@ -39,52 +39,35 @@ export class ExtensionsImpl {
|
|
|
39
39
|
return this;
|
|
40
40
|
},
|
|
41
41
|
byPage: (settings) => {
|
|
42
|
-
if (settings
|
|
42
|
+
if (settings?.maxPageSize) {
|
|
43
43
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
44
44
|
}
|
|
45
45
|
return this.listByArcSettingPagingPage(resourceGroupName, clusterName, arcSettingName, options, settings);
|
|
46
46
|
},
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
listByArcSettingPagingPage(resourceGroupName, clusterName, arcSettingName, options, settings) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
});
|
|
49
|
+
async *listByArcSettingPagingPage(resourceGroupName, clusterName, arcSettingName, options, settings) {
|
|
50
|
+
let result;
|
|
51
|
+
let continuationToken = settings?.continuationToken;
|
|
52
|
+
if (!continuationToken) {
|
|
53
|
+
result = await this._listByArcSetting(resourceGroupName, clusterName, arcSettingName, options);
|
|
54
|
+
let page = result.value || [];
|
|
55
|
+
continuationToken = result.nextLink;
|
|
56
|
+
setContinuationToken(page, continuationToken);
|
|
57
|
+
yield page;
|
|
58
|
+
}
|
|
59
|
+
while (continuationToken) {
|
|
60
|
+
result = await this._listByArcSettingNext(resourceGroupName, clusterName, arcSettingName, continuationToken, options);
|
|
61
|
+
continuationToken = result.nextLink;
|
|
62
|
+
let page = result.value || [];
|
|
63
|
+
setContinuationToken(page, continuationToken);
|
|
64
|
+
yield page;
|
|
65
|
+
}
|
|
68
66
|
}
|
|
69
|
-
listByArcSettingPagingAll(resourceGroupName, clusterName, arcSettingName, options) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
for (var _d = true, _e = __asyncValues(this.listByArcSettingPagingPage(resourceGroupName, clusterName, arcSettingName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
74
|
-
_c = _f.value;
|
|
75
|
-
_d = false;
|
|
76
|
-
const page = _c;
|
|
77
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
81
|
-
finally {
|
|
82
|
-
try {
|
|
83
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
84
|
-
}
|
|
85
|
-
finally { if (e_1) throw e_1.error; }
|
|
86
|
-
}
|
|
87
|
-
});
|
|
67
|
+
async *listByArcSettingPagingAll(resourceGroupName, clusterName, arcSettingName, options) {
|
|
68
|
+
for await (const page of this.listByArcSettingPagingPage(resourceGroupName, clusterName, arcSettingName, options)) {
|
|
69
|
+
yield* page;
|
|
70
|
+
}
|
|
88
71
|
}
|
|
89
72
|
/**
|
|
90
73
|
* List all Extensions under ArcSetting resource.
|
|
@@ -127,14 +110,19 @@ export class ExtensionsImpl {
|
|
|
127
110
|
return this.client.sendOperationRequest(args, spec);
|
|
128
111
|
};
|
|
129
112
|
const sendOperationFn = async (args, spec) => {
|
|
130
|
-
var _a;
|
|
131
113
|
let currentRawResponse = undefined;
|
|
132
|
-
const providedCallback =
|
|
114
|
+
const providedCallback = args.options?.onResponse;
|
|
133
115
|
const callback = (rawResponse, flatResponse) => {
|
|
134
116
|
currentRawResponse = rawResponse;
|
|
135
|
-
providedCallback
|
|
117
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
118
|
+
};
|
|
119
|
+
const updatedArgs = {
|
|
120
|
+
...args,
|
|
121
|
+
options: {
|
|
122
|
+
...args.options,
|
|
123
|
+
onResponse: callback,
|
|
124
|
+
},
|
|
136
125
|
};
|
|
137
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
138
126
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
139
127
|
return {
|
|
140
128
|
flatResponse,
|
|
@@ -158,8 +146,8 @@ export class ExtensionsImpl {
|
|
|
158
146
|
spec: createOperationSpec,
|
|
159
147
|
});
|
|
160
148
|
const poller = await createHttpPoller(lro, {
|
|
161
|
-
restoreFrom: options
|
|
162
|
-
intervalInMs: options
|
|
149
|
+
restoreFrom: options?.resumeFrom,
|
|
150
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
163
151
|
resourceLocationConfig: "azure-async-operation",
|
|
164
152
|
});
|
|
165
153
|
await poller.poll();
|
|
@@ -192,14 +180,19 @@ export class ExtensionsImpl {
|
|
|
192
180
|
return this.client.sendOperationRequest(args, spec);
|
|
193
181
|
};
|
|
194
182
|
const sendOperationFn = async (args, spec) => {
|
|
195
|
-
var _a;
|
|
196
183
|
let currentRawResponse = undefined;
|
|
197
|
-
const providedCallback =
|
|
184
|
+
const providedCallback = args.options?.onResponse;
|
|
198
185
|
const callback = (rawResponse, flatResponse) => {
|
|
199
186
|
currentRawResponse = rawResponse;
|
|
200
|
-
providedCallback
|
|
187
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
188
|
+
};
|
|
189
|
+
const updatedArgs = {
|
|
190
|
+
...args,
|
|
191
|
+
options: {
|
|
192
|
+
...args.options,
|
|
193
|
+
onResponse: callback,
|
|
194
|
+
},
|
|
201
195
|
};
|
|
202
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
203
196
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
204
197
|
return {
|
|
205
198
|
flatResponse,
|
|
@@ -223,8 +216,8 @@ export class ExtensionsImpl {
|
|
|
223
216
|
spec: updateOperationSpec,
|
|
224
217
|
});
|
|
225
218
|
const poller = await createHttpPoller(lro, {
|
|
226
|
-
restoreFrom: options
|
|
227
|
-
intervalInMs: options
|
|
219
|
+
restoreFrom: options?.resumeFrom,
|
|
220
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
228
221
|
resourceLocationConfig: "original-uri",
|
|
229
222
|
});
|
|
230
223
|
await poller.poll();
|
|
@@ -256,14 +249,19 @@ export class ExtensionsImpl {
|
|
|
256
249
|
return this.client.sendOperationRequest(args, spec);
|
|
257
250
|
};
|
|
258
251
|
const sendOperationFn = async (args, spec) => {
|
|
259
|
-
var _a;
|
|
260
252
|
let currentRawResponse = undefined;
|
|
261
|
-
const providedCallback =
|
|
253
|
+
const providedCallback = args.options?.onResponse;
|
|
262
254
|
const callback = (rawResponse, flatResponse) => {
|
|
263
255
|
currentRawResponse = rawResponse;
|
|
264
|
-
providedCallback
|
|
256
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
257
|
+
};
|
|
258
|
+
const updatedArgs = {
|
|
259
|
+
...args,
|
|
260
|
+
options: {
|
|
261
|
+
...args.options,
|
|
262
|
+
onResponse: callback,
|
|
263
|
+
},
|
|
265
264
|
};
|
|
266
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
267
265
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
268
266
|
return {
|
|
269
267
|
flatResponse,
|
|
@@ -286,8 +284,8 @@ export class ExtensionsImpl {
|
|
|
286
284
|
spec: deleteOperationSpec,
|
|
287
285
|
});
|
|
288
286
|
const poller = await createHttpPoller(lro, {
|
|
289
|
-
restoreFrom: options
|
|
290
|
-
intervalInMs: options
|
|
287
|
+
restoreFrom: options?.resumeFrom,
|
|
288
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
291
289
|
resourceLocationConfig: "azure-async-operation",
|
|
292
290
|
});
|
|
293
291
|
await poller.poll();
|
|
@@ -319,14 +317,19 @@ export class ExtensionsImpl {
|
|
|
319
317
|
return this.client.sendOperationRequest(args, spec);
|
|
320
318
|
};
|
|
321
319
|
const sendOperationFn = async (args, spec) => {
|
|
322
|
-
var _a;
|
|
323
320
|
let currentRawResponse = undefined;
|
|
324
|
-
const providedCallback =
|
|
321
|
+
const providedCallback = args.options?.onResponse;
|
|
325
322
|
const callback = (rawResponse, flatResponse) => {
|
|
326
323
|
currentRawResponse = rawResponse;
|
|
327
|
-
providedCallback
|
|
324
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
325
|
+
};
|
|
326
|
+
const updatedArgs = {
|
|
327
|
+
...args,
|
|
328
|
+
options: {
|
|
329
|
+
...args.options,
|
|
330
|
+
onResponse: callback,
|
|
331
|
+
},
|
|
328
332
|
};
|
|
329
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
330
333
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
331
334
|
return {
|
|
332
335
|
flatResponse,
|
|
@@ -350,8 +353,8 @@ export class ExtensionsImpl {
|
|
|
350
353
|
spec: upgradeOperationSpec,
|
|
351
354
|
});
|
|
352
355
|
const poller = await createHttpPoller(lro, {
|
|
353
|
-
restoreFrom: options
|
|
354
|
-
intervalInMs: options
|
|
356
|
+
restoreFrom: options?.resumeFrom,
|
|
357
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
355
358
|
resourceLocationConfig: "azure-async-operation",
|
|
356
359
|
});
|
|
357
360
|
await poller.poll();
|