@azure/arm-batch 10.0.1-alpha.20250718.1 → 10.0.1-alpha.20250730.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/dist/browser/batchManagementClient.js +23 -5
  2. package/dist/browser/batchManagementClient.js.map +1 -1
  3. package/dist/browser/lroImpl.js +7 -3
  4. package/dist/browser/lroImpl.js.map +1 -1
  5. package/dist/browser/models/mappers.js +218 -102
  6. package/dist/browser/models/mappers.js.map +1 -1
  7. package/dist/browser/operations/applicationOperations.js +23 -40
  8. package/dist/browser/operations/applicationOperations.js.map +1 -1
  9. package/dist/browser/operations/applicationPackageOperations.js +23 -40
  10. package/dist/browser/operations/applicationPackageOperations.js.map +1 -1
  11. package/dist/browser/operations/batchAccountOperations.js +111 -169
  12. package/dist/browser/operations/batchAccountOperations.js.map +1 -1
  13. package/dist/browser/operations/certificateOperations.js +34 -46
  14. package/dist/browser/operations/certificateOperations.js.map +1 -1
  15. package/dist/browser/operations/location.js +23 -40
  16. package/dist/browser/operations/location.js.map +1 -1
  17. package/dist/browser/operations/networkSecurityPerimeterOperations.js +34 -46
  18. package/dist/browser/operations/networkSecurityPerimeterOperations.js.map +1 -1
  19. package/dist/browser/operations/operations.js +23 -40
  20. package/dist/browser/operations/operations.js.map +1 -1
  21. package/dist/browser/operations/poolOperations.js +34 -46
  22. package/dist/browser/operations/poolOperations.js.map +1 -1
  23. package/dist/browser/operations/privateEndpointConnectionOperations.js +45 -52
  24. package/dist/browser/operations/privateEndpointConnectionOperations.js.map +1 -1
  25. package/dist/browser/operations/privateLinkResourceOperations.js +23 -40
  26. package/dist/browser/operations/privateLinkResourceOperations.js.map +1 -1
  27. package/dist/browser/pagingHelper.js +2 -4
  28. package/dist/browser/pagingHelper.js.map +1 -1
  29. package/dist/commonjs/batchManagementClient.js +23 -5
  30. package/dist/commonjs/batchManagementClient.js.map +1 -1
  31. package/dist/commonjs/lroImpl.js +7 -3
  32. package/dist/commonjs/lroImpl.js.map +1 -1
  33. package/dist/commonjs/models/mappers.js +218 -102
  34. package/dist/commonjs/models/mappers.js.map +1 -1
  35. package/dist/commonjs/operations/applicationOperations.js +23 -39
  36. package/dist/commonjs/operations/applicationOperations.js.map +1 -1
  37. package/dist/commonjs/operations/applicationPackageOperations.js +23 -39
  38. package/dist/commonjs/operations/applicationPackageOperations.js.map +1 -1
  39. package/dist/commonjs/operations/batchAccountOperations.js +111 -168
  40. package/dist/commonjs/operations/batchAccountOperations.js.map +1 -1
  41. package/dist/commonjs/operations/certificateOperations.js +34 -45
  42. package/dist/commonjs/operations/certificateOperations.js.map +1 -1
  43. package/dist/commonjs/operations/location.js +23 -39
  44. package/dist/commonjs/operations/location.js.map +1 -1
  45. package/dist/commonjs/operations/networkSecurityPerimeterOperations.js +34 -45
  46. package/dist/commonjs/operations/networkSecurityPerimeterOperations.js.map +1 -1
  47. package/dist/commonjs/operations/operations.js +23 -39
  48. package/dist/commonjs/operations/operations.js.map +1 -1
  49. package/dist/commonjs/operations/poolOperations.js +34 -45
  50. package/dist/commonjs/operations/poolOperations.js.map +1 -1
  51. package/dist/commonjs/operations/privateEndpointConnectionOperations.js +45 -51
  52. package/dist/commonjs/operations/privateEndpointConnectionOperations.js.map +1 -1
  53. package/dist/commonjs/operations/privateLinkResourceOperations.js +23 -39
  54. package/dist/commonjs/operations/privateLinkResourceOperations.js.map +1 -1
  55. package/dist/commonjs/pagingHelper.js +2 -4
  56. package/dist/commonjs/pagingHelper.js.map +1 -1
  57. package/dist/commonjs/tsdoc-metadata.json +1 -1
  58. package/dist/esm/batchManagementClient.js +23 -5
  59. package/dist/esm/batchManagementClient.js.map +1 -1
  60. package/dist/esm/lroImpl.js +7 -3
  61. package/dist/esm/lroImpl.js.map +1 -1
  62. package/dist/esm/models/mappers.js +218 -102
  63. package/dist/esm/models/mappers.js.map +1 -1
  64. package/dist/esm/operations/applicationOperations.js +23 -40
  65. package/dist/esm/operations/applicationOperations.js.map +1 -1
  66. package/dist/esm/operations/applicationPackageOperations.js +23 -40
  67. package/dist/esm/operations/applicationPackageOperations.js.map +1 -1
  68. package/dist/esm/operations/batchAccountOperations.js +111 -169
  69. package/dist/esm/operations/batchAccountOperations.js.map +1 -1
  70. package/dist/esm/operations/certificateOperations.js +34 -46
  71. package/dist/esm/operations/certificateOperations.js.map +1 -1
  72. package/dist/esm/operations/location.js +23 -40
  73. package/dist/esm/operations/location.js.map +1 -1
  74. package/dist/esm/operations/networkSecurityPerimeterOperations.js +34 -46
  75. package/dist/esm/operations/networkSecurityPerimeterOperations.js.map +1 -1
  76. package/dist/esm/operations/operations.js +23 -40
  77. package/dist/esm/operations/operations.js.map +1 -1
  78. package/dist/esm/operations/poolOperations.js +34 -46
  79. package/dist/esm/operations/poolOperations.js.map +1 -1
  80. package/dist/esm/operations/privateEndpointConnectionOperations.js +45 -52
  81. package/dist/esm/operations/privateEndpointConnectionOperations.js.map +1 -1
  82. package/dist/esm/operations/privateLinkResourceOperations.js +23 -40
  83. package/dist/esm/operations/privateLinkResourceOperations.js.map +1 -1
  84. package/dist/esm/pagingHelper.js +2 -4
  85. package/dist/esm/pagingHelper.js.map +1 -1
  86. package/dist/react-native/batchManagementClient.js +23 -5
  87. package/dist/react-native/batchManagementClient.js.map +1 -1
  88. package/dist/react-native/lroImpl.js +7 -3
  89. package/dist/react-native/lroImpl.js.map +1 -1
  90. package/dist/react-native/models/mappers.js +218 -102
  91. package/dist/react-native/models/mappers.js.map +1 -1
  92. package/dist/react-native/operations/applicationOperations.js +23 -40
  93. package/dist/react-native/operations/applicationOperations.js.map +1 -1
  94. package/dist/react-native/operations/applicationPackageOperations.js +23 -40
  95. package/dist/react-native/operations/applicationPackageOperations.js.map +1 -1
  96. package/dist/react-native/operations/batchAccountOperations.js +111 -169
  97. package/dist/react-native/operations/batchAccountOperations.js.map +1 -1
  98. package/dist/react-native/operations/certificateOperations.js +34 -46
  99. package/dist/react-native/operations/certificateOperations.js.map +1 -1
  100. package/dist/react-native/operations/location.js +23 -40
  101. package/dist/react-native/operations/location.js.map +1 -1
  102. package/dist/react-native/operations/networkSecurityPerimeterOperations.js +34 -46
  103. package/dist/react-native/operations/networkSecurityPerimeterOperations.js.map +1 -1
  104. package/dist/react-native/operations/operations.js +23 -40
  105. package/dist/react-native/operations/operations.js.map +1 -1
  106. package/dist/react-native/operations/poolOperations.js +34 -46
  107. package/dist/react-native/operations/poolOperations.js.map +1 -1
  108. package/dist/react-native/operations/privateEndpointConnectionOperations.js +45 -52
  109. package/dist/react-native/operations/privateEndpointConnectionOperations.js.map +1 -1
  110. package/dist/react-native/operations/privateLinkResourceOperations.js +23 -40
  111. package/dist/react-native/operations/privateLinkResourceOperations.js.map +1 -1
  112. package/dist/react-native/pagingHelper.js +2 -4
  113. package/dist/react-native/pagingHelper.js.map +1 -1
  114. package/package.json +2 -2
