@azure/arm-storageimportexport 2.1.1-alpha.20250620.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.
Files changed (51) hide show
  1. package/dist/browser/operations/bitLockerKeys.js +10 -27
  2. package/dist/browser/operations/bitLockerKeys.js.map +1 -1
  3. package/dist/browser/operations/jobs.js +45 -79
  4. package/dist/browser/operations/jobs.js.map +1 -1
  5. package/dist/browser/operations/locations.js +10 -27
  6. package/dist/browser/operations/locations.js.map +1 -1
  7. package/dist/browser/operations/operations.js +10 -27
  8. package/dist/browser/operations/operations.js.map +1 -1
  9. package/dist/browser/pagingHelper.js +2 -4
  10. package/dist/browser/pagingHelper.js.map +1 -1
  11. package/dist/browser/storageImportExport.js +18 -5
  12. package/dist/browser/storageImportExport.js.map +1 -1
  13. package/dist/commonjs/operations/bitLockerKeys.js +10 -26
  14. package/dist/commonjs/operations/bitLockerKeys.js.map +1 -1
  15. package/dist/commonjs/operations/jobs.js +45 -78
  16. package/dist/commonjs/operations/jobs.js.map +1 -1
  17. package/dist/commonjs/operations/locations.js +10 -26
  18. package/dist/commonjs/operations/locations.js.map +1 -1
  19. package/dist/commonjs/operations/operations.js +10 -26
  20. package/dist/commonjs/operations/operations.js.map +1 -1
  21. package/dist/commonjs/pagingHelper.js +2 -4
  22. package/dist/commonjs/pagingHelper.js.map +1 -1
  23. package/dist/commonjs/storageImportExport.js +18 -5
  24. package/dist/commonjs/storageImportExport.js.map +1 -1
  25. package/dist/commonjs/tsdoc-metadata.json +11 -11
  26. package/dist/esm/operations/bitLockerKeys.js +10 -27
  27. package/dist/esm/operations/bitLockerKeys.js.map +1 -1
  28. package/dist/esm/operations/jobs.js +45 -79
  29. package/dist/esm/operations/jobs.js.map +1 -1
  30. package/dist/esm/operations/locations.js +10 -27
  31. package/dist/esm/operations/locations.js.map +1 -1
  32. package/dist/esm/operations/operations.js +10 -27
  33. package/dist/esm/operations/operations.js.map +1 -1
  34. package/dist/esm/pagingHelper.js +2 -4
  35. package/dist/esm/pagingHelper.js.map +1 -1
  36. package/dist/esm/storageImportExport.js +18 -5
  37. package/dist/esm/storageImportExport.js.map +1 -1
  38. package/dist/react-native/operations/bitLockerKeys.js +10 -27
  39. package/dist/react-native/operations/bitLockerKeys.js.map +1 -1
  40. package/dist/react-native/operations/jobs.js +45 -79
  41. package/dist/react-native/operations/jobs.js.map +1 -1
  42. package/dist/react-native/operations/locations.js +10 -27
  43. package/dist/react-native/operations/locations.js.map +1 -1
  44. package/dist/react-native/operations/operations.js +10 -27
  45. package/dist/react-native/operations/operations.js.map +1 -1
  46. package/dist/react-native/pagingHelper.js +2 -4
  47. package/dist/react-native/pagingHelper.js.map +1 -1
  48. package/dist/react-native/storageImportExport.js +18 -5
  49. package/dist/react-native/storageImportExport.js.map +1 -1
  50. package/package.json +2 -2
  51. /package/review/{arm-storageimportexport.api.md → arm-storageimportexport-node.api.md} +0 -0
