@azure/arm-labservices 3.1.1-alpha.20250620.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.api.md → arm-labservices-node.api.md} +0 -0
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
16
16
|
/// <reference lib="esnext.asynciterable" />
|
17
17
|
/** Class containing Skus operations. */
|
18
18
|
class SkusImpl {
|
19
|
+
client;
|
19
20
|
/**
|
20
21
|
* Initialize a new instance of the class Skus class.
|
21
22
|
* @param client Reference to the service client
|
@@ -37,52 +38,35 @@ class SkusImpl {
|
|
37
38
|
return this;
|
38
39
|
},
|
39
40
|
byPage: (settings) => {
|
40
|
-
if (settings
|
41
|
+
if (settings?.maxPageSize) {
|
41
42
|
throw new Error("maxPageSize is not supported by this operation.");
|
42
43
|
}
|
43
44
|
return this.listPagingPage(options, settings);
|
44
45
|
}
|
45
46
|
};
|
46
47
|
}
|
47
|
-
listPagingPage(options, settings) {
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
}
|
65
|
-
});
|
48
|
+
async *listPagingPage(options, settings) {
|
49
|
+
let result;
|
50
|
+
let continuationToken = settings?.continuationToken;
|
51
|
+
if (!continuationToken) {
|
52
|
+
result = await this._list(options);
|
53
|
+
let page = result.value || [];
|
54
|
+
continuationToken = result.nextLink;
|
55
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
56
|
+
yield page;
|
57
|
+
}
|
58
|
+
while (continuationToken) {
|
59
|
+
result = await this._listNext(continuationToken, options);
|
60
|
+
continuationToken = result.nextLink;
|
61
|
+
let page = result.value || [];
|
62
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
63
|
+
yield page;
|
64
|
+
}
|
66
65
|
}
|
67
|
-
listPagingAll(options) {
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
72
|
-
_c = _f.value;
|
73
|
-
_d = false;
|
74
|
-
const page = _c;
|
75
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__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 tslib_1.__await(_b.call(_e));
|
82
|
-
}
|
83
|
-
finally { if (e_1) throw e_1.error; }
|
84
|
-
}
|
85
|
-
});
|
66
|
+
async *listPagingAll(options) {
|
67
|
+
for await (const page of this.listPagingPage(options)) {
|
68
|
+
yield* page;
|
69
|
+
}
|
86
70
|
}
|
87
71
|
/**
|
88
72
|
* Returns a list of Azure Lab Services resource SKUs.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"skus.js","sourceRoot":"","sources":["../../../src/operations/skus.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,wCAAwC;AACxC,MAAa,QAAQ;
|
1
|
+
{"version":3,"file":"skus.js","sourceRoot":"","sources":["../../../src/operations/skus.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,wCAAwC;AACxC,MAAa,QAAQ;IACF,MAAM,CAAoB;IAE3C;;;OAGG;IACH,YAAY,MAAyB;QACnC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IAAI,CACT,OAAgC;QAEhC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,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,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,K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B,CAAC,CAAC;IAC1E,CAAC;IAED;;;;OAIG;IACK,SAAS,CACf,QAAgB,EAChB,OAAoC;QAEpC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,QAAQ,EAAE,OAAO,EAAE,EACrB,qBAAqB,CACtB,CAAC;IACJ,CAAC;CACF;AAvFD,4BAuFC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,sEAAsE;IAC5E,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,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oBAAoB;SACzC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;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 { Skus } 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 LabServicesSku,\n SkusListNextOptionalParams,\n SkusListOptionalParams,\n SkusListResponse,\n SkusListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Skus operations. */\nexport class SkusImpl implements Skus {\n private readonly client: LabServicesClient;\n\n /**\n * Initialize a new instance of the class Skus class.\n * @param client Reference to the service client\n */\n constructor(client: LabServicesClient) {\n this.client = client;\n }\n\n /**\n * Returns a list of Azure Lab Services resource SKUs.\n * @param options The options parameters.\n */\n public list(\n options?: SkusListOptionalParams\n ): PagedAsyncIterableIterator<LabServicesSku> {\n const iter = this.listPagingAll(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(options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n options?: SkusListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<LabServicesSku[]> {\n let result: SkusListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(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(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 options?: SkusListOptionalParams\n ): AsyncIterableIterator<LabServicesSku> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Returns a list of Azure Lab Services resource SKUs.\n * @param options The options parameters.\n */\n private _list(options?: SkusListOptionalParams): Promise<SkusListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * ListNext\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 nextLink: string,\n options?: SkusListNextOptionalParams\n ): Promise<SkusListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.LabServices/skus\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PagedLabServicesSkus\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PagedLabServicesSkus\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
16
16
|
/// <reference lib="esnext.asynciterable" />
|
17
17
|
/** Class containing Usages operations. */
|
18
18
|
class UsagesImpl {
|
19
|
+
client;
|
19
20
|
/**
|
20
21
|
* Initialize a new instance of the class Usages class.
|
21
22
|
* @param client Reference to the service client
|
@@ -38,52 +39,35 @@ class UsagesImpl {
|
|
38
39
|
return this;
|
39
40
|
},
|
40
41
|
byPage: (settings) => {
|
41
|
-
if (settings
|
42
|
+
if (settings?.maxPageSize) {
|
42
43
|
throw new Error("maxPageSize is not supported by this operation.");
|
43
44
|
}
|
44
45
|
return this.listByLocationPagingPage(location, options, settings);
|
45
46
|
}
|
46
47
|
};
|
47
48
|
}
|
48
|
-
listByLocationPagingPage(location, options, settings) {
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
}
|
66
|
-
});
|
49
|
+
async *listByLocationPagingPage(location, options, settings) {
|
50
|
+
let result;
|
51
|
+
let continuationToken = settings?.continuationToken;
|
52
|
+
if (!continuationToken) {
|
53
|
+
result = await this._listByLocation(location, options);
|
54
|
+
let page = result.value || [];
|
55
|
+
continuationToken = result.nextLink;
|
56
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
57
|
+
yield page;
|
58
|
+
}
|
59
|
+
while (continuationToken) {
|
60
|
+
result = await this._listByLocationNext(location, continuationToken, options);
|
61
|
+
continuationToken = result.nextLink;
|
62
|
+
let page = result.value || [];
|
63
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
64
|
+
yield page;
|
65
|
+
}
|
67
66
|
}
|
68
|
-
listByLocationPagingAll(location, options) {
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listByLocationPagingPage(location, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
73
|
-
_c = _f.value;
|
74
|
-
_d = false;
|
75
|
-
const page = _c;
|
76
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
77
|
-
}
|
78
|
-
}
|
79
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
80
|
-
finally {
|
81
|
-
try {
|
82
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
83
|
-
}
|
84
|
-
finally { if (e_1) throw e_1.error; }
|
85
|
-
}
|
86
|
-
});
|
67
|
+
async *listByLocationPagingAll(location, options) {
|
68
|
+
for await (const page of this.listByLocationPagingPage(location, options)) {
|
69
|
+
yield* page;
|
70
|
+
}
|
87
71
|
}
|
88
72
|
/**
|
89
73
|
* Returns list of usage per SKU family for the specified subscription in the specified region.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"usages.js","sourceRoot":"","sources":["../../../src/operations/usages.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,0CAA0C;AAC1C,MAAa,UAAU;
|
1
|
+
{"version":3,"file":"usages.js","sourceRoot":"","sources":["../../../src/operations/usages.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,0CAA0C;AAC1C,MAAa,UAAU;IACJ,MAAM,CAAoB;IAE3C;;;OAGG;IACH,YAAY,MAAyB;QACnC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,cAAc,CACnB,QAAgB,EAChB,OAA4C;QAE5C,MAAM,IAAI,GAAG,IAAI,CAAC,uBAAuB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC7D,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,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,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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 { Usages } 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 Usage,\n UsagesListByLocationNextOptionalParams,\n UsagesListByLocationOptionalParams,\n UsagesListByLocationResponse,\n UsagesListByLocationNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Usages operations. */\nexport class UsagesImpl implements Usages {\n private readonly client: LabServicesClient;\n\n /**\n * Initialize a new instance of the class Usages class.\n * @param client Reference to the service client\n */\n constructor(client: LabServicesClient) {\n this.client = client;\n }\n\n /**\n * Returns list of usage per SKU family for the specified subscription in the specified region.\n * @param location The location name.\n * @param options The options parameters.\n */\n public listByLocation(\n location: string,\n options?: UsagesListByLocationOptionalParams\n ): PagedAsyncIterableIterator<Usage> {\n const iter = this.listByLocationPagingAll(location, 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.listByLocationPagingPage(location, options, settings);\n }\n };\n }\n\n private async *listByLocationPagingPage(\n location: string,\n options?: UsagesListByLocationOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<Usage[]> {\n let result: UsagesListByLocationResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByLocation(location, 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._listByLocationNext(\n location,\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 *listByLocationPagingAll(\n location: string,\n options?: UsagesListByLocationOptionalParams\n ): AsyncIterableIterator<Usage> {\n for await (const page of this.listByLocationPagingPage(location, options)) {\n yield* page;\n }\n }\n\n /**\n * Returns list of usage per SKU family for the specified subscription in the specified region.\n * @param location The location name.\n * @param options The options parameters.\n */\n private _listByLocation(\n location: string,\n options?: UsagesListByLocationOptionalParams\n ): Promise<UsagesListByLocationResponse> {\n return this.client.sendOperationRequest(\n { location, options },\n listByLocationOperationSpec\n );\n }\n\n /**\n * ListByLocationNext\n * @param location The location name.\n * @param nextLink The nextLink from the previous successful call to the ListByLocation method.\n * @param options The options parameters.\n */\n private _listByLocationNext(\n location: string,\n nextLink: string,\n options?: UsagesListByLocationNextOptionalParams\n ): Promise<UsagesListByLocationNextResponse> {\n return this.client.sendOperationRequest(\n { location, nextLink, options },\n listByLocationNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByLocationOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.LabServices/locations/{location}/usages\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListUsagesResult\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.location\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByLocationNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListUsagesResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n Parameters.location\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 Users operations. */
|
20
20
|
class UsersImpl {
|
21
|
+
client;
|
21
22
|
/**
|
22
23
|
* Initialize a new instance of the class Users class.
|
23
24
|
* @param client Reference to the service client
|
@@ -42,52 +43,35 @@ class UsersImpl {
|
|
42
43
|
return this;
|
43
44
|
},
|
44
45
|
byPage: (settings) => {
|
45
|
-
if (settings
|
46
|
+
if (settings?.maxPageSize) {
|
46
47
|
throw new Error("maxPageSize is not supported by this operation.");
|
47
48
|
}
|
48
49
|
return this.listByLabPagingPage(resourceGroupName, labName, options, settings);
|
49
50
|
}
|
50
51
|
};
|
51
52
|
}
|
52
|
-
listByLabPagingPage(resourceGroupName, labName, options, settings) {
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
}
|
70
|
-
});
|
53
|
+
async *listByLabPagingPage(resourceGroupName, labName, options, settings) {
|
54
|
+
let result;
|
55
|
+
let continuationToken = settings?.continuationToken;
|
56
|
+
if (!continuationToken) {
|
57
|
+
result = await this._listByLab(resourceGroupName, labName, options);
|
58
|
+
let page = result.value || [];
|
59
|
+
continuationToken = result.nextLink;
|
60
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
61
|
+
yield page;
|
62
|
+
}
|
63
|
+
while (continuationToken) {
|
64
|
+
result = await this._listByLabNext(resourceGroupName, labName, continuationToken, options);
|
65
|
+
continuationToken = result.nextLink;
|
66
|
+
let page = result.value || [];
|
67
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
68
|
+
yield page;
|
69
|
+
}
|
71
70
|
}
|
72
|
-
listByLabPagingAll(resourceGroupName, labName, options) {
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listByLabPagingPage(resourceGroupName, labName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
77
|
-
_c = _f.value;
|
78
|
-
_d = false;
|
79
|
-
const page = _c;
|
80
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
81
|
-
}
|
82
|
-
}
|
83
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
84
|
-
finally {
|
85
|
-
try {
|
86
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
87
|
-
}
|
88
|
-
finally { if (e_1) throw e_1.error; }
|
89
|
-
}
|
90
|
-
});
|
71
|
+
async *listByLabPagingAll(resourceGroupName, labName, options) {
|
72
|
+
for await (const page of this.listByLabPagingPage(resourceGroupName, labName, options)) {
|
73
|
+
yield* page;
|
74
|
+
}
|
91
75
|
}
|
92
76
|
/**
|
93
77
|
* Returns a list of all users for a lab.
|
@@ -126,14 +110,19 @@ class UsersImpl {
|
|
126
110
|
return this.client.sendOperationRequest(args, spec);
|
127
111
|
};
|
128
112
|
const sendOperation = async (args, spec) => {
|
129
|
-
var _a;
|
130
113
|
let currentRawResponse = undefined;
|
131
|
-
const providedCallback =
|
114
|
+
const providedCallback = args.options?.onResponse;
|
132
115
|
const callback = (rawResponse, flatResponse) => {
|
133
116
|
currentRawResponse = rawResponse;
|
134
|
-
providedCallback
|
117
|
+
providedCallback?.(rawResponse, flatResponse);
|
118
|
+
};
|
119
|
+
const updatedArgs = {
|
120
|
+
...args,
|
121
|
+
options: {
|
122
|
+
...args.options,
|
123
|
+
onResponse: callback
|
124
|
+
}
|
135
125
|
};
|
136
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
137
126
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
138
127
|
return {
|
139
128
|
flatResponse,
|
@@ -146,8 +135,8 @@ class UsersImpl {
|
|
146
135
|
};
|
147
136
|
const lro = new lroImpl_js_1.LroImpl(sendOperation, { resourceGroupName, labName, userName, body, options }, createOrUpdateOperationSpec);
|
148
137
|
const poller = new core_lro_1.LroEngine(lro, {
|
149
|
-
resumeFrom: options
|
150
|
-
intervalInMs: options
|
138
|
+
resumeFrom: options?.resumeFrom,
|
139
|
+
intervalInMs: options?.updateIntervalInMs,
|
151
140
|
lroResourceLocationConfig: "original-uri"
|
152
141
|
});
|
153
142
|
await poller.poll();
|
@@ -182,14 +171,19 @@ class UsersImpl {
|
|
182
171
|
return this.client.sendOperationRequest(args, spec);
|
183
172
|
};
|
184
173
|
const sendOperation = async (args, spec) => {
|
185
|
-
var _a;
|
186
174
|
let currentRawResponse = undefined;
|
187
|
-
const providedCallback =
|
175
|
+
const providedCallback = args.options?.onResponse;
|
188
176
|
const callback = (rawResponse, flatResponse) => {
|
189
177
|
currentRawResponse = rawResponse;
|
190
|
-
providedCallback
|
178
|
+
providedCallback?.(rawResponse, flatResponse);
|
179
|
+
};
|
180
|
+
const updatedArgs = {
|
181
|
+
...args,
|
182
|
+
options: {
|
183
|
+
...args.options,
|
184
|
+
onResponse: callback
|
185
|
+
}
|
191
186
|
};
|
192
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
193
187
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
194
188
|
return {
|
195
189
|
flatResponse,
|
@@ -202,8 +196,8 @@ class UsersImpl {
|
|
202
196
|
};
|
203
197
|
const lro = new lroImpl_js_1.LroImpl(sendOperation, { resourceGroupName, labName, userName, body, options }, updateOperationSpec);
|
204
198
|
const poller = new core_lro_1.LroEngine(lro, {
|
205
|
-
resumeFrom: options
|
206
|
-
intervalInMs: options
|
199
|
+
resumeFrom: options?.resumeFrom,
|
200
|
+
intervalInMs: options?.updateIntervalInMs,
|
207
201
|
lroResourceLocationConfig: "location"
|
208
202
|
});
|
209
203
|
await poller.poll();
|
@@ -237,14 +231,19 @@ class UsersImpl {
|
|
237
231
|
return this.client.sendOperationRequest(args, spec);
|
238
232
|
};
|
239
233
|
const sendOperation = async (args, spec) => {
|
240
|
-
var _a;
|
241
234
|
let currentRawResponse = undefined;
|
242
|
-
const providedCallback =
|
235
|
+
const providedCallback = args.options?.onResponse;
|
243
236
|
const callback = (rawResponse, flatResponse) => {
|
244
237
|
currentRawResponse = rawResponse;
|
245
|
-
providedCallback
|
238
|
+
providedCallback?.(rawResponse, flatResponse);
|
239
|
+
};
|
240
|
+
const updatedArgs = {
|
241
|
+
...args,
|
242
|
+
options: {
|
243
|
+
...args.options,
|
244
|
+
onResponse: callback
|
245
|
+
}
|
246
246
|
};
|
247
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
248
247
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
249
248
|
return {
|
250
249
|
flatResponse,
|
@@ -257,8 +256,8 @@ class UsersImpl {
|
|
257
256
|
};
|
258
257
|
const lro = new lroImpl_js_1.LroImpl(sendOperation, { resourceGroupName, labName, userName, options }, deleteOperationSpec);
|
259
258
|
const poller = new core_lro_1.LroEngine(lro, {
|
260
|
-
resumeFrom: options
|
261
|
-
intervalInMs: options
|
259
|
+
resumeFrom: options?.resumeFrom,
|
260
|
+
intervalInMs: options?.updateIntervalInMs,
|
262
261
|
lroResourceLocationConfig: "location"
|
263
262
|
});
|
264
263
|
await poller.poll();
|
@@ -292,14 +291,19 @@ class UsersImpl {
|
|
292
291
|
return this.client.sendOperationRequest(args, spec);
|
293
292
|
};
|
294
293
|
const sendOperation = async (args, spec) => {
|
295
|
-
var _a;
|
296
294
|
let currentRawResponse = undefined;
|
297
|
-
const providedCallback =
|
295
|
+
const providedCallback = args.options?.onResponse;
|
298
296
|
const callback = (rawResponse, flatResponse) => {
|
299
297
|
currentRawResponse = rawResponse;
|
300
|
-
providedCallback
|
298
|
+
providedCallback?.(rawResponse, flatResponse);
|
299
|
+
};
|
300
|
+
const updatedArgs = {
|
301
|
+
...args,
|
302
|
+
options: {
|
303
|
+
...args.options,
|
304
|
+
onResponse: callback
|
305
|
+
}
|
301
306
|
};
|
302
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
303
307
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
304
308
|
return {
|
305
309
|
flatResponse,
|
@@ -312,8 +316,8 @@ class UsersImpl {
|
|
312
316
|
};
|
313
317
|
const lro = new lroImpl_js_1.LroImpl(sendOperation, { resourceGroupName, labName, userName, body, options }, inviteOperationSpec);
|
314
318
|
const poller = new core_lro_1.LroEngine(lro, {
|
315
|
-
resumeFrom: options
|
316
|
-
intervalInMs: options
|
319
|
+
resumeFrom: options?.resumeFrom,
|
320
|
+
intervalInMs: options?.updateIntervalInMs,
|
317
321
|
lroResourceLocationConfig: "location"
|
318
322
|
});
|
319
323
|
await poller.poll();
|