@@ -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 Location operations. */
15
14
  export class LocationImpl {
15
+ client;
16
16
  /**
17
17
  * Initialize a new instance of the class Location class.
18
18
  * @param client Reference to the service client
@@ -35,52 +35,35 @@ export class LocationImpl {
35
35
  return this;
36
36
  },
37
37
  byPage: (settings) => {
38
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
38
+ if (settings?.maxPageSize) {
39
39
  throw new Error("maxPageSize is not supported by this operation.");
40
40
  }
41
41
  return this.listSupportedVirtualMachineSkusPagingPage(locationName, options, settings);
42
42
  },
43
43
  };
44
44
  }
45
- listSupportedVirtualMachineSkusPagingPage(locationName, options, settings) {
46
- return __asyncGenerator(this, arguments, function* listSupportedVirtualMachineSkusPagingPage_1() {
47
- let result;
48
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
49
- if (!continuationToken) {
50
- result = yield __await(this._listSupportedVirtualMachineSkus(locationName, options));
51
- let page = result.value || [];
52
- continuationToken = result.nextLink;
53
- setContinuationToken(page, continuationToken);
54
- yield yield __await(page);
55
- }
56
- while (continuationToken) {
57
- result = yield __await(this._listSupportedVirtualMachineSkusNext(locationName, continuationToken, options));
58
- continuationToken = result.nextLink;
59
- let page = result.value || [];
60
- setContinuationToken(page, continuationToken);
61
- yield yield __await(page);
62
- }
63
- });
45
+ async *listSupportedVirtualMachineSkusPagingPage(locationName, options, settings) {
46
+ let result;
47
+ let continuationToken = settings?.continuationToken;
48
+ if (!continuationToken) {
49
+ result = await this._listSupportedVirtualMachineSkus(locationName, options);
50
+ let page = result.value || [];
51
+ continuationToken = result.nextLink;
52
+ setContinuationToken(page, continuationToken);
53
+ yield page;
54
+ }
55
+ while (continuationToken) {
56
+ result = await this._listSupportedVirtualMachineSkusNext(locationName, continuationToken, options);
57
+ continuationToken = result.nextLink;
58
+ let page = result.value || [];
59
+ setContinuationToken(page, continuationToken);
60
+ yield page;
61
+ }
64
62
  }
65
- listSupportedVirtualMachineSkusPagingAll(locationName, options) {
66
- return __asyncGenerator(this, arguments, function* listSupportedVirtualMachineSkusPagingAll_1() {
67
- var _a, e_1, _b, _c;
68
- try {
69
- for (var _d = true, _e = __asyncValues(this.listSupportedVirtualMachineSkusPagingPage(locationName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
70
- _c = _f.value;
71
- _d = false;
72
- const page = _c;
73
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
74
- }
75
- }
76
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
77
- finally {
78
- try {
79
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
80
- }
81
- finally { if (e_1) throw e_1.error; }
82
- }
83
- });
63
+ async *listSupportedVirtualMachineSkusPagingAll(locationName, options) {
64
+ for await (const page of this.listSupportedVirtualMachineSkusPagingPage(locationName, options)) {
65
+ yield* page;
66
+ }
84
67
  }
85
68
  /**
86
69
  * Gets the Batch service quotas for the specified subscription at the given location.
@@ -1 +1 @@
1
- {"version":3,"file":"location.js","sourceRoot":"","sources":["../../../src/operations/location.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAetD,4CAA4C;AAC5C,4CAA4C;AAC5C,MAAM,OAAO,YAAY;IAGvB;;;OAGG;IACH,YAAY,MAA6B;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,+BAA+B,CACpC,YAAoB,EACpB,OAA+D;QAE/D,MAAM,IAAI,GAAG,IAAI,CAAC,wCAAwC,CACxD,YAAY,EACZ,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,yCAAyC,CACnD,YAAY,EACZ,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,yCAAyC,CACtD,YAAoB,EACpB,OAA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K;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,YAAY;KACxB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { Location } 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 { BatchManagementClient } from \"../batchManagementClient.js\";\nimport {\n SupportedSku,\n LocationListSupportedVirtualMachineSkusNextOptionalParams,\n LocationListSupportedVirtualMachineSkusOptionalParams,\n LocationListSupportedVirtualMachineSkusResponse,\n LocationGetQuotasOptionalParams,\n LocationGetQuotasResponse,\n CheckNameAvailabilityParameters,\n LocationCheckNameAvailabilityOptionalParams,\n LocationCheckNameAvailabilityResponse,\n LocationListSupportedVirtualMachineSkusNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Location operations. */\nexport class LocationImpl implements Location {\n private readonly client: BatchManagementClient;\n\n /**\n * Initialize a new instance of the class Location class.\n * @param client Reference to the service client\n */\n constructor(client: BatchManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets the list of Batch supported Virtual Machine VM sizes available at the given location.\n * @param locationName The region for which to retrieve Batch service supported SKUs.\n * @param options The options parameters.\n */\n public listSupportedVirtualMachineSkus(\n locationName: string,\n options?: LocationListSupportedVirtualMachineSkusOptionalParams,\n ): PagedAsyncIterableIterator<SupportedSku> {\n const iter = this.listSupportedVirtualMachineSkusPagingAll(\n locationName,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listSupportedVirtualMachineSkusPagingPage(\n locationName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listSupportedVirtualMachineSkusPagingPage(\n locationName: string,\n options?: LocationListSupportedVirtualMachineSkusOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<SupportedSku[]> {\n let result: LocationListSupportedVirtualMachineSkusResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listSupportedVirtualMachineSkus(\n locationName,\n options,\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listSupportedVirtualMachineSkusNext(\n locationName,\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 *listSupportedVirtualMachineSkusPagingAll(\n locationName: string,\n options?: LocationListSupportedVirtualMachineSkusOptionalParams,\n ): AsyncIterableIterator<SupportedSku> {\n for await (const page of this.listSupportedVirtualMachineSkusPagingPage(\n locationName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets the Batch service quotas for the specified subscription at the given location.\n * @param locationName The region for which to retrieve Batch service quotas.\n * @param options The options parameters.\n */\n getQuotas(\n locationName: string,\n options?: LocationGetQuotasOptionalParams,\n ): Promise<LocationGetQuotasResponse> {\n return this.client.sendOperationRequest(\n { locationName, options },\n getQuotasOperationSpec,\n );\n }\n\n /**\n * Gets the list of Batch supported Virtual Machine VM sizes available at the given location.\n * @param locationName The region for which to retrieve Batch service supported SKUs.\n * @param options The options parameters.\n */\n private _listSupportedVirtualMachineSkus(\n locationName: string,\n options?: LocationListSupportedVirtualMachineSkusOptionalParams,\n ): Promise<LocationListSupportedVirtualMachineSkusResponse> {\n return this.client.sendOperationRequest(\n { locationName, options },\n listSupportedVirtualMachineSkusOperationSpec,\n );\n }\n\n /**\n * Checks whether the Batch account name is available in the specified region.\n * @param locationName The desired region for the name check.\n * @param parameters Properties needed to check the availability of a name.\n * @param options The options parameters.\n */\n checkNameAvailability(\n locationName: string,\n parameters: CheckNameAvailabilityParameters,\n options?: LocationCheckNameAvailabilityOptionalParams,\n ): Promise<LocationCheckNameAvailabilityResponse> {\n return this.client.sendOperationRequest(\n { locationName, parameters, options },\n checkNameAvailabilityOperationSpec,\n );\n }\n\n /**\n * ListSupportedVirtualMachineSkusNext\n * @param locationName The region for which to retrieve Batch service supported SKUs.\n * @param nextLink The nextLink from the previous successful call to the\n * ListSupportedVirtualMachineSkus method.\n * @param options The options parameters.\n */\n private _listSupportedVirtualMachineSkusNext(\n locationName: string,\n nextLink: string,\n options?: LocationListSupportedVirtualMachineSkusNextOptionalParams,\n ): Promise<LocationListSupportedVirtualMachineSkusNextResponse> {\n return this.client.sendOperationRequest(\n { locationName, nextLink, options },\n listSupportedVirtualMachineSkusNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getQuotasOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/quotas\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.BatchLocationQuota,\n },\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.locationName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listSupportedVirtualMachineSkusOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/virtualMachineSkus\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportedSkusResult,\n },\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.maxresults,\n Parameters.filter,\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.locationName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst checkNameAvailabilityOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/checkNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CheckNameAvailabilityResult,\n },\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n requestBody: Parameters.parameters7,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.locationName,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst listSupportedVirtualMachineSkusNextOperationSpec: coreClient.OperationSpec =\n {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportedSkusResult,\n },\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n Parameters.locationName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n };\n"]}
1
+ {"version":3,"file":"location.js","sourceRoot":"","sources":["../../../src/operations/location.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAetD,4CAA4C;AAC5C,4CAA4C;AAC5C,MAAM,OAAO,YAAY;IACN,MAAM,CAAwB;IAE/C;;;OAGG;IACH,YAAY,MAA6B;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAI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,cAAc;QACzB,UAAU,CAAC,YAAY;KACxB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,gDAAgD,GACpD;IACE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,YAAY;KACxB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { Location } 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 { BatchManagementClient } from \"../batchManagementClient.js\";\nimport {\n SupportedSku,\n LocationListSupportedVirtualMachineSkusNextOptionalParams,\n LocationListSupportedVirtualMachineSkusOptionalParams,\n LocationListSupportedVirtualMachineSkusResponse,\n LocationGetQuotasOptionalParams,\n LocationGetQuotasResponse,\n CheckNameAvailabilityParameters,\n LocationCheckNameAvailabilityOptionalParams,\n LocationCheckNameAvailabilityResponse,\n LocationListSupportedVirtualMachineSkusNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Location operations. */\nexport class LocationImpl implements Location {\n private readonly client: BatchManagementClient;\n\n /**\n * Initialize a new instance of the class Location class.\n * @param client Reference to the service client\n */\n constructor(client: BatchManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets the list of Batch supported Virtual Machine VM sizes available at the given location.\n * @param locationName The region for which to retrieve Batch service supported SKUs.\n * @param options The options parameters.\n */\n public listSupportedVirtualMachineSkus(\n locationName: string,\n options?: LocationListSupportedVirtualMachineSkusOptionalParams,\n ): PagedAsyncIterableIterator<SupportedSku> {\n const iter = this.listSupportedVirtualMachineSkusPagingAll(\n locationName,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listSupportedVirtualMachineSkusPagingPage(\n locationName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listSupportedVirtualMachineSkusPagingPage(\n locationName: string,\n options?: LocationListSupportedVirtualMachineSkusOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<SupportedSku[]> {\n let result: LocationListSupportedVirtualMachineSkusResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listSupportedVirtualMachineSkus(\n locationName,\n options,\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listSupportedVirtualMachineSkusNext(\n locationName,\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 *listSupportedVirtualMachineSkusPagingAll(\n locationName: string,\n options?: LocationListSupportedVirtualMachineSkusOptionalParams,\n ): AsyncIterableIterator<SupportedSku> {\n for await (const page of this.listSupportedVirtualMachineSkusPagingPage(\n locationName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets the Batch service quotas for the specified subscription at the given location.\n * @param locationName The region for which to retrieve Batch service quotas.\n * @param options The options parameters.\n */\n getQuotas(\n locationName: string,\n options?: LocationGetQuotasOptionalParams,\n ): Promise<LocationGetQuotasResponse> {\n return this.client.sendOperationRequest(\n { locationName, options },\n getQuotasOperationSpec,\n );\n }\n\n /**\n * Gets the list of Batch supported Virtual Machine VM sizes available at the given location.\n * @param locationName The region for which to retrieve Batch service supported SKUs.\n * @param options The options parameters.\n */\n private _listSupportedVirtualMachineSkus(\n locationName: string,\n options?: LocationListSupportedVirtualMachineSkusOptionalParams,\n ): Promise<LocationListSupportedVirtualMachineSkusResponse> {\n return this.client.sendOperationRequest(\n { locationName, options },\n listSupportedVirtualMachineSkusOperationSpec,\n );\n }\n\n /**\n * Checks whether the Batch account name is available in the specified region.\n * @param locationName The desired region for the name check.\n * @param parameters Properties needed to check the availability of a name.\n * @param options The options parameters.\n */\n checkNameAvailability(\n locationName: string,\n parameters: CheckNameAvailabilityParameters,\n options?: LocationCheckNameAvailabilityOptionalParams,\n ): Promise<LocationCheckNameAvailabilityResponse> {\n return this.client.sendOperationRequest(\n { locationName, parameters, options },\n checkNameAvailabilityOperationSpec,\n );\n }\n\n /**\n * ListSupportedVirtualMachineSkusNext\n * @param locationName The region for which to retrieve Batch service supported SKUs.\n * @param nextLink The nextLink from the previous successful call to the\n * ListSupportedVirtualMachineSkus method.\n * @param options The options parameters.\n */\n private _listSupportedVirtualMachineSkusNext(\n locationName: string,\n nextLink: string,\n options?: LocationListSupportedVirtualMachineSkusNextOptionalParams,\n ): Promise<LocationListSupportedVirtualMachineSkusNextResponse> {\n return this.client.sendOperationRequest(\n { locationName, nextLink, options },\n listSupportedVirtualMachineSkusNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getQuotasOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/quotas\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.BatchLocationQuota,\n },\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.locationName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listSupportedVirtualMachineSkusOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/virtualMachineSkus\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportedSkusResult,\n },\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.maxresults,\n Parameters.filter,\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.locationName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst checkNameAvailabilityOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/checkNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CheckNameAvailabilityResult,\n },\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n requestBody: Parameters.parameters7,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.locationName,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst listSupportedVirtualMachineSkusNextOperationSpec: coreClient.OperationSpec =\n {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportedSkusResult,\n },\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n Parameters.locationName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n };\n"]}
@@ -5,7 +5,6 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
8
  import { setContinuationToken } from "../pagingHelper.js";
10
9
  import * as coreClient from "@azure/core-client";
11
10
  import * as Mappers from "../models/mappers.js";
@@ -15,6 +14,7 @@ import { createLroSpec } from "../lroImpl.js";
15
14
  /// <reference lib="esnext.asynciterable" />
16
15
  /** Class containing NetworkSecurityPerimeterOperations operations. */
17
16
  export class NetworkSecurityPerimeterOperationsImpl {
17
+ client;
18
18
  /**
19
19
  * Initialize a new instance of the class NetworkSecurityPerimeterOperations class.
20
20
  * @param client Reference to the service client
@@ -38,52 +38,35 @@ export class NetworkSecurityPerimeterOperationsImpl {
38
38
  return this;
39
39
  },
40
40
  byPage: (settings) => {
41
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
41
+ if (settings?.maxPageSize) {
42
42
  throw new Error("maxPageSize is not supported by this operation.");
43
43
  }
44
44
  return this.listConfigurationsPagingPage(resourceGroupName, accountName, options, settings);
45
45
  },
46
46
  };
47
47
  }
48
- listConfigurationsPagingPage(resourceGroupName, accountName, options, settings) {
49
- return __asyncGenerator(this, arguments, function* listConfigurationsPagingPage_1() {
50
- let result;
51
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
52
- if (!continuationToken) {
53
- result = yield __await(this._listConfigurations(resourceGroupName, accountName, options));
54
- let page = result.value || [];
55
- continuationToken = result.nextLink;
56
- setContinuationToken(page, continuationToken);
57
- yield yield __await(page);
58
- }
59
- while (continuationToken) {
60
- result = yield __await(this._listConfigurationsNext(resourceGroupName, accountName, continuationToken, options));
61
- continuationToken = result.nextLink;
62
- let page = result.value || [];
63
- setContinuationToken(page, continuationToken);
64
- yield yield __await(page);
65
- }
66
- });
48
+ async *listConfigurationsPagingPage(resourceGroupName, accountName, options, settings) {
49
+ let result;
50
+ let continuationToken = settings?.continuationToken;
51
+ if (!continuationToken) {
52
+ result = await this._listConfigurations(resourceGroupName, accountName, options);
53
+ let page = result.value || [];
54
+ continuationToken = result.nextLink;
55
+ setContinuationToken(page, continuationToken);
56
+ yield page;
57
+ }
58
+ while (continuationToken) {
59
+ result = await this._listConfigurationsNext(resourceGroupName, accountName, continuationToken, options);
60
+ continuationToken = result.nextLink;
61
+ let page = result.value || [];
62
+ setContinuationToken(page, continuationToken);
63
+ yield page;
64
+ }
67
65
  }
68
- listConfigurationsPagingAll(resourceGroupName, accountName, options) {
69
- return __asyncGenerator(this, arguments, function* listConfigurationsPagingAll_1() {
70
- var _a, e_1, _b, _c;
71
- try {
72
- for (var _d = true, _e = __asyncValues(this.listConfigurationsPagingPage(resourceGroupName, accountName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
73
- _c = _f.value;
74
- _d = false;
75
- const page = _c;
76
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
77
- }
78
- }
79
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
80
- finally {
81
- try {
82
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
83
- }
84
- finally { if (e_1) throw e_1.error; }
85
- }
86
- });
66
+ async *listConfigurationsPagingAll(resourceGroupName, accountName, options) {
67
+ for await (const page of this.listConfigurationsPagingPage(resourceGroupName, accountName, options)) {
68
+ yield* page;
69
+ }
87
70
  }
88
71
  /**
89
72
  * Lists all of the NSP configurations in the specified account.
@@ -123,14 +106,19 @@ export class NetworkSecurityPerimeterOperationsImpl {
123
106
  return this.client.sendOperationRequest(args, spec);
124
107
  };
125
108
  const sendOperationFn = async (args, spec) => {
126
- var _a;
127
109
  let currentRawResponse = undefined;
128
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
110
+ const providedCallback = args.options?.onResponse;
129
111
  const callback = (rawResponse, flatResponse) => {
130
112
  currentRawResponse = rawResponse;
131
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
113
+ providedCallback?.(rawResponse, flatResponse);
114
+ };
115
+ const updatedArgs = {
116
+ ...args,
117
+ options: {
118
+ ...args.options,
119
+ onResponse: callback,
120
+ },
132
121
  };
133
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
134
122
  const flatResponse = await directSendOperation(updatedArgs, spec);
135
123
  return {
136
124
  flatResponse,
@@ -152,8 +140,8 @@ export class NetworkSecurityPerimeterOperationsImpl {
152
140
  spec: reconcileConfigurationOperationSpec,
153
141
  });
154
142
  const poller = await createHttpPoller(lro, {
155
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
156
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
143
+ restoreFrom: options?.resumeFrom,
144
+ intervalInMs: options?.updateIntervalInMs,
157
145
  resourceLocationConfig: "location",
158
146
  });
159
147
  await poller.poll();
@@ -1 +1 @@
1
- {"version":3,"file":"networkSecurityPerimeterOperations.js","sourceRoot":"","sources":["../../../src/operations/networkSecurityPerimeterOperations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAa9C,4CAA4C;AAC5C,sEAAsE;AACtE,MAAM,OAAO,sCAAsC;IAKjD;;;OAGG;IACH,YAAY,MAA6B;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,kBAAkB,CACvB,iBAAyB,EACzB,WAAmB,EACnB,OAAkE;QAElE,MAAM,IAAI,GAAG,IAAI,CAAC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IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { NetworkSecurityPerimeterOperations } 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 { BatchManagementClient } from \"../batchManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n NetworkSecurityPerimeterConfiguration,\n NetworkSecurityPerimeterListConfigurationsNextOptionalParams,\n NetworkSecurityPerimeterListConfigurationsOptionalParams,\n NetworkSecurityPerimeterListConfigurationsResponse,\n NetworkSecurityPerimeterGetConfigurationOptionalParams,\n NetworkSecurityPerimeterGetConfigurationResponse,\n NetworkSecurityPerimeterReconcileConfigurationOptionalParams,\n NetworkSecurityPerimeterReconcileConfigurationResponse,\n NetworkSecurityPerimeterListConfigurationsNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing NetworkSecurityPerimeterOperations operations. */\nexport class NetworkSecurityPerimeterOperationsImpl\n implements NetworkSecurityPerimeterOperations\n{\n private readonly client: BatchManagementClient;\n\n /**\n * Initialize a new instance of the class NetworkSecurityPerimeterOperations class.\n * @param client Reference to the service client\n */\n constructor(client: BatchManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists all of the NSP configurations in the specified account.\n * @param resourceGroupName The name of the resource group that contains the Batch account.\n * @param accountName The name of the Batch account.\n * @param options The options parameters.\n */\n public listConfigurations(\n resourceGroupName: string,\n accountName: string,\n options?: NetworkSecurityPerimeterListConfigurationsOptionalParams,\n ): PagedAsyncIterableIterator<NetworkSecurityPerimeterConfiguration> {\n const iter = this.listConfigurationsPagingAll(\n resourceGroupName,\n accountName,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listConfigurationsPagingPage(\n resourceGroupName,\n accountName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listConfigurationsPagingPage(\n resourceGroupName: string,\n accountName: string,\n options?: NetworkSecurityPerimeterListConfigurationsOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<NetworkSecurityPerimeterConfiguration[]> {\n let result: NetworkSecurityPerimeterListConfigurationsResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listConfigurations(\n resourceGroupName,\n accountName,\n options,\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listConfigurationsNext(\n resourceGroupName,\n accountName,\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 *listConfigurationsPagingAll(\n resourceGroupName: string,\n accountName: string,\n options?: NetworkSecurityPerimeterListConfigurationsOptionalParams,\n ): AsyncIterableIterator<NetworkSecurityPerimeterConfiguration> {\n for await (const page of this.listConfigurationsPagingPage(\n resourceGroupName,\n accountName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists all of the NSP configurations in the specified account.\n * @param resourceGroupName The name of the resource group that contains the Batch account.\n * @param accountName The name of the Batch account.\n * @param options The options parameters.\n */\n private _listConfigurations(\n resourceGroupName: string,\n accountName: string,\n options?: NetworkSecurityPerimeterListConfigurationsOptionalParams,\n ): Promise<NetworkSecurityPerimeterListConfigurationsResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, accountName, options },\n listConfigurationsOperationSpec,\n );\n }\n\n /**\n * Gets information about the specified NSP configuration.\n * @param resourceGroupName The name of the resource group that contains the Batch account.\n * @param accountName The name of the Batch account.\n * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter\n * configuration\n * @param options The options parameters.\n */\n getConfiguration(\n resourceGroupName: string,\n accountName: string,\n networkSecurityPerimeterConfigurationName: string,\n options?: NetworkSecurityPerimeterGetConfigurationOptionalParams,\n ): Promise<NetworkSecurityPerimeterGetConfigurationResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n accountName,\n networkSecurityPerimeterConfigurationName,\n options,\n },\n getConfigurationOperationSpec,\n );\n }\n\n /**\n * Reconciles the specified NSP configuration.\n * @param resourceGroupName The name of the resource group that contains the Batch account.\n * @param accountName The name of the Batch account.\n * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter\n * configuration\n * @param options The options parameters.\n */\n async beginReconcileConfiguration(\n resourceGroupName: string,\n accountName: string,\n networkSecurityPerimeterConfigurationName: string,\n options?: NetworkSecurityPerimeterReconcileConfigurationOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<NetworkSecurityPerimeterReconcileConfigurationResponse>,\n NetworkSecurityPerimeterReconcileConfigurationResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<NetworkSecurityPerimeterReconcileConfigurationResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n accountName,\n networkSecurityPerimeterConfigurationName,\n options,\n },\n spec: reconcileConfigurationOperationSpec,\n });\n const poller = await createHttpPoller<\n NetworkSecurityPerimeterReconcileConfigurationResponse,\n OperationState<NetworkSecurityPerimeterReconcileConfigurationResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Reconciles the specified NSP configuration.\n * @param resourceGroupName The name of the resource group that contains the Batch account.\n * @param accountName The name of the Batch account.\n * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter\n * configuration\n * @param options The options parameters.\n */\n async beginReconcileConfigurationAndWait(\n resourceGroupName: string,\n accountName: string,\n networkSecurityPerimeterConfigurationName: string,\n options?: NetworkSecurityPerimeterReconcileConfigurationOptionalParams,\n ): Promise<NetworkSecurityPerimeterReconcileConfigurationResponse> {\n const poller = await this.beginReconcileConfiguration(\n resourceGroupName,\n accountName,\n networkSecurityPerimeterConfigurationName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * ListConfigurationsNext\n * @param resourceGroupName The name of the resource group that contains the Batch account.\n * @param accountName The name of the Batch account.\n * @param nextLink The nextLink from the previous successful call to the ListConfigurations method.\n * @param options The options parameters.\n */\n private _listConfigurationsNext(\n resourceGroupName: string,\n accountName: string,\n nextLink: string,\n options?: NetworkSecurityPerimeterListConfigurationsNextOptionalParams,\n ): Promise<NetworkSecurityPerimeterListConfigurationsNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, accountName, nextLink, options },\n listConfigurationsNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listConfigurationsOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/networkSecurityPerimeterConfigurations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.NetworkSecurityPerimeterConfigurationListResult,\n },\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.accountName1,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getConfigurationOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.NetworkSecurityPerimeterConfiguration,\n },\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.accountName1,\n Parameters.networkSecurityPerimeterConfigurationName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst reconcileConfigurationOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}/reconcile\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n headersMapper:\n Mappers.NetworkSecurityPerimeterReconcileConfigurationHeaders,\n },\n 201: {\n headersMapper:\n Mappers.NetworkSecurityPerimeterReconcileConfigurationHeaders,\n },\n 202: {\n headersMapper:\n Mappers.NetworkSecurityPerimeterReconcileConfigurationHeaders,\n },\n 204: {\n headersMapper:\n Mappers.NetworkSecurityPerimeterReconcileConfigurationHeaders,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.accountName1,\n Parameters.networkSecurityPerimeterConfigurationName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listConfigurationsNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.NetworkSecurityPerimeterConfigurationListResult,\n },\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.accountName1,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"networkSecurityPerimeterOperations.js","sourceRoot":"","sources":["../../../src/operations/networkSecurityPerimeterOperations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAa9C,4CAA4C;AAC5C,sEAAsE;AACtE,MAAM,OAAO,sCAAsC;IAGhC,MAAM,CAAwB;IAE/C;;;OAGG;IACH,YAAY,MAA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,cAAc;QACzB,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { NetworkSecurityPerimeterOperations } 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 { BatchManagementClient } from \"../batchManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n NetworkSecurityPerimeterConfiguration,\n NetworkSecurityPerimeterListConfigurationsNextOptionalParams,\n NetworkSecurityPerimeterListConfigurationsOptionalParams,\n NetworkSecurityPerimeterListConfigurationsResponse,\n NetworkSecurityPerimeterGetConfigurationOptionalParams,\n NetworkSecurityPerimeterGetConfigurationResponse,\n NetworkSecurityPerimeterReconcileConfigurationOptionalParams,\n NetworkSecurityPerimeterReconcileConfigurationResponse,\n NetworkSecurityPerimeterListConfigurationsNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing NetworkSecurityPerimeterOperations operations. */\nexport class NetworkSecurityPerimeterOperationsImpl\n implements NetworkSecurityPerimeterOperations\n{\n private readonly client: BatchManagementClient;\n\n /**\n * Initialize a new instance of the class NetworkSecurityPerimeterOperations class.\n * @param client Reference to the service client\n */\n constructor(client: BatchManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists all of the NSP configurations in the specified account.\n * @param resourceGroupName The name of the resource group that contains the Batch account.\n * @param accountName The name of the Batch account.\n * @param options The options parameters.\n */\n public listConfigurations(\n resourceGroupName: string,\n accountName: string,\n options?: NetworkSecurityPerimeterListConfigurationsOptionalParams,\n ): PagedAsyncIterableIterator<NetworkSecurityPerimeterConfiguration> {\n const iter = this.listConfigurationsPagingAll(\n resourceGroupName,\n accountName,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listConfigurationsPagingPage(\n resourceGroupName,\n accountName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listConfigurationsPagingPage(\n resourceGroupName: string,\n accountName: string,\n options?: NetworkSecurityPerimeterListConfigurationsOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<NetworkSecurityPerimeterConfiguration[]> {\n let result: NetworkSecurityPerimeterListConfigurationsResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listConfigurations(\n resourceGroupName,\n accountName,\n options,\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listConfigurationsNext(\n resourceGroupName,\n accountName,\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 *listConfigurationsPagingAll(\n resourceGroupName: string,\n accountName: string,\n options?: NetworkSecurityPerimeterListConfigurationsOptionalParams,\n ): AsyncIterableIterator<NetworkSecurityPerimeterConfiguration> {\n for await (const page of this.listConfigurationsPagingPage(\n resourceGroupName,\n accountName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists all of the NSP configurations in the specified account.\n * @param resourceGroupName The name of the resource group that contains the Batch account.\n * @param accountName The name of the Batch account.\n * @param options The options parameters.\n */\n private _listConfigurations(\n resourceGroupName: string,\n accountName: string,\n options?: NetworkSecurityPerimeterListConfigurationsOptionalParams,\n ): Promise<NetworkSecurityPerimeterListConfigurationsResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, accountName, options },\n listConfigurationsOperationSpec,\n );\n }\n\n /**\n * Gets information about the specified NSP configuration.\n * @param resourceGroupName The name of the resource group that contains the Batch account.\n * @param accountName The name of the Batch account.\n * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter\n * configuration\n * @param options The options parameters.\n */\n getConfiguration(\n resourceGroupName: string,\n accountName: string,\n networkSecurityPerimeterConfigurationName: string,\n options?: NetworkSecurityPerimeterGetConfigurationOptionalParams,\n ): Promise<NetworkSecurityPerimeterGetConfigurationResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n accountName,\n networkSecurityPerimeterConfigurationName,\n options,\n },\n getConfigurationOperationSpec,\n );\n }\n\n /**\n * Reconciles the specified NSP configuration.\n * @param resourceGroupName The name of the resource group that contains the Batch account.\n * @param accountName The name of the Batch account.\n * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter\n * configuration\n * @param options The options parameters.\n */\n async beginReconcileConfiguration(\n resourceGroupName: string,\n accountName: string,\n networkSecurityPerimeterConfigurationName: string,\n options?: NetworkSecurityPerimeterReconcileConfigurationOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<NetworkSecurityPerimeterReconcileConfigurationResponse>,\n NetworkSecurityPerimeterReconcileConfigurationResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<NetworkSecurityPerimeterReconcileConfigurationResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n accountName,\n networkSecurityPerimeterConfigurationName,\n options,\n },\n spec: reconcileConfigurationOperationSpec,\n });\n const poller = await createHttpPoller<\n NetworkSecurityPerimeterReconcileConfigurationResponse,\n OperationState<NetworkSecurityPerimeterReconcileConfigurationResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Reconciles the specified NSP configuration.\n * @param resourceGroupName The name of the resource group that contains the Batch account.\n * @param accountName The name of the Batch account.\n * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter\n * configuration\n * @param options The options parameters.\n */\n async beginReconcileConfigurationAndWait(\n resourceGroupName: string,\n accountName: string,\n networkSecurityPerimeterConfigurationName: string,\n options?: NetworkSecurityPerimeterReconcileConfigurationOptionalParams,\n ): Promise<NetworkSecurityPerimeterReconcileConfigurationResponse> {\n const poller = await this.beginReconcileConfiguration(\n resourceGroupName,\n accountName,\n networkSecurityPerimeterConfigurationName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * ListConfigurationsNext\n * @param resourceGroupName The name of the resource group that contains the Batch account.\n * @param accountName The name of the Batch account.\n * @param nextLink The nextLink from the previous successful call to the ListConfigurations method.\n * @param options The options parameters.\n */\n private _listConfigurationsNext(\n resourceGroupName: string,\n accountName: string,\n nextLink: string,\n options?: NetworkSecurityPerimeterListConfigurationsNextOptionalParams,\n ): Promise<NetworkSecurityPerimeterListConfigurationsNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, accountName, nextLink, options },\n listConfigurationsNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listConfigurationsOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/networkSecurityPerimeterConfigurations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.NetworkSecurityPerimeterConfigurationListResult,\n },\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.accountName1,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getConfigurationOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.NetworkSecurityPerimeterConfiguration,\n },\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.accountName1,\n Parameters.networkSecurityPerimeterConfigurationName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst reconcileConfigurationOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}/reconcile\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n headersMapper:\n Mappers.NetworkSecurityPerimeterReconcileConfigurationHeaders,\n },\n 201: {\n headersMapper:\n Mappers.NetworkSecurityPerimeterReconcileConfigurationHeaders,\n },\n 202: {\n headersMapper:\n Mappers.NetworkSecurityPerimeterReconcileConfigurationHeaders,\n },\n 204: {\n headersMapper:\n Mappers.NetworkSecurityPerimeterReconcileConfigurationHeaders,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.accountName1,\n Parameters.networkSecurityPerimeterConfigurationName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listConfigurationsNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.NetworkSecurityPerimeterConfigurationListResult,\n },\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.accountName1,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
@@ -5,7 +5,6 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
8
  import { setContinuationToken } from "../pagingHelper.js";
10
9
  import * as coreClient from "@azure/core-client";
11
10
  import * as Mappers from "../models/mappers.js";
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
13
12
  /// <reference lib="esnext.asynciterable" />
14
13
  /** Class containing Operations operations. */
15
14
  export class OperationsImpl {
15
+ client;
16
16
  /**
17
17
  * Initialize a new instance of the class Operations class.
18
18
  * @param client Reference to the service client
@@ -34,52 +34,35 @@ export class OperationsImpl {
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
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
48
- if (!continuationToken) {
49
- result = yield __await(this._list(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._listNext(continuationToken, options));
57
- continuationToken = result.nextLink;
58
- let page = result.value || [];
59
- setContinuationToken(page, continuationToken);
60
- yield yield __await(page);
61
- }
62
- });
44
+ async *listPagingPage(options, settings) {
45
+ let result;
46
+ let continuationToken = settings?.continuationToken;
47
+ if (!continuationToken) {
48
+ result = await this._list(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._listNext(continuationToken, options);
56
+ continuationToken = result.nextLink;
57
+ let page = result.value || [];
58
+ setContinuationToken(page, continuationToken);
59
+ yield page;
60
+ }
63
61
  }
64
- listPagingAll(options) {
65
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
66
- var _a, e_1, _b, _c;
67
- try {
68
- for (var _d = true, _e = __asyncValues(this.listPagingPage(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 *listPagingAll(options) {
63
+ for await (const page of this.listPagingPage(options)) {
64
+ yield* page;
65
+ }
83
66
  }
84
67
  /**
85
68
  * Lists available operations for the Microsoft.Batch provider
@@ -1 +1 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.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;AAUtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAM,OAAO,cAAc;IAGzB;;;OAGG;IACH,YAAY,MAA6B;QACvC,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,QAAuB;;YAEvB,IAAI,MAA8B,CAAC;YACnC,IAAI,iBAAiB,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,iBAAiB,CAAC;YACpD,IAAI,CAAC,iBAAiB,EAAE,CAAC;gBACvB,MAAM,GAAG,cAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,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U,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,uCAAuC;IAC7C,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { 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 { BatchManagementClient } from \"../batchManagementClient.js\";\nimport {\n Operation,\n OperationsListNextOptionalParams,\n OperationsListOptionalParams,\n OperationsListResponse,\n OperationsListNextResponse,\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: BatchManagementClient;\n\n /**\n * Initialize a new instance of the class Operations class.\n * @param client Reference to the service client\n */\n constructor(client: BatchManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists available operations for the Microsoft.Batch 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 let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n options?: OperationsListOptionalParams,\n ): AsyncIterableIterator<Operation> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists available operations for the Microsoft.Batch 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 /**\n * ListNext\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n nextLink: string,\n options?: OperationsListNextOptionalParams,\n ): Promise<OperationsListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Batch/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult,\n },\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult,\n },\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.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;AAUtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAM,OAAO,cAAc;IACR,MAAM,CAAwB;IAE/C;;;OAGG;IACH,YAAY,MAA6B;QACvC,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,QA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IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE,iBAAiB,CAAC,CAAC;IAC1E,CAAC;IAED;;;;OAIG;IACK,SAAS,CACf,QAAgB,EAChB,OAA0C;QAE1C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,QAAQ,EAAE,OAAO,EAAE,EACrB,qBAAqB,CACtB,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,uCAAuC;IAC7C,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { 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 { BatchManagementClient } from \"../batchManagementClient.js\";\nimport {\n Operation,\n OperationsListNextOptionalParams,\n OperationsListOptionalParams,\n OperationsListResponse,\n OperationsListNextResponse,\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: BatchManagementClient;\n\n /**\n * Initialize a new instance of the class Operations class.\n * @param client Reference to the service client\n */\n constructor(client: BatchManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists available operations for the Microsoft.Batch 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 let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n options?: OperationsListOptionalParams,\n ): AsyncIterableIterator<Operation> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists available operations for the Microsoft.Batch 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 /**\n * ListNext\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n nextLink: string,\n options?: OperationsListNextOptionalParams,\n ): Promise<OperationsListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Batch/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult,\n },\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult,\n },\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}