@@ -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 === null || settings === void 0 ? void 0 : settings.maxPageSize) {
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
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
48
- let result;
49
- result = yield __await(this._list(jobName, resourceGroupName, options));
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
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
55
- var _a, e_1, _b, _c;
56
- try {
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;;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;IAG5B;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAA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;IAED;;;;;;OAMG;IACK,KAAK,CACX,OAAe,EACf,iBAAyB,EACzB,OAAyC;QAEzC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,EACvC,iBAAiB,CAClB,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,EACF,sIAAsI;IACxI,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wBAAwB;SAC7C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,OAAO;KACnB;IACD,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 { 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"]}
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,KA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AU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,OAAO;KACnB;IACD,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 { 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 === null || settings === void 0 ? void 0 : settings.maxPageSize) {
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
- return __asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
46
- let result;
47
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
48
- if (!continuationToken) {
49
- result = yield __await(this._listBySubscription(options));
50
- let page = result.value || [];
51
- continuationToken = result.nextLink;
52
- setContinuationToken(page, continuationToken);
53
- yield yield __await(page);
54
- }
55
- while (continuationToken) {
56
- result = yield __await(this._listBySubscriptionNext(continuationToken, options));
57
- continuationToken = result.nextLink;
58
- let page = result.value || [];
59
- setContinuationToken(page, continuationToken);
60
- yield yield __await(page);
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
- return __asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
66
- var _a, e_1, _b, _c;
67
- try {
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 === null || settings === void 0 ? void 0 : settings.maxPageSize) {
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
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
109
- let result;
110
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
111
- if (!continuationToken) {
112
- result = yield __await(this._listByResourceGroup(resourceGroupName, options));
113
- let page = result.value || [];
114
- continuationToken = result.nextLink;
115
- setContinuationToken(page, continuationToken);
116
- yield yield __await(page);
117
- }
118
- while (continuationToken) {
119
- result = yield __await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
120
- continuationToken = result.nextLink;
121
- let page = result.value || [];
122
- setContinuationToken(page, continuationToken);
123
- yield yield __await(page);
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
- return __asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
129
- var _a, e_2, _b, _c;
130
- try {
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.
@@ -1 +1 @@
1
- {"version":3,"file":"jobs.js","sourceRoot":"","sources":["../../../src/operations/jobs.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAA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,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,EAAE,UAAU,CAAC,cAAc,CAAC;IAChE,UAAU;CACX,CAAC;AACF,MAAM,oCAAoC,GAA6B;IACrE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gBAAgB;SACrC;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,QAAQ;KACpB;IACD,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 { setContinuationToken } from \"../pagingHelper.js\";\nimport { Jobs } 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 JobResponse,\n JobsListBySubscriptionNextOptionalParams,\n JobsListBySubscriptionOptionalParams,\n JobsListBySubscriptionResponse,\n JobsListByResourceGroupNextOptionalParams,\n JobsListByResourceGroupOptionalParams,\n JobsListByResourceGroupResponse,\n JobsGetOptionalParams,\n JobsGetResponse,\n UpdateJobParameters,\n JobsUpdateOptionalParams,\n JobsUpdateResponse,\n PutJobParameters,\n JobsCreateOptionalParams,\n JobsCreateResponse,\n JobsDeleteOptionalParams,\n JobsListBySubscriptionNextResponse,\n JobsListByResourceGroupNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Jobs operations. */\nexport class JobsImpl implements Jobs {\n private readonly client: StorageImportExport;\n\n /**\n * Initialize a new instance of the class Jobs class.\n * @param client Reference to the service client\n */\n constructor(client: StorageImportExport) {\n this.client = client;\n }\n\n /**\n * Returns all active and completed jobs in a subscription.\n * @param options The options parameters.\n */\n public listBySubscription(\n options?: JobsListBySubscriptionOptionalParams\n ): PagedAsyncIterableIterator<JobResponse> {\n const iter = this.listBySubscriptionPagingAll(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.listBySubscriptionPagingPage(options, settings);\n }\n };\n }\n\n private async *listBySubscriptionPagingPage(\n options?: JobsListBySubscriptionOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<JobResponse[]> {\n let result: JobsListBySubscriptionResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listBySubscription(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._listBySubscriptionNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listBySubscriptionPagingAll(\n options?: JobsListBySubscriptionOptionalParams\n ): AsyncIterableIterator<JobResponse> {\n for await (const page of this.listBySubscriptionPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Returns all active and completed jobs in a resource group.\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 listByResourceGroup(\n resourceGroupName: string,\n options?: JobsListByResourceGroupOptionalParams\n ): PagedAsyncIterableIterator<JobResponse> {\n const iter = this.listByResourceGroupPagingAll(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.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByResourceGroupPagingPage(\n resourceGroupName: string,\n options?: JobsListByResourceGroupOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<JobResponse[]> {\n let result: JobsListByResourceGroupResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByResourceGroup(resourceGroupName, 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._listByResourceGroupNext(\n resourceGroupName,\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 *listByResourceGroupPagingAll(\n resourceGroupName: string,\n options?: JobsListByResourceGroupOptionalParams\n ): AsyncIterableIterator<JobResponse> {\n for await (const page of this.listByResourceGroupPagingPage(\n resourceGroupName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Returns all active and completed jobs in a subscription.\n * @param options The options parameters.\n */\n private _listBySubscription(\n options?: JobsListBySubscriptionOptionalParams\n ): Promise<JobsListBySubscriptionResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionOperationSpec\n );\n }\n\n /**\n * Returns all active and completed jobs in a resource group.\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 _listByResourceGroup(\n resourceGroupName: string,\n options?: JobsListByResourceGroupOptionalParams\n ): Promise<JobsListByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listByResourceGroupOperationSpec\n );\n }\n\n /**\n * Gets information about an existing 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 get(\n jobName: string,\n resourceGroupName: string,\n options?: JobsGetOptionalParams\n ): Promise<JobsGetResponse> {\n return this.client.sendOperationRequest(\n { jobName, resourceGroupName, options },\n getOperationSpec\n );\n }\n\n /**\n * Updates specific properties of a job. You can call this operation to notify the Import/Export\n * service that the hard drives comprising the import or export job have been shipped to the Microsoft\n * data center. It can also be used to cancel an existing 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 body The parameters to update in the job\n * @param options The options parameters.\n */\n update(\n jobName: string,\n resourceGroupName: string,\n body: UpdateJobParameters,\n options?: JobsUpdateOptionalParams\n ): Promise<JobsUpdateResponse> {\n return this.client.sendOperationRequest(\n { jobName, resourceGroupName, body, options },\n updateOperationSpec\n );\n }\n\n /**\n * Creates a new job or updates an existing job in the specified subscription.\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 body The parameters used for creating the job\n * @param options The options parameters.\n */\n create(\n jobName: string,\n resourceGroupName: string,\n body: PutJobParameters,\n options?: JobsCreateOptionalParams\n ): Promise<JobsCreateResponse> {\n return this.client.sendOperationRequest(\n { jobName, resourceGroupName, body, options },\n createOperationSpec\n );\n }\n\n /**\n * Deletes an existing job. Only jobs in the Creating or Completed states can be deleted.\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 delete(\n jobName: string,\n resourceGroupName: string,\n options?: JobsDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { jobName, resourceGroupName, options },\n deleteOperationSpec\n );\n }\n\n /**\n * ListBySubscriptionNext\n * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.\n * @param options The options parameters.\n */\n private _listBySubscriptionNext(\n nextLink: string,\n options?: JobsListBySubscriptionNextOptionalParams\n ): Promise<JobsListBySubscriptionNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listBySubscriptionNextOperationSpec\n );\n }\n\n /**\n * ListByResourceGroupNext\n * @param resourceGroupName The resource group name uniquely identifies the resource group within the\n * user subscription.\n * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.\n * @param options The options parameters.\n */\n private _listByResourceGroupNext(\n resourceGroupName: string,\n nextLink: string,\n options?: JobsListByResourceGroupNextOptionalParams\n ): Promise<JobsListByResourceGroupNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, nextLink, options },\n listByResourceGroupNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listBySubscriptionOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.ImportExport/jobs\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListJobsResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.filter],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept, Parameters.acceptLanguage],\n serializer\n};\nconst listByResourceGroupOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListJobsResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.filter],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName\n ],\n headerParameters: [Parameters.accept, Parameters.acceptLanguage],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.JobResponse\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};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.JobResponse\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.jobName\n ],\n headerParameters: [\n Parameters.accept,\n Parameters.acceptLanguage,\n Parameters.contentType\n ],\n mediaType: \"json\",\n serializer\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.JobResponse\n },\n 201: {\n bodyMapper: Mappers.JobResponse\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.jobName\n ],\n headerParameters: [\n Parameters.accept,\n Parameters.acceptLanguage,\n Parameters.contentType,\n Parameters.clientTenantId\n ],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\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};\nconst listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListJobsResponse\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, Parameters.acceptLanguage],\n serializer\n};\nconst listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListJobsResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept, Parameters.acceptLanguage],\n serializer\n};\n"]}
1
+ {"version":3,"file":"jobs.js","sourceRoot":"","sources":["../../../src/operations/jobs.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAuBtD,4CAA4C;AAC5C,wCAAwC;AACxC,MAAM,OAAO,QAAQ;IACF,MAAM,CAAsB;IAE7C;;;OAGG;IACH,YAAY,MAA2B;QACrC,I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B,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,QAAQ;KACpB;IACD,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 { setContinuationToken } from \"../pagingHelper.js\";\nimport { Jobs } 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 JobResponse,\n JobsListBySubscriptionNextOptionalParams,\n JobsListBySubscriptionOptionalParams,\n JobsListBySubscriptionResponse,\n JobsListByResourceGroupNextOptionalParams,\n JobsListByResourceGroupOptionalParams,\n JobsListByResourceGroupResponse,\n JobsGetOptionalParams,\n JobsGetResponse,\n UpdateJobParameters,\n JobsUpdateOptionalParams,\n JobsUpdateResponse,\n PutJobParameters,\n JobsCreateOptionalParams,\n JobsCreateResponse,\n JobsDeleteOptionalParams,\n JobsListBySubscriptionNextResponse,\n JobsListByResourceGroupNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Jobs operations. */\nexport class JobsImpl implements Jobs {\n private readonly client: StorageImportExport;\n\n /**\n * Initialize a new instance of the class Jobs class.\n * @param client Reference to the service client\n */\n constructor(client: StorageImportExport) {\n this.client = client;\n }\n\n /**\n * Returns all active and completed jobs in a subscription.\n * @param options The options parameters.\n */\n public listBySubscription(\n options?: JobsListBySubscriptionOptionalParams\n ): PagedAsyncIterableIterator<JobResponse> {\n const iter = this.listBySubscriptionPagingAll(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.listBySubscriptionPagingPage(options, settings);\n }\n };\n }\n\n private async *listBySubscriptionPagingPage(\n options?: JobsListBySubscriptionOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<JobResponse[]> {\n let result: JobsListBySubscriptionResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listBySubscription(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._listBySubscriptionNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listBySubscriptionPagingAll(\n options?: JobsListBySubscriptionOptionalParams\n ): AsyncIterableIterator<JobResponse> {\n for await (const page of this.listBySubscriptionPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Returns all active and completed jobs in a resource group.\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 listByResourceGroup(\n resourceGroupName: string,\n options?: JobsListByResourceGroupOptionalParams\n ): PagedAsyncIterableIterator<JobResponse> {\n const iter = this.listByResourceGroupPagingAll(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.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByResourceGroupPagingPage(\n resourceGroupName: string,\n options?: JobsListByResourceGroupOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<JobResponse[]> {\n let result: JobsListByResourceGroupResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByResourceGroup(resourceGroupName, 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._listByResourceGroupNext(\n resourceGroupName,\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 *listByResourceGroupPagingAll(\n resourceGroupName: string,\n options?: JobsListByResourceGroupOptionalParams\n ): AsyncIterableIterator<JobResponse> {\n for await (const page of this.listByResourceGroupPagingPage(\n resourceGroupName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Returns all active and completed jobs in a subscription.\n * @param options The options parameters.\n */\n private _listBySubscription(\n options?: JobsListBySubscriptionOptionalParams\n ): Promise<JobsListBySubscriptionResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionOperationSpec\n );\n }\n\n /**\n * Returns all active and completed jobs in a resource group.\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 _listByResourceGroup(\n resourceGroupName: string,\n options?: JobsListByResourceGroupOptionalParams\n ): Promise<JobsListByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listByResourceGroupOperationSpec\n );\n }\n\n /**\n * Gets information about an existing 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 get(\n jobName: string,\n resourceGroupName: string,\n options?: JobsGetOptionalParams\n ): Promise<JobsGetResponse> {\n return this.client.sendOperationRequest(\n { jobName, resourceGroupName, options },\n getOperationSpec\n );\n }\n\n /**\n * Updates specific properties of a job. You can call this operation to notify the Import/Export\n * service that the hard drives comprising the import or export job have been shipped to the Microsoft\n * data center. It can also be used to cancel an existing 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 body The parameters to update in the job\n * @param options The options parameters.\n */\n update(\n jobName: string,\n resourceGroupName: string,\n body: UpdateJobParameters,\n options?: JobsUpdateOptionalParams\n ): Promise<JobsUpdateResponse> {\n return this.client.sendOperationRequest(\n { jobName, resourceGroupName, body, options },\n updateOperationSpec\n );\n }\n\n /**\n * Creates a new job or updates an existing job in the specified subscription.\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 body The parameters used for creating the job\n * @param options The options parameters.\n */\n create(\n jobName: string,\n resourceGroupName: string,\n body: PutJobParameters,\n options?: JobsCreateOptionalParams\n ): Promise<JobsCreateResponse> {\n return this.client.sendOperationRequest(\n { jobName, resourceGroupName, body, options },\n createOperationSpec\n );\n }\n\n /**\n * Deletes an existing job. Only jobs in the Creating or Completed states can be deleted.\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 delete(\n jobName: string,\n resourceGroupName: string,\n options?: JobsDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { jobName, resourceGroupName, options },\n deleteOperationSpec\n );\n }\n\n /**\n * ListBySubscriptionNext\n * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.\n * @param options The options parameters.\n */\n private _listBySubscriptionNext(\n nextLink: string,\n options?: JobsListBySubscriptionNextOptionalParams\n ): Promise<JobsListBySubscriptionNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listBySubscriptionNextOperationSpec\n );\n }\n\n /**\n * ListByResourceGroupNext\n * @param resourceGroupName The resource group name uniquely identifies the resource group within the\n * user subscription.\n * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.\n * @param options The options parameters.\n */\n private _listByResourceGroupNext(\n resourceGroupName: string,\n nextLink: string,\n options?: JobsListByResourceGroupNextOptionalParams\n ): Promise<JobsListByResourceGroupNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, nextLink, options },\n listByResourceGroupNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listBySubscriptionOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.ImportExport/jobs\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListJobsResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.filter],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept, Parameters.acceptLanguage],\n serializer\n};\nconst listByResourceGroupOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListJobsResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.filter],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName\n ],\n headerParameters: [Parameters.accept, Parameters.acceptLanguage],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.JobResponse\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};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.JobResponse\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.jobName\n ],\n headerParameters: [\n Parameters.accept,\n Parameters.acceptLanguage,\n Parameters.contentType\n ],\n mediaType: \"json\",\n serializer\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.JobResponse\n },\n 201: {\n bodyMapper: Mappers.JobResponse\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.jobName\n ],\n headerParameters: [\n Parameters.accept,\n Parameters.acceptLanguage,\n Parameters.contentType,\n Parameters.clientTenantId\n ],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\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};\nconst listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListJobsResponse\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, Parameters.acceptLanguage],\n serializer\n};\nconst listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListJobsResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.nextLink\n ],\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 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 === null || settings === void 0 ? void 0 : settings.maxPageSize) {
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
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
46
- let result;
47
- result = yield __await(this._list(options));
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
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
53
- var _a, e_1, _b, _c;
54
- try {
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;;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;AAC7C,MAAM,OAAO,aAAa;IAGxB;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,IAAI,CACT,OAAqC;QAErC,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,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAA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,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"]}
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;AAC7C,MAAM,OAAO,aAAa;IACP,MAAM,CAAsB;IAE7C;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,IAAI,CACT,OAAqC;QAErC,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,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAChD,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,cAAc,CAC3B,OAAqC,EACrC,SAAwB;QAExB,IAAI,MAA6B,C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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 === null || settings === void 0 ? void 0 : settings.maxPageSize) {
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
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
45
- let result;
46
- result = yield __await(this._list(options));
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
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
52
- var _a, e_1, _b, _c;
53
- try {
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;;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAQtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAM,OAAO,cAAc;IAGzB;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IAAI,CACT,OAAsC;QAEtC,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,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAChD,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,cAAc,CAC3B,OAAsC,EACtC,SAAwB;;YAExB,IAAI,MAA8B,CAAC;YACnC,MAAM,GAAG,cAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA,CAAC;YACnC,oBAAM,MAAM,CAAC,KAAK,IAAI,EAAE,CAAA,CAAC;QAC3B,CAAC;KAAA;IAEc,aAAa,CAC1B,OAAsC;;;;gBAEtC,KAAyB,eAAA,KAAA,cAAA,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAA,IAAA,+DAAE,CAAC;oBAA/B,cAA4B;oBAA5B,WAA4B;oBAA1C,MAAM,IAAI,KAAA,CAAA;oBACnB,cAAA,KAAK,CAAC,CAAC,iBAAA,cAAA,IAAI,CAAA,CAAA,CAAA,CAAC;gBACd,CAAC;;;;;;;;;QACH,CAAC;KAAA;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"]}
1
+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YACtD,KAAK,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"]}
@@ -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 (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
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 = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
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;;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,0CAAE,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,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,mCAAI,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"]}
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"]}