@azure/arm-storageimportexport 2.1.1-alpha.20250718.1 → 2.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/operations/bitLockerKeys.js +10 -27
- package/dist/browser/operations/bitLockerKeys.js.map +1 -1
- package/dist/browser/operations/jobs.js +45 -79
- package/dist/browser/operations/jobs.js.map +1 -1
- package/dist/browser/operations/locations.js +10 -27
- package/dist/browser/operations/locations.js.map +1 -1
- package/dist/browser/operations/operations.js +10 -27
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/browser/storageImportExport.js +18 -5
- package/dist/browser/storageImportExport.js.map +1 -1
- package/dist/commonjs/operations/bitLockerKeys.js +10 -26
- package/dist/commonjs/operations/bitLockerKeys.js.map +1 -1
- package/dist/commonjs/operations/jobs.js +45 -78
- package/dist/commonjs/operations/jobs.js.map +1 -1
- package/dist/commonjs/operations/locations.js +10 -26
- package/dist/commonjs/operations/locations.js.map +1 -1
- package/dist/commonjs/operations/operations.js +10 -26
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/storageImportExport.js +18 -5
- package/dist/commonjs/storageImportExport.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/operations/bitLockerKeys.js +10 -27
- package/dist/esm/operations/bitLockerKeys.js.map +1 -1
- package/dist/esm/operations/jobs.js +45 -79
- package/dist/esm/operations/jobs.js.map +1 -1
- package/dist/esm/operations/locations.js +10 -27
- package/dist/esm/operations/locations.js.map +1 -1
- package/dist/esm/operations/operations.js +10 -27
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/esm/storageImportExport.js +18 -5
- package/dist/esm/storageImportExport.js.map +1 -1
- package/dist/react-native/operations/bitLockerKeys.js +10 -27
- package/dist/react-native/operations/bitLockerKeys.js.map +1 -1
- package/dist/react-native/operations/jobs.js +45 -79
- package/dist/react-native/operations/jobs.js.map +1 -1
- package/dist/react-native/operations/locations.js +10 -27
- package/dist/react-native/operations/locations.js.map +1 -1
- package/dist/react-native/operations/operations.js +10 -27
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/dist/react-native/storageImportExport.js +18 -5
- package/dist/react-native/storageImportExport.js.map +1 -1
- package/package.json +2 -2
- package/review/arm-storageimportexport-node.api.md +420 -420
|
@@ -5,13 +5,13 @@
|
|
|
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 * as coreClient from "@azure/core-client";
|
|
10
9
|
import * as Mappers from "../models/mappers.js";
|
|
11
10
|
import * as Parameters from "../models/parameters.js";
|
|
12
11
|
/// <reference lib="esnext.asynciterable" />
|
|
13
12
|
/** Class containing Locations operations. */
|
|
14
13
|
export class LocationsImpl {
|
|
14
|
+
client;
|
|
15
15
|
/**
|
|
16
16
|
* Initialize a new instance of the class Locations class.
|
|
17
17
|
* @param client Reference to the service client
|
|
@@ -34,39 +34,22 @@ export class LocationsImpl {
|
|
|
34
34
|
return this;
|
|
35
35
|
},
|
|
36
36
|
byPage: (settings) => {
|
|
37
|
-
if (settings
|
|
37
|
+
if (settings?.maxPageSize) {
|
|
38
38
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
39
39
|
}
|
|
40
40
|
return this.listPagingPage(options, settings);
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
listPagingPage(options, _settings) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
yield yield __await(result.value || []);
|
|
49
|
-
});
|
|
44
|
+
async *listPagingPage(options, _settings) {
|
|
45
|
+
let result;
|
|
46
|
+
result = await this._list(options);
|
|
47
|
+
yield result.value || [];
|
|
50
48
|
}
|
|
51
|
-
listPagingAll(options) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
56
|
-
_c = _f.value;
|
|
57
|
-
_d = false;
|
|
58
|
-
const page = _c;
|
|
59
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
63
|
-
finally {
|
|
64
|
-
try {
|
|
65
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
66
|
-
}
|
|
67
|
-
finally { if (e_1) throw e_1.error; }
|
|
68
|
-
}
|
|
69
|
-
});
|
|
49
|
+
async *listPagingAll(options) {
|
|
50
|
+
for await (const page of this.listPagingPage(options)) {
|
|
51
|
+
yield* page;
|
|
52
|
+
}
|
|
70
53
|
}
|
|
71
54
|
/**
|
|
72
55
|
* Returns a list of locations to which you can ship the disks associated with an import or export job.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locations.js","sourceRoot":"","sources":["../../../src/operations/locations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG
|
|
1
|
+
{"version":3,"file":"locations.js","sourceRoot":"","sources":["../../../src/operations/locations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAUtD,4CAA4C;AAC5C,6CAA6C;AAC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C;QAEpC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,YAAY,EAAE,OAAO,EAAE,EACzB,gBAAgB,CACjB,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,6CAA6C;IACnD,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,iBAAiB;SACtC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,cAAc,CAAC;IAChE,UAAU;CACX,CAAC;AACF,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EAAE,4DAA4D;IAClE,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,QAAQ;SAC7B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,YAAY,CAAC;IAC1D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,cAAc,CAAC;IAChE,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 { Locations } 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 { StorageImportExport } from \"../storageImportExport.js\";\nimport {\n Location,\n LocationsListOptionalParams,\n LocationsListResponse,\n LocationsGetOptionalParams,\n LocationsGetResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Locations operations. */\nexport class LocationsImpl implements Locations {\n private readonly client: StorageImportExport;\n\n /**\n * Initialize a new instance of the class Locations class.\n * @param client Reference to the service client\n */\n constructor(client: StorageImportExport) {\n this.client = client;\n }\n\n /**\n * Returns a list of locations to which you can ship the disks associated with an import or export job.\n * A location is a Microsoft data center region.\n * @param options The options parameters.\n */\n public list(\n options?: LocationsListOptionalParams\n ): PagedAsyncIterableIterator<Location> {\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?: LocationsListOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<Location[]> {\n let result: LocationsListResponse;\n result = await this._list(options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n options?: LocationsListOptionalParams\n ): AsyncIterableIterator<Location> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Returns a list of locations to which you can ship the disks associated with an import or export job.\n * A location is a Microsoft data center region.\n * @param options The options parameters.\n */\n private _list(\n options?: LocationsListOptionalParams\n ): Promise<LocationsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Returns the details about a location to which you can ship the disks associated with an import or\n * export job. A location is an Azure region.\n * @param locationName The name of the location. For example, West US or westus.\n * @param options The options parameters.\n */\n get(\n locationName: string,\n options?: LocationsGetOptionalParams\n ): Promise<LocationsGetResponse> {\n return this.client.sendOperationRequest(\n { locationName, options },\n getOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.ImportExport/locations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LocationsResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept, Parameters.acceptLanguage],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.ImportExport/locations/{locationName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Location\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.locationName],\n headerParameters: [Parameters.accept, Parameters.acceptLanguage],\n serializer\n};\n"]}
|
|
@@ -5,13 +5,13 @@
|
|
|
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 * as coreClient from "@azure/core-client";
|
|
10
9
|
import * as Mappers from "../models/mappers.js";
|
|
11
10
|
import * as Parameters from "../models/parameters.js";
|
|
12
11
|
/// <reference lib="esnext.asynciterable" />
|
|
13
12
|
/** Class containing Operations operations. */
|
|
14
13
|
export class OperationsImpl {
|
|
14
|
+
client;
|
|
15
15
|
/**
|
|
16
16
|
* Initialize a new instance of the class Operations class.
|
|
17
17
|
* @param client Reference to the service client
|
|
@@ -33,39 +33,22 @@ export class OperationsImpl {
|
|
|
33
33
|
return this;
|
|
34
34
|
},
|
|
35
35
|
byPage: (settings) => {
|
|
36
|
-
if (settings
|
|
36
|
+
if (settings?.maxPageSize) {
|
|
37
37
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
38
38
|
}
|
|
39
39
|
return this.listPagingPage(options, settings);
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
listPagingPage(options, _settings) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
yield yield __await(result.value || []);
|
|
48
|
-
});
|
|
43
|
+
async *listPagingPage(options, _settings) {
|
|
44
|
+
let result;
|
|
45
|
+
result = await this._list(options);
|
|
46
|
+
yield result.value || [];
|
|
49
47
|
}
|
|
50
|
-
listPagingAll(options) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
55
|
-
_c = _f.value;
|
|
56
|
-
_d = false;
|
|
57
|
-
const page = _c;
|
|
58
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
62
|
-
finally {
|
|
63
|
-
try {
|
|
64
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
65
|
-
}
|
|
66
|
-
finally { if (e_1) throw e_1.error; }
|
|
67
|
-
}
|
|
68
|
-
});
|
|
48
|
+
async *listPagingAll(options) {
|
|
49
|
+
for await (const page of this.listPagingPage(options)) {
|
|
50
|
+
yield* page;
|
|
51
|
+
}
|
|
69
52
|
}
|
|
70
53
|
/**
|
|
71
54
|
* Returns the list of operations supported by the import/export resource provider.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG
|
|
1
|
+
{"version":3,"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AK,CAAC,CAAC,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED;;;OAGG;IACK,KAAK,CACX,OAAsC;QAEtC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE,iBAAiB,CAAC,CAAC;IAC1E,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,8CAA8C;IACpD,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,sBAAsB;SAC3C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,cAAc,CAAC;IAChE,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 { Operations } 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 { StorageImportExport } from \"../storageImportExport.js\";\nimport {\n Operation,\n OperationsListOptionalParams,\n OperationsListResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Operations operations. */\nexport class OperationsImpl implements Operations {\n private readonly client: StorageImportExport;\n\n /**\n * Initialize a new instance of the class Operations class.\n * @param client Reference to the service client\n */\n constructor(client: StorageImportExport) {\n this.client = client;\n }\n\n /**\n * Returns the list of operations supported by the import/export resource provider.\n * @param options The options parameters.\n */\n public list(\n options?: OperationsListOptionalParams\n ): PagedAsyncIterableIterator<Operation> {\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?: OperationsListOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<Operation[]> {\n let result: OperationsListResponse;\n result = await this._list(options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n options?: OperationsListOptionalParams\n ): AsyncIterableIterator<Operation> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Returns the list of operations supported by the import/export resource provider.\n * @param options The options parameters.\n */\n private _list(\n options?: OperationsListOptionalParams\n ): Promise<OperationsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.ImportExport/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListOperationsResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept, Parameters.acceptLanguage],\n serializer\n};\n"]}
|
package/dist/esm/pagingHelper.js
CHANGED
|
@@ -14,18 +14,16 @@ const pageMap = new WeakMap();
|
|
|
14
14
|
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
15
15
|
*/
|
|
16
16
|
export function getContinuationToken(page) {
|
|
17
|
-
var _a;
|
|
18
17
|
if (typeof page !== "object" || page === null) {
|
|
19
18
|
return undefined;
|
|
20
19
|
}
|
|
21
|
-
return
|
|
20
|
+
return pageMap.get(page)?.continuationToken;
|
|
22
21
|
}
|
|
23
22
|
export function setContinuationToken(page, continuationToken) {
|
|
24
|
-
var _a;
|
|
25
23
|
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
26
24
|
return;
|
|
27
25
|
}
|
|
28
|
-
const pageInfo =
|
|
26
|
+
const pageInfo = pageMap.get(page) ?? {};
|
|
29
27
|
pageInfo.continuationToken = continuationToken;
|
|
30
28
|
pageMap.set(page, pageInfo);
|
|
31
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa
|
|
1
|
+
{"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,IAAa,EACb,iBAAqC;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpE,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,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\nexport interface PageInfo {\n continuationToken?: string;\n}\n\nconst pageMap = new WeakMap<object, PageInfo>();\n\n/**\n * Given the last `.value` produced by the `byPage` iterator,\n * returns a continuation token that can be used to begin paging from\n * that point later.\n * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.\n * @returns The continuation token that can be passed into byPage() during future calls.\n */\nexport function getContinuationToken(page: unknown): string | undefined {\n if (typeof page !== \"object\" || page === null) {\n return undefined;\n }\n return pageMap.get(page)?.continuationToken;\n}\n\nexport function setContinuationToken(\n page: unknown,\n continuationToken: string | undefined\n): void {\n if (typeof page !== \"object\" || page === null || !continuationToken) {\n return;\n }\n const pageInfo = pageMap.get(page) ?? {};\n pageInfo.continuationToken = continuationToken;\n pageMap.set(page, pageInfo);\n}\n"]}
|
|
@@ -9,6 +9,10 @@ import * as coreClient from "@azure/core-client";
|
|
|
9
9
|
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
|
10
10
|
import { LocationsImpl, JobsImpl, BitLockerKeysImpl, OperationsImpl } from "./operations/index.js";
|
|
11
11
|
export class StorageImportExport extends coreClient.ServiceClient {
|
|
12
|
+
$host;
|
|
13
|
+
apiVersion;
|
|
14
|
+
acceptLanguage;
|
|
15
|
+
subscriptionId;
|
|
12
16
|
/**
|
|
13
17
|
* Initializes a new instance of the StorageImportExport class.
|
|
14
18
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
@@ -16,7 +20,6 @@ export class StorageImportExport extends coreClient.ServiceClient {
|
|
|
16
20
|
* @param options The parameter options
|
|
17
21
|
*/
|
|
18
22
|
constructor(credentials, subscriptionId, options) {
|
|
19
|
-
var _a, _b, _c;
|
|
20
23
|
if (credentials === undefined) {
|
|
21
24
|
throw new Error("'credentials' cannot be null");
|
|
22
25
|
}
|
|
@@ -35,12 +38,17 @@ export class StorageImportExport extends coreClient.ServiceClient {
|
|
|
35
38
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
36
39
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
37
40
|
: `${packageDetails}`;
|
|
38
|
-
const optionsWithDefaults =
|
|
41
|
+
const optionsWithDefaults = {
|
|
42
|
+
...defaults,
|
|
43
|
+
...options,
|
|
44
|
+
userAgentOptions: {
|
|
39
45
|
userAgentPrefix
|
|
40
|
-
},
|
|
46
|
+
},
|
|
47
|
+
endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
|
48
|
+
};
|
|
41
49
|
super(optionsWithDefaults);
|
|
42
50
|
let bearerTokenAuthenticationPolicyFound = false;
|
|
43
|
-
if (
|
|
51
|
+
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
44
52
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
45
53
|
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
46
54
|
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
@@ -54,7 +62,8 @@ export class StorageImportExport extends coreClient.ServiceClient {
|
|
|
54
62
|
});
|
|
55
63
|
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
56
64
|
credential: credentials,
|
|
57
|
-
scopes:
|
|
65
|
+
scopes: optionsWithDefaults.credentialScopes ??
|
|
66
|
+
`${optionsWithDefaults.endpoint}/.default`,
|
|
58
67
|
challengeCallbacks: {
|
|
59
68
|
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
|
|
60
69
|
}
|
|
@@ -96,5 +105,9 @@ export class StorageImportExport extends coreClient.ServiceClient {
|
|
|
96
105
|
};
|
|
97
106
|
this.pipeline.addPolicy(apiVersionPolicy);
|
|
98
107
|
}
|
|
108
|
+
locations;
|
|
109
|
+
jobs;
|
|
110
|
+
bitLockerKeys;
|
|
111
|
+
operations;
|
|
99
112
|
}
|
|
100
113
|
//# sourceMappingURL=storageImportExport.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storageImportExport.js","sourceRoot":"","sources":["../../src/storageImportExport.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,aAAa,EACb,QAAQ,EACR,iBAAiB,EACjB,cAAc,EACf,MAAM,uBAAuB,CAAC;AAS/B,MAAM,OAAO,mBAAoB,SAAQ,UAAU,CAAC,aAAa;
|
|
1
|
+
{"version":3,"file":"storageImportExport.js","sourceRoot":"","sources":["../../src/storageImportExport.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,aAAa,EACb,QAAQ,EACR,iBAAiB,EACjB,cAAc,EACf,MAAM,uBAAuB,CAAC;AAS/B,MAAM,OAAO,mBAAoB,SAAQ,UAAU,CAAC,aAAa;IAC/D,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAU;IACxB,cAAc,CAAS;IAEvB;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAA2C;QAE3C,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;Q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B,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;IAED,SAAS,CAAY;IACrB,IAAI,CAAO;IACX,aAAa,CAAgB;IAC7B,UAAU,CAAa;CACxB","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 * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n LocationsImpl,\n JobsImpl,\n BitLockerKeysImpl,\n OperationsImpl\n} from \"./operations/index.js\";\nimport {\n Locations,\n Jobs,\n BitLockerKeys,\n Operations\n} from \"./operationsInterfaces/index.js\";\nimport { StorageImportExportOptionalParams } from \"./models/index.js\";\n\nexport class StorageImportExport extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n acceptLanguage?: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the StorageImportExport class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The subscription ID for the Azure user.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: StorageImportExportOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: StorageImportExportOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-storageimportexport/2.1.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2021-01-01\";\n this.locations = new LocationsImpl(this);\n this.jobs = new JobsImpl(this);\n this.bitLockerKeys = new BitLockerKeysImpl(this);\n this.operations = new OperationsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n locations: Locations;\n jobs: Jobs;\n bitLockerKeys: BitLockerKeys;\n operations: Operations;\n}\n"]}
|
|
@@ -5,13 +5,13 @@
|
|
|
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 * as coreClient from "@azure/core-client";
|
|
10
9
|
import * as Mappers from "../models/mappers.js";
|
|
11
10
|
import * as Parameters from "../models/parameters.js";
|
|
12
11
|
/// <reference lib="esnext.asynciterable" />
|
|
13
12
|
/** Class containing BitLockerKeys operations. */
|
|
14
13
|
export class BitLockerKeysImpl {
|
|
14
|
+
client;
|
|
15
15
|
/**
|
|
16
16
|
* Initialize a new instance of the class BitLockerKeys class.
|
|
17
17
|
* @param client Reference to the service client
|
|
@@ -36,39 +36,22 @@ export class BitLockerKeysImpl {
|
|
|
36
36
|
return this;
|
|
37
37
|
},
|
|
38
38
|
byPage: (settings) => {
|
|
39
|
-
if (settings
|
|
39
|
+
if (settings?.maxPageSize) {
|
|
40
40
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
41
41
|
}
|
|
42
42
|
return this.listPagingPage(jobName, resourceGroupName, options, settings);
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
listPagingPage(jobName, resourceGroupName, options, _settings) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
yield yield __await(result.value || []);
|
|
51
|
-
});
|
|
46
|
+
async *listPagingPage(jobName, resourceGroupName, options, _settings) {
|
|
47
|
+
let result;
|
|
48
|
+
result = await this._list(jobName, resourceGroupName, options);
|
|
49
|
+
yield result.value || [];
|
|
52
50
|
}
|
|
53
|
-
listPagingAll(jobName, resourceGroupName, options) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
for (var _d = true, _e = __asyncValues(this.listPagingPage(jobName, resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
58
|
-
_c = _f.value;
|
|
59
|
-
_d = false;
|
|
60
|
-
const page = _c;
|
|
61
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
65
|
-
finally {
|
|
66
|
-
try {
|
|
67
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
68
|
-
}
|
|
69
|
-
finally { if (e_1) throw e_1.error; }
|
|
70
|
-
}
|
|
71
|
-
});
|
|
51
|
+
async *listPagingAll(jobName, resourceGroupName, options) {
|
|
52
|
+
for await (const page of this.listPagingPage(jobName, resourceGroupName, options)) {
|
|
53
|
+
yield* page;
|
|
54
|
+
}
|
|
72
55
|
}
|
|
73
56
|
/**
|
|
74
57
|
* Returns the BitLocker Keys for all drives in the specified job.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bitLockerKeys.js","sourceRoot":"","sources":["../../../src/operations/bitLockerKeys.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG
|
|
1
|
+
{"version":3,"file":"bitLockerKeys.js","sourceRoot":"","sources":["../../../src/operations/bitLockerKeys.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAQtD,4CAA4C;AAC5C,iDAAiD;AACjD,MAAM,OAAO,iBAAiB;IACX,MAAM,CAAsB;IAE7C;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACI,IAAI,CACT,OAAe,EACf,iBAAyB,EACzB,OAAyC;QAEzC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,iBAAiB,EAAE,OAAO,CAAC,CAAC;QACrE,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,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CACxB,OAAO,EACP,iBAAiB,EACjB,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,cAAc,CAC3B,OAAe,EACf,iB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AChE,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 { BitLockerKeys } 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 { StorageImportExport } from \"../storageImportExport.js\";\nimport {\n DriveBitLockerKey,\n BitLockerKeysListOptionalParams,\n BitLockerKeysListResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing BitLockerKeys operations. */\nexport class BitLockerKeysImpl implements BitLockerKeys {\n private readonly client: StorageImportExport;\n\n /**\n * Initialize a new instance of the class BitLockerKeys class.\n * @param client Reference to the service client\n */\n constructor(client: StorageImportExport) {\n this.client = client;\n }\n\n /**\n * Returns the BitLocker Keys for all drives in the specified job.\n * @param jobName The name of the import/export job.\n * @param resourceGroupName The resource group name uniquely identifies the resource group within the\n * user subscription.\n * @param options The options parameters.\n */\n public list(\n jobName: string,\n resourceGroupName: string,\n options?: BitLockerKeysListOptionalParams\n ): PagedAsyncIterableIterator<DriveBitLockerKey> {\n const iter = this.listPagingAll(jobName, resourceGroupName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(\n jobName,\n resourceGroupName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listPagingPage(\n jobName: string,\n resourceGroupName: string,\n options?: BitLockerKeysListOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<DriveBitLockerKey[]> {\n let result: BitLockerKeysListResponse;\n result = await this._list(jobName, resourceGroupName, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n jobName: string,\n resourceGroupName: string,\n options?: BitLockerKeysListOptionalParams\n ): AsyncIterableIterator<DriveBitLockerKey> {\n for await (const page of this.listPagingPage(\n jobName,\n resourceGroupName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Returns the BitLocker Keys for all drives in the specified job.\n * @param jobName The name of the import/export job.\n * @param resourceGroupName The resource group name uniquely identifies the resource group within the\n * user subscription.\n * @param options The options parameters.\n */\n private _list(\n jobName: string,\n resourceGroupName: string,\n options?: BitLockerKeysListOptionalParams\n ): Promise<BitLockerKeysListResponse> {\n return this.client.sendOperationRequest(\n { jobName, resourceGroupName, options },\n listOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}/listBitLockerKeys\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.GetBitLockerKeysResponse\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.jobName\n ],\n headerParameters: [Parameters.accept, Parameters.acceptLanguage],\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";
|
|
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
|
|
|
13
12
|
/// <reference lib="esnext.asynciterable" />
|
|
14
13
|
/** Class containing Jobs operations. */
|
|
15
14
|
export class JobsImpl {
|
|
15
|
+
client;
|
|
16
16
|
/**
|
|
17
17
|
* Initialize a new instance of the class Jobs class.
|
|
18
18
|
* @param client Reference to the service client
|
|
@@ -34,52 +34,35 @@ export class JobsImpl {
|
|
|
34
34
|
return this;
|
|
35
35
|
},
|
|
36
36
|
byPage: (settings) => {
|
|
37
|
-
if (settings
|
|
37
|
+
if (settings?.maxPageSize) {
|
|
38
38
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
39
39
|
}
|
|
40
40
|
return this.listBySubscriptionPagingPage(options, settings);
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
listBySubscriptionPagingPage(options, settings) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
});
|
|
44
|
+
async *listBySubscriptionPagingPage(options, settings) {
|
|
45
|
+
let result;
|
|
46
|
+
let continuationToken = settings?.continuationToken;
|
|
47
|
+
if (!continuationToken) {
|
|
48
|
+
result = await this._listBySubscription(options);
|
|
49
|
+
let page = result.value || [];
|
|
50
|
+
continuationToken = result.nextLink;
|
|
51
|
+
setContinuationToken(page, continuationToken);
|
|
52
|
+
yield page;
|
|
53
|
+
}
|
|
54
|
+
while (continuationToken) {
|
|
55
|
+
result = await this._listBySubscriptionNext(continuationToken, options);
|
|
56
|
+
continuationToken = result.nextLink;
|
|
57
|
+
let page = result.value || [];
|
|
58
|
+
setContinuationToken(page, continuationToken);
|
|
59
|
+
yield page;
|
|
60
|
+
}
|
|
63
61
|
}
|
|
64
|
-
listBySubscriptionPagingAll(options) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
for (var _d = true, _e = __asyncValues(this.listBySubscriptionPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
69
|
-
_c = _f.value;
|
|
70
|
-
_d = false;
|
|
71
|
-
const page = _c;
|
|
72
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
76
|
-
finally {
|
|
77
|
-
try {
|
|
78
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
79
|
-
}
|
|
80
|
-
finally { if (e_1) throw e_1.error; }
|
|
81
|
-
}
|
|
82
|
-
});
|
|
62
|
+
async *listBySubscriptionPagingAll(options) {
|
|
63
|
+
for await (const page of this.listBySubscriptionPagingPage(options)) {
|
|
64
|
+
yield* page;
|
|
65
|
+
}
|
|
83
66
|
}
|
|
84
67
|
/**
|
|
85
68
|
* Returns all active and completed jobs in a resource group.
|
|
@@ -97,52 +80,35 @@ export class JobsImpl {
|
|
|
97
80
|
return this;
|
|
98
81
|
},
|
|
99
82
|
byPage: (settings) => {
|
|
100
|
-
if (settings
|
|
83
|
+
if (settings?.maxPageSize) {
|
|
101
84
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
102
85
|
}
|
|
103
86
|
return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
|
|
104
87
|
}
|
|
105
88
|
};
|
|
106
89
|
}
|
|
107
|
-
listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
});
|
|
90
|
+
async *listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
91
|
+
let result;
|
|
92
|
+
let continuationToken = settings?.continuationToken;
|
|
93
|
+
if (!continuationToken) {
|
|
94
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
95
|
+
let page = result.value || [];
|
|
96
|
+
continuationToken = result.nextLink;
|
|
97
|
+
setContinuationToken(page, continuationToken);
|
|
98
|
+
yield page;
|
|
99
|
+
}
|
|
100
|
+
while (continuationToken) {
|
|
101
|
+
result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options);
|
|
102
|
+
continuationToken = result.nextLink;
|
|
103
|
+
let page = result.value || [];
|
|
104
|
+
setContinuationToken(page, continuationToken);
|
|
105
|
+
yield page;
|
|
106
|
+
}
|
|
126
107
|
}
|
|
127
|
-
listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
for (var _d = true, _e = __asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
132
|
-
_c = _f.value;
|
|
133
|
-
_d = false;
|
|
134
|
-
const page = _c;
|
|
135
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
139
|
-
finally {
|
|
140
|
-
try {
|
|
141
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
142
|
-
}
|
|
143
|
-
finally { if (e_2) throw e_2.error; }
|
|
144
|
-
}
|
|
145
|
-
});
|
|
108
|
+
async *listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
109
|
+
for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
|
|
110
|
+
yield* page;
|
|
111
|
+
}
|
|
146
112
|
}
|
|
147
113
|
/**
|
|
148
114
|
* Returns all active and completed jobs in a subscription.
|