@azure/arm-labservices 3.1.1-alpha.20250718.1 → 3.1.1-alpha.20250721.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/labServicesClient.js +23 -5
- package/dist/browser/labServicesClient.js.map +1 -1
- package/dist/browser/lroImpl.js +11 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +257 -121
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/images.js +23 -40
- package/dist/browser/operations/images.js.map +1 -1
- package/dist/browser/operations/labPlans.js +89 -103
- package/dist/browser/operations/labPlans.js.map +1 -1
- package/dist/browser/operations/labs.js +100 -109
- package/dist/browser/operations/labs.js.map +1 -1
- package/dist/browser/operations/operationResults.js +1 -0
- package/dist/browser/operations/operationResults.js.map +1 -1
- package/dist/browser/operations/operations.js +23 -40
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/schedules.js +34 -46
- package/dist/browser/operations/schedules.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/usages.js +23 -40
- package/dist/browser/operations/usages.js.map +1 -1
- package/dist/browser/operations/users.js +67 -64
- package/dist/browser/operations/users.js.map +1 -1
- package/dist/browser/operations/virtualMachines.js +78 -70
- package/dist/browser/operations/virtualMachines.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/labServicesClient.js +23 -5
- package/dist/commonjs/labServicesClient.js.map +1 -1
- package/dist/commonjs/lroImpl.js +11 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +257 -121
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/images.js +23 -39
- package/dist/commonjs/operations/images.js.map +1 -1
- package/dist/commonjs/operations/labPlans.js +89 -102
- package/dist/commonjs/operations/labPlans.js.map +1 -1
- package/dist/commonjs/operations/labs.js +100 -108
- package/dist/commonjs/operations/labs.js.map +1 -1
- package/dist/commonjs/operations/operationResults.js +1 -0
- package/dist/commonjs/operations/operationResults.js.map +1 -1
- package/dist/commonjs/operations/operations.js +23 -39
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/schedules.js +34 -45
- package/dist/commonjs/operations/schedules.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/usages.js +23 -39
- package/dist/commonjs/operations/usages.js.map +1 -1
- package/dist/commonjs/operations/users.js +67 -63
- package/dist/commonjs/operations/users.js.map +1 -1
- package/dist/commonjs/operations/virtualMachines.js +78 -69
- package/dist/commonjs/operations/virtualMachines.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/labServicesClient.js +23 -5
- package/dist/esm/labServicesClient.js.map +1 -1
- package/dist/esm/lroImpl.js +11 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +257 -121
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/images.js +23 -40
- package/dist/esm/operations/images.js.map +1 -1
- package/dist/esm/operations/labPlans.js +89 -103
- package/dist/esm/operations/labPlans.js.map +1 -1
- package/dist/esm/operations/labs.js +100 -109
- package/dist/esm/operations/labs.js.map +1 -1
- package/dist/esm/operations/operationResults.js +1 -0
- package/dist/esm/operations/operationResults.js.map +1 -1
- package/dist/esm/operations/operations.js +23 -40
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/schedules.js +34 -46
- package/dist/esm/operations/schedules.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/usages.js +23 -40
- package/dist/esm/operations/usages.js.map +1 -1
- package/dist/esm/operations/users.js +67 -64
- package/dist/esm/operations/users.js.map +1 -1
- package/dist/esm/operations/virtualMachines.js +78 -70
- package/dist/esm/operations/virtualMachines.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/labServicesClient.js +23 -5
- package/dist/react-native/labServicesClient.js.map +1 -1
- package/dist/react-native/lroImpl.js +11 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +257 -121
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/images.js +23 -40
- package/dist/react-native/operations/images.js.map +1 -1
- package/dist/react-native/operations/labPlans.js +89 -103
- package/dist/react-native/operations/labPlans.js.map +1 -1
- package/dist/react-native/operations/labs.js +100 -109
- package/dist/react-native/operations/labs.js.map +1 -1
- package/dist/react-native/operations/operationResults.js +1 -0
- package/dist/react-native/operations/operationResults.js.map +1 -1
- package/dist/react-native/operations/operations.js +23 -40
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/schedules.js +34 -46
- package/dist/react-native/operations/schedules.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/usages.js +23 -40
- package/dist/react-native/operations/usages.js.map +1 -1
- package/dist/react-native/operations/users.js +67 -64
- package/dist/react-native/operations/users.js.map +1 -1
- package/dist/react-native/operations/virtualMachines.js +78 -70
- package/dist/react-native/operations/virtualMachines.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-labservices-node.api.md +1198 -1198
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
16
16
|
/// <reference lib="esnext.asynciterable" />
|
17
17
|
/** Class containing Images operations. */
|
18
18
|
class ImagesImpl {
|
19
|
+
client;
|
19
20
|
/**
|
20
21
|
* Initialize a new instance of the class Images class.
|
21
22
|
* @param client Reference to the service client
|
@@ -40,52 +41,35 @@ class ImagesImpl {
|
|
40
41
|
return this;
|
41
42
|
},
|
42
43
|
byPage: (settings) => {
|
43
|
-
if (settings
|
44
|
+
if (settings?.maxPageSize) {
|
44
45
|
throw new Error("maxPageSize is not supported by this operation.");
|
45
46
|
}
|
46
47
|
return this.listByLabPlanPagingPage(resourceGroupName, labPlanName, options, settings);
|
47
48
|
}
|
48
49
|
};
|
49
50
|
}
|
50
|
-
listByLabPlanPagingPage(resourceGroupName, labPlanName, options, settings) {
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
}
|
68
|
-
});
|
51
|
+
async *listByLabPlanPagingPage(resourceGroupName, labPlanName, options, settings) {
|
52
|
+
let result;
|
53
|
+
let continuationToken = settings?.continuationToken;
|
54
|
+
if (!continuationToken) {
|
55
|
+
result = await this._listByLabPlan(resourceGroupName, labPlanName, options);
|
56
|
+
let page = result.value || [];
|
57
|
+
continuationToken = result.nextLink;
|
58
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
59
|
+
yield page;
|
60
|
+
}
|
61
|
+
while (continuationToken) {
|
62
|
+
result = await this._listByLabPlanNext(resourceGroupName, labPlanName, continuationToken, options);
|
63
|
+
continuationToken = result.nextLink;
|
64
|
+
let page = result.value || [];
|
65
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
66
|
+
yield page;
|
67
|
+
}
|
69
68
|
}
|
70
|
-
listByLabPlanPagingAll(resourceGroupName, labPlanName, options) {
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listByLabPlanPagingPage(resourceGroupName, labPlanName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
75
|
-
_c = _f.value;
|
76
|
-
_d = false;
|
77
|
-
const page = _c;
|
78
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
79
|
-
}
|
80
|
-
}
|
81
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
82
|
-
finally {
|
83
|
-
try {
|
84
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
85
|
-
}
|
86
|
-
finally { if (e_1) throw e_1.error; }
|
87
|
-
}
|
88
|
-
});
|
69
|
+
async *listByLabPlanPagingAll(resourceGroupName, labPlanName, options) {
|
70
|
+
for await (const page of this.listByLabPlanPagingPage(resourceGroupName, labPlanName, options)) {
|
71
|
+
yield* page;
|
72
|
+
}
|
89
73
|
}
|
90
74
|
/**
|
91
75
|
* Gets all images from galleries attached to a lab plan.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"images.js","sourceRoot":"","sources":["../../../src/operations/images.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAiBtD,4CAA4C;AAC5C,0CAA0C;AAC1C,MAAa,UAAU;IAGrB;;;OAGG;IACH,YAAY,MAAyB;QACnC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACI,aAAa,CAClB,iBAAyB,EACzB,WAAmB,EACnB,OAA2C;QAE3C,MAAM,IAAI,GAAG,IAAI,CAAC,sBAAsB,CACtC,iBAAiB,EACjB,WAAW,EACX,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uB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8B,GAA6B;IAC/D,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,QAAQ;KACpB;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 { Images } 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 { LabServicesClient } from \"../labServicesClient.js\";\nimport {\n Image,\n ImagesListByLabPlanNextOptionalParams,\n ImagesListByLabPlanOptionalParams,\n ImagesListByLabPlanResponse,\n ImagesGetOptionalParams,\n ImagesGetResponse,\n ImagesCreateOrUpdateOptionalParams,\n ImagesCreateOrUpdateResponse,\n ImageUpdate,\n ImagesUpdateOptionalParams,\n ImagesUpdateResponse,\n ImagesListByLabPlanNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Images operations. */\nexport class ImagesImpl implements Images {\n private readonly client: LabServicesClient;\n\n /**\n * Initialize a new instance of the class Images class.\n * @param client Reference to the service client\n */\n constructor(client: LabServicesClient) {\n this.client = client;\n }\n\n /**\n * Gets all images from galleries attached to a lab plan.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param labPlanName The name of the lab plan that uniquely identifies it within containing resource\n * group. Used in resource URIs and in UI.\n * @param options The options parameters.\n */\n public listByLabPlan(\n resourceGroupName: string,\n labPlanName: string,\n options?: ImagesListByLabPlanOptionalParams\n ): PagedAsyncIterableIterator<Image> {\n const iter = this.listByLabPlanPagingAll(\n resourceGroupName,\n labPlanName,\n options\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByLabPlanPagingPage(\n resourceGroupName,\n labPlanName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByLabPlanPagingPage(\n resourceGroupName: string,\n labPlanName: string,\n options?: ImagesListByLabPlanOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<Image[]> {\n let result: ImagesListByLabPlanResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByLabPlan(\n resourceGroupName,\n labPlanName,\n options\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByLabPlanNext(\n resourceGroupName,\n labPlanName,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByLabPlanPagingAll(\n resourceGroupName: string,\n labPlanName: string,\n options?: ImagesListByLabPlanOptionalParams\n ): AsyncIterableIterator<Image> {\n for await (const page of this.listByLabPlanPagingPage(\n resourceGroupName,\n labPlanName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets all images from galleries attached to a lab plan.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param labPlanName The name of the lab plan that uniquely identifies it within containing resource\n * group. Used in resource URIs and in UI.\n * @param options The options parameters.\n */\n private _listByLabPlan(\n resourceGroupName: string,\n labPlanName: string,\n options?: ImagesListByLabPlanOptionalParams\n ): Promise<ImagesListByLabPlanResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, labPlanName, options },\n listByLabPlanOperationSpec\n );\n }\n\n /**\n * Gets an image resource.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param labPlanName The name of the lab plan that uniquely identifies it within containing resource\n * group. Used in resource URIs and in UI.\n * @param imageName The image name.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n labPlanName: string,\n imageName: string,\n options?: ImagesGetOptionalParams\n ): Promise<ImagesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, labPlanName, imageName, options },\n getOperationSpec\n );\n }\n\n /**\n * Updates an image resource via PUT. Creating new resources via PUT will not function.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param labPlanName The name of the lab plan that uniquely identifies it within containing resource\n * group. Used in resource URIs and in UI.\n * @param imageName The image name.\n * @param body The request body.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n labPlanName: string,\n imageName: string,\n body: Image,\n options?: ImagesCreateOrUpdateOptionalParams\n ): Promise<ImagesCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, labPlanName, imageName, body, options },\n createOrUpdateOperationSpec\n );\n }\n\n /**\n * Updates an image resource.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param labPlanName The name of the lab plan that uniquely identifies it within containing resource\n * group. Used in resource URIs and in UI.\n * @param imageName The image name.\n * @param body The request body.\n * @param options The options parameters.\n */\n update(\n resourceGroupName: string,\n labPlanName: string,\n imageName: string,\n body: ImageUpdate,\n options?: ImagesUpdateOptionalParams\n ): Promise<ImagesUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, labPlanName, imageName, body, options },\n updateOperationSpec\n );\n }\n\n /**\n * ListByLabPlanNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param labPlanName The name of the lab plan that uniquely identifies it within containing resource\n * group. Used in resource URIs and in UI.\n * @param nextLink The nextLink from the previous successful call to the ListByLabPlan method.\n * @param options The options parameters.\n */\n private _listByLabPlanNext(\n resourceGroupName: string,\n labPlanName: string,\n nextLink: string,\n options?: ImagesListByLabPlanNextOptionalParams\n ): Promise<ImagesListByLabPlanNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, labPlanName, nextLink, options },\n listByLabPlanNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByLabPlanOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labPlans/{labPlanName}/images\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PagedImages\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.labPlanName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labPlans/{labPlanName}/images/{imageName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Image\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.labPlanName,\n Parameters.imageName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labPlans/{labPlanName}/images/{imageName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.Image\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.body,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.labPlanName,\n Parameters.imageName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labPlans/{labPlanName}/images/{imageName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.Image\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.body1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.labPlanName,\n Parameters.imageName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst listByLabPlanNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PagedImages\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.labPlanName,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
1
|
+
{"version":3,"file":"images.js","sourceRoot":"","sources":["../../../src/operations/images.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAiBtD,4CAA4C;AAC5C,0CAA0C;AAC1C,MAAa,UAAU;IACJ,MAAM,CAAoB;IAE3C;;;OAGG;IACH,YAAY,MAAyB;QACnC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;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AU,CAAC,WAAW;QACtB,UAAU,CAAC,SAAS;KACrB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,8BAA8B,GAA6B;IAC/D,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,QAAQ;KACpB;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 { Images } 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 { LabServicesClient } from \"../labServicesClient.js\";\nimport {\n Image,\n ImagesListByLabPlanNextOptionalParams,\n ImagesListByLabPlanOptionalParams,\n ImagesListByLabPlanResponse,\n ImagesGetOptionalParams,\n ImagesGetResponse,\n ImagesCreateOrUpdateOptionalParams,\n ImagesCreateOrUpdateResponse,\n ImageUpdate,\n ImagesUpdateOptionalParams,\n ImagesUpdateResponse,\n ImagesListByLabPlanNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Images operations. */\nexport class ImagesImpl implements Images {\n private readonly client: LabServicesClient;\n\n /**\n * Initialize a new instance of the class Images class.\n * @param client Reference to the service client\n */\n constructor(client: LabServicesClient) {\n this.client = client;\n }\n\n /**\n * Gets all images from galleries attached to a lab plan.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param labPlanName The name of the lab plan that uniquely identifies it within containing resource\n * group. Used in resource URIs and in UI.\n * @param options The options parameters.\n */\n public listByLabPlan(\n resourceGroupName: string,\n labPlanName: string,\n options?: ImagesListByLabPlanOptionalParams\n ): PagedAsyncIterableIterator<Image> {\n const iter = this.listByLabPlanPagingAll(\n resourceGroupName,\n labPlanName,\n options\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByLabPlanPagingPage(\n resourceGroupName,\n labPlanName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByLabPlanPagingPage(\n resourceGroupName: string,\n labPlanName: string,\n options?: ImagesListByLabPlanOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<Image[]> {\n let result: ImagesListByLabPlanResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByLabPlan(\n resourceGroupName,\n labPlanName,\n options\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByLabPlanNext(\n resourceGroupName,\n labPlanName,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByLabPlanPagingAll(\n resourceGroupName: string,\n labPlanName: string,\n options?: ImagesListByLabPlanOptionalParams\n ): AsyncIterableIterator<Image> {\n for await (const page of this.listByLabPlanPagingPage(\n resourceGroupName,\n labPlanName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets all images from galleries attached to a lab plan.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param labPlanName The name of the lab plan that uniquely identifies it within containing resource\n * group. Used in resource URIs and in UI.\n * @param options The options parameters.\n */\n private _listByLabPlan(\n resourceGroupName: string,\n labPlanName: string,\n options?: ImagesListByLabPlanOptionalParams\n ): Promise<ImagesListByLabPlanResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, labPlanName, options },\n listByLabPlanOperationSpec\n );\n }\n\n /**\n * Gets an image resource.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param labPlanName The name of the lab plan that uniquely identifies it within containing resource\n * group. Used in resource URIs and in UI.\n * @param imageName The image name.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n labPlanName: string,\n imageName: string,\n options?: ImagesGetOptionalParams\n ): Promise<ImagesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, labPlanName, imageName, options },\n getOperationSpec\n );\n }\n\n /**\n * Updates an image resource via PUT. Creating new resources via PUT will not function.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param labPlanName The name of the lab plan that uniquely identifies it within containing resource\n * group. Used in resource URIs and in UI.\n * @param imageName The image name.\n * @param body The request body.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n labPlanName: string,\n imageName: string,\n body: Image,\n options?: ImagesCreateOrUpdateOptionalParams\n ): Promise<ImagesCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, labPlanName, imageName, body, options },\n createOrUpdateOperationSpec\n );\n }\n\n /**\n * Updates an image resource.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param labPlanName The name of the lab plan that uniquely identifies it within containing resource\n * group. Used in resource URIs and in UI.\n * @param imageName The image name.\n * @param body The request body.\n * @param options The options parameters.\n */\n update(\n resourceGroupName: string,\n labPlanName: string,\n imageName: string,\n body: ImageUpdate,\n options?: ImagesUpdateOptionalParams\n ): Promise<ImagesUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, labPlanName, imageName, body, options },\n updateOperationSpec\n );\n }\n\n /**\n * ListByLabPlanNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param labPlanName The name of the lab plan that uniquely identifies it within containing resource\n * group. Used in resource URIs and in UI.\n * @param nextLink The nextLink from the previous successful call to the ListByLabPlan method.\n * @param options The options parameters.\n */\n private _listByLabPlanNext(\n resourceGroupName: string,\n labPlanName: string,\n nextLink: string,\n options?: ImagesListByLabPlanNextOptionalParams\n ): Promise<ImagesListByLabPlanNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, labPlanName, nextLink, options },\n listByLabPlanNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByLabPlanOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labPlans/{labPlanName}/images\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PagedImages\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.labPlanName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labPlans/{labPlanName}/images/{imageName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Image\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.labPlanName,\n Parameters.imageName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labPlans/{labPlanName}/images/{imageName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.Image\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.body,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.labPlanName,\n Parameters.imageName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labPlans/{labPlanName}/images/{imageName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.Image\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.body1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.labPlanName,\n Parameters.imageName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst listByLabPlanNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PagedImages\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.labPlanName,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
|
|
18
18
|
/// <reference lib="esnext.asynciterable" />
|
19
19
|
/** Class containing LabPlans operations. */
|
20
20
|
class LabPlansImpl {
|
21
|
+
client;
|
21
22
|
/**
|
22
23
|
* Initialize a new instance of the class LabPlans class.
|
23
24
|
* @param client Reference to the service client
|
@@ -39,52 +40,35 @@ class LabPlansImpl {
|
|
39
40
|
return this;
|
40
41
|
},
|
41
42
|
byPage: (settings) => {
|
42
|
-
if (settings
|
43
|
+
if (settings?.maxPageSize) {
|
43
44
|
throw new Error("maxPageSize is not supported by this operation.");
|
44
45
|
}
|
45
46
|
return this.listBySubscriptionPagingPage(options, settings);
|
46
47
|
}
|
47
48
|
};
|
48
49
|
}
|
49
|
-
listBySubscriptionPagingPage(options, settings) {
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
}
|
67
|
-
});
|
50
|
+
async *listBySubscriptionPagingPage(options, settings) {
|
51
|
+
let result;
|
52
|
+
let continuationToken = settings?.continuationToken;
|
53
|
+
if (!continuationToken) {
|
54
|
+
result = await this._listBySubscription(options);
|
55
|
+
let page = result.value || [];
|
56
|
+
continuationToken = result.nextLink;
|
57
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
58
|
+
yield page;
|
59
|
+
}
|
60
|
+
while (continuationToken) {
|
61
|
+
result = await this._listBySubscriptionNext(continuationToken, options);
|
62
|
+
continuationToken = result.nextLink;
|
63
|
+
let page = result.value || [];
|
64
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
65
|
+
yield page;
|
66
|
+
}
|
68
67
|
}
|
69
|
-
listBySubscriptionPagingAll(options) {
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listBySubscriptionPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
74
|
-
_c = _f.value;
|
75
|
-
_d = false;
|
76
|
-
const page = _c;
|
77
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__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 tslib_1.__await(_b.call(_e));
|
84
|
-
}
|
85
|
-
finally { if (e_1) throw e_1.error; }
|
86
|
-
}
|
87
|
-
});
|
68
|
+
async *listBySubscriptionPagingAll(options) {
|
69
|
+
for await (const page of this.listBySubscriptionPagingPage(options)) {
|
70
|
+
yield* page;
|
71
|
+
}
|
88
72
|
}
|
89
73
|
/**
|
90
74
|
* Returns a list of all lab plans for a subscription and resource group.
|
@@ -101,52 +85,35 @@ class LabPlansImpl {
|
|
101
85
|
return this;
|
102
86
|
},
|
103
87
|
byPage: (settings) => {
|
104
|
-
if (settings
|
88
|
+
if (settings?.maxPageSize) {
|
105
89
|
throw new Error("maxPageSize is not supported by this operation.");
|
106
90
|
}
|
107
91
|
return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
|
108
92
|
}
|
109
93
|
};
|
110
94
|
}
|
111
|
-
listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
}
|
129
|
-
});
|
95
|
+
async *listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
96
|
+
let result;
|
97
|
+
let continuationToken = settings?.continuationToken;
|
98
|
+
if (!continuationToken) {
|
99
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
100
|
+
let page = result.value || [];
|
101
|
+
continuationToken = result.nextLink;
|
102
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
103
|
+
yield page;
|
104
|
+
}
|
105
|
+
while (continuationToken) {
|
106
|
+
result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options);
|
107
|
+
continuationToken = result.nextLink;
|
108
|
+
let page = result.value || [];
|
109
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
110
|
+
yield page;
|
111
|
+
}
|
130
112
|
}
|
131
|
-
listByResourceGroupPagingAll(resourceGroupName, options) {
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
136
|
-
_c = _f.value;
|
137
|
-
_d = false;
|
138
|
-
const page = _c;
|
139
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
140
|
-
}
|
141
|
-
}
|
142
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
143
|
-
finally {
|
144
|
-
try {
|
145
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
146
|
-
}
|
147
|
-
finally { if (e_2) throw e_2.error; }
|
148
|
-
}
|
149
|
-
});
|
113
|
+
async *listByResourceGroupPagingAll(resourceGroupName, options) {
|
114
|
+
for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
|
115
|
+
yield* page;
|
116
|
+
}
|
150
117
|
}
|
151
118
|
/**
|
152
119
|
* Returns a list of all lab plans within a subscription
|
@@ -186,14 +153,19 @@ class LabPlansImpl {
|
|
186
153
|
return this.client.sendOperationRequest(args, spec);
|
187
154
|
};
|
188
155
|
const sendOperation = async (args, spec) => {
|
189
|
-
var _a;
|
190
156
|
let currentRawResponse = undefined;
|
191
|
-
const providedCallback =
|
157
|
+
const providedCallback = args.options?.onResponse;
|
192
158
|
const callback = (rawResponse, flatResponse) => {
|
193
159
|
currentRawResponse = rawResponse;
|
194
|
-
providedCallback
|
160
|
+
providedCallback?.(rawResponse, flatResponse);
|
161
|
+
};
|
162
|
+
const updatedArgs = {
|
163
|
+
...args,
|
164
|
+
options: {
|
165
|
+
...args.options,
|
166
|
+
onResponse: callback
|
167
|
+
}
|
195
168
|
};
|
196
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
197
169
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
198
170
|
return {
|
199
171
|
flatResponse,
|
@@ -206,8 +178,8 @@ class LabPlansImpl {
|
|
206
178
|
};
|
207
179
|
const lro = new lroImpl_js_1.LroImpl(sendOperation, { resourceGroupName, labPlanName, body, options }, createOrUpdateOperationSpec);
|
208
180
|
const poller = new core_lro_1.LroEngine(lro, {
|
209
|
-
resumeFrom: options
|
210
|
-
intervalInMs: options
|
181
|
+
resumeFrom: options?.resumeFrom,
|
182
|
+
intervalInMs: options?.updateIntervalInMs,
|
211
183
|
lroResourceLocationConfig: "original-uri"
|
212
184
|
});
|
213
185
|
await poller.poll();
|
@@ -238,14 +210,19 @@ class LabPlansImpl {
|
|
238
210
|
return this.client.sendOperationRequest(args, spec);
|
239
211
|
};
|
240
212
|
const sendOperation = async (args, spec) => {
|
241
|
-
var _a;
|
242
213
|
let currentRawResponse = undefined;
|
243
|
-
const providedCallback =
|
214
|
+
const providedCallback = args.options?.onResponse;
|
244
215
|
const callback = (rawResponse, flatResponse) => {
|
245
216
|
currentRawResponse = rawResponse;
|
246
|
-
providedCallback
|
217
|
+
providedCallback?.(rawResponse, flatResponse);
|
218
|
+
};
|
219
|
+
const updatedArgs = {
|
220
|
+
...args,
|
221
|
+
options: {
|
222
|
+
...args.options,
|
223
|
+
onResponse: callback
|
224
|
+
}
|
247
225
|
};
|
248
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
249
226
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
250
227
|
return {
|
251
228
|
flatResponse,
|
@@ -258,8 +235,8 @@ class LabPlansImpl {
|
|
258
235
|
};
|
259
236
|
const lro = new lroImpl_js_1.LroImpl(sendOperation, { resourceGroupName, labPlanName, body, options }, updateOperationSpec);
|
260
237
|
const poller = new core_lro_1.LroEngine(lro, {
|
261
|
-
resumeFrom: options
|
262
|
-
intervalInMs: options
|
238
|
+
resumeFrom: options?.resumeFrom,
|
239
|
+
intervalInMs: options?.updateIntervalInMs,
|
263
240
|
lroResourceLocationConfig: "location"
|
264
241
|
});
|
265
242
|
await poller.poll();
|
@@ -290,14 +267,19 @@ class LabPlansImpl {
|
|
290
267
|
return this.client.sendOperationRequest(args, spec);
|
291
268
|
};
|
292
269
|
const sendOperation = async (args, spec) => {
|
293
|
-
var _a;
|
294
270
|
let currentRawResponse = undefined;
|
295
|
-
const providedCallback =
|
271
|
+
const providedCallback = args.options?.onResponse;
|
296
272
|
const callback = (rawResponse, flatResponse) => {
|
297
273
|
currentRawResponse = rawResponse;
|
298
|
-
providedCallback
|
274
|
+
providedCallback?.(rawResponse, flatResponse);
|
275
|
+
};
|
276
|
+
const updatedArgs = {
|
277
|
+
...args,
|
278
|
+
options: {
|
279
|
+
...args.options,
|
280
|
+
onResponse: callback
|
281
|
+
}
|
299
282
|
};
|
300
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
301
283
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
302
284
|
return {
|
303
285
|
flatResponse,
|
@@ -310,8 +292,8 @@ class LabPlansImpl {
|
|
310
292
|
};
|
311
293
|
const lro = new lroImpl_js_1.LroImpl(sendOperation, { resourceGroupName, labPlanName, options }, deleteOperationSpec);
|
312
294
|
const poller = new core_lro_1.LroEngine(lro, {
|
313
|
-
resumeFrom: options
|
314
|
-
intervalInMs: options
|
295
|
+
resumeFrom: options?.resumeFrom,
|
296
|
+
intervalInMs: options?.updateIntervalInMs,
|
315
297
|
lroResourceLocationConfig: "location"
|
316
298
|
});
|
317
299
|
await poller.poll();
|
@@ -342,14 +324,19 @@ class LabPlansImpl {
|
|
342
324
|
return this.client.sendOperationRequest(args, spec);
|
343
325
|
};
|
344
326
|
const sendOperation = async (args, spec) => {
|
345
|
-
var _a;
|
346
327
|
let currentRawResponse = undefined;
|
347
|
-
const providedCallback =
|
328
|
+
const providedCallback = args.options?.onResponse;
|
348
329
|
const callback = (rawResponse, flatResponse) => {
|
349
330
|
currentRawResponse = rawResponse;
|
350
|
-
providedCallback
|
331
|
+
providedCallback?.(rawResponse, flatResponse);
|
332
|
+
};
|
333
|
+
const updatedArgs = {
|
334
|
+
...args,
|
335
|
+
options: {
|
336
|
+
...args.options,
|
337
|
+
onResponse: callback
|
338
|
+
}
|
351
339
|
};
|
352
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
353
340
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
354
341
|
return {
|
355
342
|
flatResponse,
|
@@ -362,8 +349,8 @@ class LabPlansImpl {
|
|
362
349
|
};
|
363
350
|
const lro = new lroImpl_js_1.LroImpl(sendOperation, { resourceGroupName, labPlanName, body, options }, saveImageOperationSpec);
|
364
351
|
const poller = new core_lro_1.LroEngine(lro, {
|
365
|
-
resumeFrom: options
|
366
|
-
intervalInMs: options
|
352
|
+
resumeFrom: options?.resumeFrom,
|
353
|
+
intervalInMs: options?.updateIntervalInMs,
|
367
354
|
lroResourceLocationConfig: "location"
|
368
355
|
});
|
369
356
|
await poller.poll();
|