@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
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
16
16
  /// <reference lib="esnext.asynciterable" />
17
17
  /** Class containing Location operations. */
18
18
  class LocationImpl {
19
+ client;
19
20
  /**
20
21
  * Initialize a new instance of the class Location class.
21
22
  * @param client Reference to the service client
@@ -38,52 +39,35 @@ class LocationImpl {
38
39
  return this;
39
40
  },
40
41
  byPage: (settings) => {
41
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
42
+ if (settings?.maxPageSize) {
42
43
  throw new Error("maxPageSize is not supported by this operation.");
43
44
  }
44
45
  return this.listSupportedVirtualMachineSkusPagingPage(locationName, options, settings);
45
46
  },
46
47
  };
47
48
  }
48
- listSupportedVirtualMachineSkusPagingPage(locationName, options, settings) {
49
- return tslib_1.__asyncGenerator(this, arguments, function* listSupportedVirtualMachineSkusPagingPage_1() {
50
- let result;
51
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
52
- if (!continuationToken) {
53
- result = yield tslib_1.__await(this._listSupportedVirtualMachineSkus(locationName, options));
54
- let page = result.value || [];
55
- continuationToken = result.nextLink;
56
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
57
- yield yield tslib_1.__await(page);
58
- }
59
- while (continuationToken) {
60
- result = yield tslib_1.__await(this._listSupportedVirtualMachineSkusNext(locationName, continuationToken, options));
61
- continuationToken = result.nextLink;
62
- let page = result.value || [];
63
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
64
- yield yield tslib_1.__await(page);
65
- }
66
- });
49
+ async *listSupportedVirtualMachineSkusPagingPage(locationName, options, settings) {
50
+ let result;
51
+ let continuationToken = settings?.continuationToken;
52
+ if (!continuationToken) {
53
+ result = await this._listSupportedVirtualMachineSkus(locationName, options);
54
+ let page = result.value || [];
55
+ continuationToken = result.nextLink;
56
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
57
+ yield page;
58
+ }
59
+ while (continuationToken) {
60
+ result = await this._listSupportedVirtualMachineSkusNext(locationName, continuationToken, options);
61
+ continuationToken = result.nextLink;
62
+ let page = result.value || [];
63
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
64
+ yield page;
65
+ }
67
66
  }
68
- listSupportedVirtualMachineSkusPagingAll(locationName, options) {
69
- return tslib_1.__asyncGenerator(this, arguments, function* listSupportedVirtualMachineSkusPagingAll_1() {
70
- var _a, e_1, _b, _c;
71
- try {
72
- for (var _d = true, _e = tslib_1.__asyncValues(this.listSupportedVirtualMachineSkusPagingPage(locationName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
73
- _c = _f.value;
74
- _d = false;
75
- const page = _c;
76
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
77
- }
78
- }
79
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
80
- finally {
81
- try {
82
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
83
- }
84
- finally { if (e_1) throw e_1.error; }
85
- }
86
- });
67
+ async *listSupportedVirtualMachineSkusPagingAll(locationName, options) {
68
+ for await (const page of this.listSupportedVirtualMachineSkusPagingPage(locationName, options)) {
69
+ yield* page;
70
+ }
87
71
  }
88
72
  /**
89
73
  * 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,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAetD,4CAA4C;AAC5C,4CAA4C;AAC5C,MAAa,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+D,EAC/D,QAAuB;;YAEvB,IAAI,MAAuD,CAAC;YAC5D,IAAI,iBAAiB,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,iBAAiB,CAAC;YACpD,IAAI,CAAC,iBAAiB,EAAE,CAAC;gBACvB,MAAM,GAAG,sBAAM,IAAI,CAAC,g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right (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,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAetD,4CAA4C;AAC5C,4CAA4C;AAC5C,MAAa,YAAY;IACN,MAAM,CAAwB;IAE/C;;;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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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"]}
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
18
18
  /// <reference lib="esnext.asynciterable" />
19
19
  /** Class containing NetworkSecurityPerimeterOperations operations. */
20
20
  class NetworkSecurityPerimeterOperationsImpl {
21
+ client;
21
22
  /**
22
23
  * Initialize a new instance of the class NetworkSecurityPerimeterOperations class.
23
24
  * @param client Reference to the service client
@@ -41,52 +42,35 @@ class NetworkSecurityPerimeterOperationsImpl {
41
42
  return this;
42
43
  },
43
44
  byPage: (settings) => {
44
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
45
+ if (settings?.maxPageSize) {
45
46
  throw new Error("maxPageSize is not supported by this operation.");
46
47
  }
47
48
  return this.listConfigurationsPagingPage(resourceGroupName, accountName, options, settings);
48
49
  },
49
50
  };
50
51
  }
51
- listConfigurationsPagingPage(resourceGroupName, accountName, options, settings) {
52
- return tslib_1.__asyncGenerator(this, arguments, function* listConfigurationsPagingPage_1() {
53
- let result;
54
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
55
- if (!continuationToken) {
56
- result = yield tslib_1.__await(this._listConfigurations(resourceGroupName, accountName, options));
57
- let page = result.value || [];
58
- continuationToken = result.nextLink;
59
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
60
- yield yield tslib_1.__await(page);
61
- }
62
- while (continuationToken) {
63
- result = yield tslib_1.__await(this._listConfigurationsNext(resourceGroupName, accountName, continuationToken, options));
64
- continuationToken = result.nextLink;
65
- let page = result.value || [];
66
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
67
- yield yield tslib_1.__await(page);
68
- }
69
- });
52
+ async *listConfigurationsPagingPage(resourceGroupName, accountName, options, settings) {
53
+ let result;
54
+ let continuationToken = settings?.continuationToken;
55
+ if (!continuationToken) {
56
+ result = await this._listConfigurations(resourceGroupName, accountName, options);
57
+ let page = result.value || [];
58
+ continuationToken = result.nextLink;
59
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
60
+ yield page;
61
+ }
62
+ while (continuationToken) {
63
+ result = await this._listConfigurationsNext(resourceGroupName, accountName, continuationToken, options);
64
+ continuationToken = result.nextLink;
65
+ let page = result.value || [];
66
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
67
+ yield page;
68
+ }
70
69
  }
71
- listConfigurationsPagingAll(resourceGroupName, accountName, options) {
72
- return tslib_1.__asyncGenerator(this, arguments, function* listConfigurationsPagingAll_1() {
73
- var _a, e_1, _b, _c;
74
- try {
75
- for (var _d = true, _e = tslib_1.__asyncValues(this.listConfigurationsPagingPage(resourceGroupName, accountName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
76
- _c = _f.value;
77
- _d = false;
78
- const page = _c;
79
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
80
- }
81
- }
82
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
83
- finally {
84
- try {
85
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
86
- }
87
- finally { if (e_1) throw e_1.error; }
88
- }
89
- });
70
+ async *listConfigurationsPagingAll(resourceGroupName, accountName, options) {
71
+ for await (const page of this.listConfigurationsPagingPage(resourceGroupName, accountName, options)) {
72
+ yield* page;
73
+ }
90
74
  }
91
75
  /**
92
76
  * Lists all of the NSP configurations in the specified account.
@@ -126,14 +110,19 @@ class NetworkSecurityPerimeterOperationsImpl {
126
110
  return this.client.sendOperationRequest(args, spec);
127
111
  };
128
112
  const sendOperationFn = async (args, spec) => {
129
- var _a;
130
113
  let currentRawResponse = undefined;
131
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
114
+ const providedCallback = args.options?.onResponse;
132
115
  const callback = (rawResponse, flatResponse) => {
133
116
  currentRawResponse = rawResponse;
134
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
117
+ providedCallback?.(rawResponse, flatResponse);
118
+ };
119
+ const updatedArgs = {
120
+ ...args,
121
+ options: {
122
+ ...args.options,
123
+ onResponse: callback,
124
+ },
135
125
  };
136
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
137
126
  const flatResponse = await directSendOperation(updatedArgs, spec);
138
127
  return {
139
128
  flatResponse,
@@ -155,8 +144,8 @@ class NetworkSecurityPerimeterOperationsImpl {
155
144
  spec: reconcileConfigurationOperationSpec,
156
145
  });
157
146
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
158
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
159
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
147
+ restoreFrom: options?.resumeFrom,
148
+ intervalInMs: options?.updateIntervalInMs,
160
149
  resourceLocationConfig: "location",
161
150
  });
162
151
  await poller.poll();
@@ -1 +1 @@
1
- {"version":3,"file":"networkSecurityPerimeterOperations.js","sourceRoot":"","sources":["../../../src/operations/networkSecurityPerimeterOperations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAa9C,4CAA4C;AAC5C,sEAAsE;AACtE,MAAa,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,2BAA2B,CAC3C,iBAAiB,EACjB,WAAW,EACX,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,4BAA4B,CACtC,iBAAiB,EACjB,WAAW,EACX,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,4BAA4B,CACzC,iBAAyB,EACzB,WAAmB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QACD,GAAG,EAAE;YACH,aAAa,EACX,OAAO,CAAC,qDAAqD;SAChE;QACD,GAAG,EAAE;YACH,aAAa,EACX,OAAO,CAAC,qDAAqD;SAChE;QACD,GAAG,EAAE;YACH,aAAa,EACX,OAAO,CAAC,qDAAqD;SAChE;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,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,yCAAyC;KACrD;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,mCAAmC,GAA6B;IACpE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,+CAA+C;SACpE;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;KACF;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,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAa9C,4CAA4C;AAC5C,sEAAsE;AACtE,MAAa,sCAAsC;IAGhC,MAAM,CAAwB;IAE/C;;;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,2BAA2B,CAC3C,iBAAiB,EACjB,WAAW,EACX,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,4BAA4B,CACtC,iBAAiB,EACjB,WAAW,EACX,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,4BAA4B,CACzC,iBAAyB,EACzB,WAAmB,EAC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Ae,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,yCAAyC;KACrD;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,mCAAmC,GAA6B;IACpE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,+CAA+C;SACpE;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;KACF;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"]}
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
16
16
  /// <reference lib="esnext.asynciterable" />
17
17
  /** Class containing Operations operations. */
18
18
  class OperationsImpl {
19
+ client;
19
20
  /**
20
21
  * Initialize a new instance of the class Operations class.
21
22
  * @param client Reference to the service client
@@ -37,52 +38,35 @@ class OperationsImpl {
37
38
  return this;
38
39
  },
39
40
  byPage: (settings) => {
40
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
41
+ if (settings?.maxPageSize) {
41
42
  throw new Error("maxPageSize is not supported by this operation.");
42
43
  }
43
44
  return this.listPagingPage(options, settings);
44
45
  },
45
46
  };
46
47
  }
47
- listPagingPage(options, settings) {
48
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
49
- let result;
50
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
51
- if (!continuationToken) {
52
- result = yield tslib_1.__await(this._list(options));
53
- let page = result.value || [];
54
- continuationToken = result.nextLink;
55
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
56
- yield yield tslib_1.__await(page);
57
- }
58
- while (continuationToken) {
59
- result = yield tslib_1.__await(this._listNext(continuationToken, options));
60
- continuationToken = result.nextLink;
61
- let page = result.value || [];
62
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
63
- yield yield tslib_1.__await(page);
64
- }
65
- });
48
+ async *listPagingPage(options, settings) {
49
+ let result;
50
+ let continuationToken = settings?.continuationToken;
51
+ if (!continuationToken) {
52
+ result = await this._list(options);
53
+ let page = result.value || [];
54
+ continuationToken = result.nextLink;
55
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
56
+ yield page;
57
+ }
58
+ while (continuationToken) {
59
+ result = await this._listNext(continuationToken, options);
60
+ continuationToken = result.nextLink;
61
+ let page = result.value || [];
62
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
63
+ yield page;
64
+ }
66
65
  }
67
- listPagingAll(options) {
68
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
69
- var _a, e_1, _b, _c;
70
- try {
71
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
72
- _c = _f.value;
73
- _d = false;
74
- const page = _c;
75
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
76
- }
77
- }
78
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
79
- finally {
80
- try {
81
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
82
- }
83
- finally { if (e_1) throw e_1.error; }
84
- }
85
- });
66
+ async *listPagingAll(options) {
67
+ for await (const page of this.listPagingPage(options)) {
68
+ yield* page;
69
+ }
86
70
  }
87
71
  /**
88
72
  * 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,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAa,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,CA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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,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAa,cAAc;IACR,MAAM,CAAwB;IAE/C;;;OAGG;IACH,YAAY,MAA6B;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,I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AAU,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"]}
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
18
18
  /// <reference lib="esnext.asynciterable" />
19
19
  /** Class containing PoolOperations operations. */
20
20
  class PoolOperationsImpl {
21
+ client;
21
22
  /**
22
23
  * Initialize a new instance of the class PoolOperations class.
23
24
  * @param client Reference to the service client
@@ -41,52 +42,35 @@ class PoolOperationsImpl {
41
42
  return this;
42
43
  },
43
44
  byPage: (settings) => {
44
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
45
+ if (settings?.maxPageSize) {
45
46
  throw new Error("maxPageSize is not supported by this operation.");
46
47
  }
47
48
  return this.listByBatchAccountPagingPage(resourceGroupName, accountName, options, settings);
48
49
  },
49
50
  };
50
51
  }
51
- listByBatchAccountPagingPage(resourceGroupName, accountName, options, settings) {
52
- return tslib_1.__asyncGenerator(this, arguments, function* listByBatchAccountPagingPage_1() {
53
- let result;
54
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
55
- if (!continuationToken) {
56
- result = yield tslib_1.__await(this._listByBatchAccount(resourceGroupName, accountName, options));
57
- let page = result.value || [];
58
- continuationToken = result.nextLink;
59
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
60
- yield yield tslib_1.__await(page);
61
- }
62
- while (continuationToken) {
63
- result = yield tslib_1.__await(this._listByBatchAccountNext(resourceGroupName, accountName, continuationToken, options));
64
- continuationToken = result.nextLink;
65
- let page = result.value || [];
66
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
67
- yield yield tslib_1.__await(page);
68
- }
69
- });
52
+ async *listByBatchAccountPagingPage(resourceGroupName, accountName, options, settings) {
53
+ let result;
54
+ let continuationToken = settings?.continuationToken;
55
+ if (!continuationToken) {
56
+ result = await this._listByBatchAccount(resourceGroupName, accountName, options);
57
+ let page = result.value || [];
58
+ continuationToken = result.nextLink;
59
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
60
+ yield page;
61
+ }
62
+ while (continuationToken) {
63
+ result = await this._listByBatchAccountNext(resourceGroupName, accountName, continuationToken, options);
64
+ continuationToken = result.nextLink;
65
+ let page = result.value || [];
66
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
67
+ yield page;
68
+ }
70
69
  }
71
- listByBatchAccountPagingAll(resourceGroupName, accountName, options) {
72
- return tslib_1.__asyncGenerator(this, arguments, function* listByBatchAccountPagingAll_1() {
73
- var _a, e_1, _b, _c;
74
- try {
75
- for (var _d = true, _e = tslib_1.__asyncValues(this.listByBatchAccountPagingPage(resourceGroupName, accountName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
76
- _c = _f.value;
77
- _d = false;
78
- const page = _c;
79
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
80
- }
81
- }
82
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
83
- finally {
84
- try {
85
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
86
- }
87
- finally { if (e_1) throw e_1.error; }
88
- }
89
- });
70
+ async *listByBatchAccountPagingAll(resourceGroupName, accountName, options) {
71
+ for await (const page of this.listByBatchAccountPagingPage(resourceGroupName, accountName, options)) {
72
+ yield* page;
73
+ }
90
74
  }
91
75
  /**
92
76
  * Lists all of the pools in the specified account.
@@ -132,14 +116,19 @@ class PoolOperationsImpl {
132
116
  return this.client.sendOperationRequest(args, spec);
133
117
  };
134
118
  const sendOperationFn = async (args, spec) => {
135
- var _a;
136
119
  let currentRawResponse = undefined;
137
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
120
+ const providedCallback = args.options?.onResponse;
138
121
  const callback = (rawResponse, flatResponse) => {
139
122
  currentRawResponse = rawResponse;
140
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
123
+ providedCallback?.(rawResponse, flatResponse);
124
+ };
125
+ const updatedArgs = {
126
+ ...args,
127
+ options: {
128
+ ...args.options,
129
+ onResponse: callback,
130
+ },
141
131
  };
142
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
143
132
  const flatResponse = await directSendOperation(updatedArgs, spec);
144
133
  return {
145
134
  flatResponse,
@@ -156,8 +145,8 @@ class PoolOperationsImpl {
156
145
  spec: deleteOperationSpec,
157
146
  });
158
147
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
159
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
160
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
148
+ restoreFrom: options?.resumeFrom,
149
+ intervalInMs: options?.updateIntervalInMs,
161
150
  resourceLocationConfig: "location",
162
151
  });
163
152
  await poller.poll();