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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) 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/esm/batchManagementClient.js +23 -5
  58. package/dist/esm/batchManagementClient.js.map +1 -1
  59. package/dist/esm/lroImpl.js +7 -3
  60. package/dist/esm/lroImpl.js.map +1 -1
  61. package/dist/esm/models/mappers.js +218 -102
  62. package/dist/esm/models/mappers.js.map +1 -1
  63. package/dist/esm/operations/applicationOperations.js +23 -40
  64. package/dist/esm/operations/applicationOperations.js.map +1 -1
  65. package/dist/esm/operations/applicationPackageOperations.js +23 -40
  66. package/dist/esm/operations/applicationPackageOperations.js.map +1 -1
  67. package/dist/esm/operations/batchAccountOperations.js +111 -169
  68. package/dist/esm/operations/batchAccountOperations.js.map +1 -1
  69. package/dist/esm/operations/certificateOperations.js +34 -46
  70. package/dist/esm/operations/certificateOperations.js.map +1 -1
  71. package/dist/esm/operations/location.js +23 -40
  72. package/dist/esm/operations/location.js.map +1 -1
  73. package/dist/esm/operations/networkSecurityPerimeterOperations.js +34 -46
  74. package/dist/esm/operations/networkSecurityPerimeterOperations.js.map +1 -1
  75. package/dist/esm/operations/operations.js +23 -40
  76. package/dist/esm/operations/operations.js.map +1 -1
  77. package/dist/esm/operations/poolOperations.js +34 -46
  78. package/dist/esm/operations/poolOperations.js.map +1 -1
  79. package/dist/esm/operations/privateEndpointConnectionOperations.js +45 -52
  80. package/dist/esm/operations/privateEndpointConnectionOperations.js.map +1 -1
  81. package/dist/esm/operations/privateLinkResourceOperations.js +23 -40
  82. package/dist/esm/operations/privateLinkResourceOperations.js.map +1 -1
  83. package/dist/esm/pagingHelper.js +2 -4
  84. package/dist/esm/pagingHelper.js.map +1 -1
  85. package/dist/react-native/batchManagementClient.js +23 -5
  86. package/dist/react-native/batchManagementClient.js.map +1 -1
  87. package/dist/react-native/lroImpl.js +7 -3
  88. package/dist/react-native/lroImpl.js.map +1 -1
  89. package/dist/react-native/models/mappers.js +218 -102
  90. package/dist/react-native/models/mappers.js.map +1 -1
  91. package/dist/react-native/operations/applicationOperations.js +23 -40
  92. package/dist/react-native/operations/applicationOperations.js.map +1 -1
  93. package/dist/react-native/operations/applicationPackageOperations.js +23 -40
  94. package/dist/react-native/operations/applicationPackageOperations.js.map +1 -1
  95. package/dist/react-native/operations/batchAccountOperations.js +111 -169
  96. package/dist/react-native/operations/batchAccountOperations.js.map +1 -1
  97. package/dist/react-native/operations/certificateOperations.js +34 -46
  98. package/dist/react-native/operations/certificateOperations.js.map +1 -1
  99. package/dist/react-native/operations/location.js +23 -40
  100. package/dist/react-native/operations/location.js.map +1 -1
  101. package/dist/react-native/operations/networkSecurityPerimeterOperations.js +34 -46
  102. package/dist/react-native/operations/networkSecurityPerimeterOperations.js.map +1 -1
  103. package/dist/react-native/operations/operations.js +23 -40
  104. package/dist/react-native/operations/operations.js.map +1 -1
  105. package/dist/react-native/operations/poolOperations.js +34 -46
  106. package/dist/react-native/operations/poolOperations.js.map +1 -1
  107. package/dist/react-native/operations/privateEndpointConnectionOperations.js +45 -52
  108. package/dist/react-native/operations/privateEndpointConnectionOperations.js.map +1 -1
  109. package/dist/react-native/operations/privateLinkResourceOperations.js +23 -40
  110. package/dist/react-native/operations/privateLinkResourceOperations.js.map +1 -1
  111. package/dist/react-native/pagingHelper.js +2 -4
  112. package/dist/react-native/pagingHelper.js.map +1 -1
  113. 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 PrivateLinkResourceOperations operations. */
15
14
  export class PrivateLinkResourceOperationsImpl {
15
+ client;
16
16
  /**
17
17
  * Initialize a new instance of the class PrivateLinkResourceOperations class.
18
18
  * @param client Reference to the service client
@@ -36,52 +36,35 @@ export class PrivateLinkResourceOperationsImpl {
36
36
  return this;
37
37
  },
38
38
  byPage: (settings) => {
39
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
39
+ if (settings?.maxPageSize) {
40
40
  throw new Error("maxPageSize is not supported by this operation.");
41
41
  }
42
42
  return this.listByBatchAccountPagingPage(resourceGroupName, accountName, options, settings);
43
43
  },
44
44
  };
45
45
  }
46
- listByBatchAccountPagingPage(resourceGroupName, accountName, options, settings) {
47
- return __asyncGenerator(this, arguments, function* listByBatchAccountPagingPage_1() {
48
- let result;
49
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
50
- if (!continuationToken) {
51
- result = yield __await(this._listByBatchAccount(resourceGroupName, accountName, options));
52
- let page = result.value || [];
53
- continuationToken = result.nextLink;
54
- setContinuationToken(page, continuationToken);
55
- yield yield __await(page);
56
- }
57
- while (continuationToken) {
58
- result = yield __await(this._listByBatchAccountNext(resourceGroupName, accountName, continuationToken, options));
59
- continuationToken = result.nextLink;
60
- let page = result.value || [];
61
- setContinuationToken(page, continuationToken);
62
- yield yield __await(page);
63
- }
64
- });
46
+ async *listByBatchAccountPagingPage(resourceGroupName, accountName, options, settings) {
47
+ let result;
48
+ let continuationToken = settings?.continuationToken;
49
+ if (!continuationToken) {
50
+ result = await this._listByBatchAccount(resourceGroupName, accountName, options);
51
+ let page = result.value || [];
52
+ continuationToken = result.nextLink;
53
+ setContinuationToken(page, continuationToken);
54
+ yield page;
55
+ }
56
+ while (continuationToken) {
57
+ result = await this._listByBatchAccountNext(resourceGroupName, accountName, continuationToken, options);
58
+ continuationToken = result.nextLink;
59
+ let page = result.value || [];
60
+ setContinuationToken(page, continuationToken);
61
+ yield page;
62
+ }
65
63
  }
66
- listByBatchAccountPagingAll(resourceGroupName, accountName, options) {
67
- return __asyncGenerator(this, arguments, function* listByBatchAccountPagingAll_1() {
68
- var _a, e_1, _b, _c;
69
- try {
70
- for (var _d = true, _e = __asyncValues(this.listByBatchAccountPagingPage(resourceGroupName, accountName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
71
- _c = _f.value;
72
- _d = false;
73
- const page = _c;
74
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
75
- }
76
- }
77
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
78
- finally {
79
- try {
80
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
81
- }
82
- finally { if (e_1) throw e_1.error; }
83
- }
84
- });
64
+ async *listByBatchAccountPagingAll(resourceGroupName, accountName, options) {
65
+ for await (const page of this.listByBatchAccountPagingPage(resourceGroupName, accountName, options)) {
66
+ yield* page;
67
+ }
85
68
  }
86
69
  /**
87
70
  * Lists all of the private link resources in the specified account.
@@ -1 +1 @@
1
- {"version":3,"file":"privateLinkResourceOperations.js","sourceRoot":"","sources":["../../../src/operations/privateLinkResourceOperations.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;AAYtD,4CAA4C;AAC5C,iEAAiE;AACjE,MAAM,OAAO,iCAAiC;IAK5C;;;OAGG;IACH,YAAY,MAA6B;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,kBAAkB,CACvB,iBAAyB,EACzB,WAAmB,EACnB,OAA6D;QAE7D,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,CAA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zB,UAAU,CAAC,YAAY;KACxB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EAAE,yKAAyK;IAC/K,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;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,uBAAuB;KACnC;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,8BAA8B;SACnD;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 { PrivateLinkResourceOperations } 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 PrivateLinkResource,\n PrivateLinkResourceListByBatchAccountNextOptionalParams,\n PrivateLinkResourceListByBatchAccountOptionalParams,\n PrivateLinkResourceListByBatchAccountResponse,\n PrivateLinkResourceGetOptionalParams,\n PrivateLinkResourceGetResponse,\n PrivateLinkResourceListByBatchAccountNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing PrivateLinkResourceOperations operations. */\nexport class PrivateLinkResourceOperationsImpl\n implements PrivateLinkResourceOperations\n{\n private readonly client: BatchManagementClient;\n\n /**\n * Initialize a new instance of the class PrivateLinkResourceOperations 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 private link resources 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 listByBatchAccount(\n resourceGroupName: string,\n accountName: string,\n options?: PrivateLinkResourceListByBatchAccountOptionalParams,\n ): PagedAsyncIterableIterator<PrivateLinkResource> {\n const iter = this.listByBatchAccountPagingAll(\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.listByBatchAccountPagingPage(\n resourceGroupName,\n accountName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByBatchAccountPagingPage(\n resourceGroupName: string,\n accountName: string,\n options?: PrivateLinkResourceListByBatchAccountOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<PrivateLinkResource[]> {\n let result: PrivateLinkResourceListByBatchAccountResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByBatchAccount(\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._listByBatchAccountNext(\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 *listByBatchAccountPagingAll(\n resourceGroupName: string,\n accountName: string,\n options?: PrivateLinkResourceListByBatchAccountOptionalParams,\n ): AsyncIterableIterator<PrivateLinkResource> {\n for await (const page of this.listByBatchAccountPagingPage(\n resourceGroupName,\n accountName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists all of the private link resources 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 _listByBatchAccount(\n resourceGroupName: string,\n accountName: string,\n options?: PrivateLinkResourceListByBatchAccountOptionalParams,\n ): Promise<PrivateLinkResourceListByBatchAccountResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, accountName, options },\n listByBatchAccountOperationSpec,\n );\n }\n\n /**\n * Gets information about the specified private link resource.\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 privateLinkResourceName The private link resource name. This must be unique within the\n * account.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n accountName: string,\n privateLinkResourceName: string,\n options?: PrivateLinkResourceGetOptionalParams,\n ): Promise<PrivateLinkResourceGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, accountName, privateLinkResourceName, options },\n getOperationSpec,\n );\n }\n\n /**\n * ListByBatchAccountNext\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 ListByBatchAccount method.\n * @param options The options parameters.\n */\n private _listByBatchAccountNext(\n resourceGroupName: string,\n accountName: string,\n nextLink: string,\n options?: PrivateLinkResourceListByBatchAccountNextOptionalParams,\n ): Promise<PrivateLinkResourceListByBatchAccountNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, accountName, nextLink, options },\n listByBatchAccountNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByBatchAccountOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateLinkResources\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListPrivateLinkResourcesResult,\n },\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.maxresults],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.accountName1,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateLinkResources/{privateLinkResourceName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PrivateLinkResource,\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.privateLinkResourceName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByBatchAccountNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListPrivateLinkResourcesResult,\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":"privateLinkResourceOperations.js","sourceRoot":"","sources":["../../../src/operations/privateLinkResourceOperations.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;AAYtD,4CAA4C;AAC5C,iEAAiE;AACjE,MAAM,OAAO,iCAAiC;IAG3B,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,OAA6D;QAE7D,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,EACnB,OAA6D,EAC7D,QAAuB;QAEvB,IAAI,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AAU;SAC/B;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,uBAAuB;KACnC;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,8BAA8B;SACnD;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 { PrivateLinkResourceOperations } 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 PrivateLinkResource,\n PrivateLinkResourceListByBatchAccountNextOptionalParams,\n PrivateLinkResourceListByBatchAccountOptionalParams,\n PrivateLinkResourceListByBatchAccountResponse,\n PrivateLinkResourceGetOptionalParams,\n PrivateLinkResourceGetResponse,\n PrivateLinkResourceListByBatchAccountNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing PrivateLinkResourceOperations operations. */\nexport class PrivateLinkResourceOperationsImpl\n implements PrivateLinkResourceOperations\n{\n private readonly client: BatchManagementClient;\n\n /**\n * Initialize a new instance of the class PrivateLinkResourceOperations 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 private link resources 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 listByBatchAccount(\n resourceGroupName: string,\n accountName: string,\n options?: PrivateLinkResourceListByBatchAccountOptionalParams,\n ): PagedAsyncIterableIterator<PrivateLinkResource> {\n const iter = this.listByBatchAccountPagingAll(\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.listByBatchAccountPagingPage(\n resourceGroupName,\n accountName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByBatchAccountPagingPage(\n resourceGroupName: string,\n accountName: string,\n options?: PrivateLinkResourceListByBatchAccountOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<PrivateLinkResource[]> {\n let result: PrivateLinkResourceListByBatchAccountResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByBatchAccount(\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._listByBatchAccountNext(\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 *listByBatchAccountPagingAll(\n resourceGroupName: string,\n accountName: string,\n options?: PrivateLinkResourceListByBatchAccountOptionalParams,\n ): AsyncIterableIterator<PrivateLinkResource> {\n for await (const page of this.listByBatchAccountPagingPage(\n resourceGroupName,\n accountName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists all of the private link resources 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 _listByBatchAccount(\n resourceGroupName: string,\n accountName: string,\n options?: PrivateLinkResourceListByBatchAccountOptionalParams,\n ): Promise<PrivateLinkResourceListByBatchAccountResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, accountName, options },\n listByBatchAccountOperationSpec,\n );\n }\n\n /**\n * Gets information about the specified private link resource.\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 privateLinkResourceName The private link resource name. This must be unique within the\n * account.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n accountName: string,\n privateLinkResourceName: string,\n options?: PrivateLinkResourceGetOptionalParams,\n ): Promise<PrivateLinkResourceGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, accountName, privateLinkResourceName, options },\n getOperationSpec,\n );\n }\n\n /**\n * ListByBatchAccountNext\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 ListByBatchAccount method.\n * @param options The options parameters.\n */\n private _listByBatchAccountNext(\n resourceGroupName: string,\n accountName: string,\n nextLink: string,\n options?: PrivateLinkResourceListByBatchAccountNextOptionalParams,\n ): Promise<PrivateLinkResourceListByBatchAccountNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, accountName, nextLink, options },\n listByBatchAccountNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByBatchAccountOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateLinkResources\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListPrivateLinkResourcesResult,\n },\n default: {\n bodyMapper: Mappers.CloudError,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.maxresults],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.accountName1,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateLinkResources/{privateLinkResourceName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PrivateLinkResource,\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.privateLinkResourceName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByBatchAccountNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListPrivateLinkResourcesResult,\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"]}
@@ -14,18 +14,16 @@ const pageMap = new WeakMap();
14
14
  * @returns The continuation token that can be passed into byPage() during future calls.
15
15
  */
16
16
  export function getContinuationToken(page) {
17
- var _a;
18
17
  if (typeof page !== "object" || page === null) {
19
18
  return undefined;
20
19
  }
21
- return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
20
+ return pageMap.get(page)?.continuationToken;
22
21
  }
23
22
  export function setContinuationToken(page, continuationToken) {
24
- var _a;
25
23
  if (typeof page !== "object" || page === null || !continuationToken) {
26
24
  return;
27
25
  }
28
- const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
26
+ const pageInfo = pageMap.get(page) ?? {};
29
27
  pageInfo.continuationToken = continuationToken;
30
28
  pageMap.set(page, pageInfo);
31
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa;;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,0CAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,IAAa,EACb,iBAAqC;;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpE,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,mCAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport interface PageInfo {\n continuationToken?: string;\n}\n\nconst pageMap = new WeakMap<object, PageInfo>();\n\n/**\n * Given the last `.value` produced by the `byPage` iterator,\n * returns a continuation token that can be used to begin paging from\n * that point later.\n * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.\n * @returns The continuation token that can be passed into byPage() during future calls.\n */\nexport function getContinuationToken(page: unknown): string | undefined {\n if (typeof page !== \"object\" || page === null) {\n return undefined;\n }\n return pageMap.get(page)?.continuationToken;\n}\n\nexport function setContinuationToken(\n page: unknown,\n continuationToken: string | undefined,\n): void {\n if (typeof page !== \"object\" || page === null || !continuationToken) {\n return;\n }\n const pageInfo = pageMap.get(page) ?? {};\n pageInfo.continuationToken = continuationToken;\n pageMap.set(page, pageInfo);\n}\n"]}
1
+ {"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,IAAa,EACb,iBAAqC;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpE,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport interface PageInfo {\n continuationToken?: string;\n}\n\nconst pageMap = new WeakMap<object, PageInfo>();\n\n/**\n * Given the last `.value` produced by the `byPage` iterator,\n * returns a continuation token that can be used to begin paging from\n * that point later.\n * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.\n * @returns The continuation token that can be passed into byPage() during future calls.\n */\nexport function getContinuationToken(page: unknown): string | undefined {\n if (typeof page !== \"object\" || page === null) {\n return undefined;\n }\n return pageMap.get(page)?.continuationToken;\n}\n\nexport function setContinuationToken(\n page: unknown,\n continuationToken: string | undefined,\n): void {\n if (typeof page !== \"object\" || page === null || !continuationToken) {\n return;\n }\n const pageInfo = pageMap.get(page) ?? {};\n pageInfo.continuationToken = continuationToken;\n pageMap.set(page, pageInfo);\n}\n"]}
@@ -13,6 +13,9 @@ const coreClient = tslib_1.__importStar(require("@azure/core-client"));
13
13
  const coreRestPipeline = tslib_1.__importStar(require("@azure/core-rest-pipeline"));
14
14
  const index_js_1 = require("./operations/index.js");
15
15
  class BatchManagementClient extends coreClient.ServiceClient {
16
+ $host;
17
+ apiVersion;
18
+ subscriptionId;
16
19
  /**
17
20
  * Initializes a new instance of the BatchManagementClient class.
18
21
  * @param credentials Subscription credentials which uniquely identify client subscription.
@@ -21,7 +24,6 @@ class BatchManagementClient extends coreClient.ServiceClient {
21
24
  * @param options The parameter options
22
25
  */
23
26
  constructor(credentials, subscriptionId, options) {
24
- var _a, _b, _c;
25
27
  if (credentials === undefined) {
26
28
  throw new Error("'credentials' cannot be null");
27
29
  }
@@ -40,12 +42,17 @@ class BatchManagementClient extends coreClient.ServiceClient {
40
42
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
41
43
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
42
44
  : `${packageDetails}`;
43
- const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
45
+ const optionsWithDefaults = {
46
+ ...defaults,
47
+ ...options,
48
+ userAgentOptions: {
44
49
  userAgentPrefix,
45
- }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
50
+ },
51
+ endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com",
52
+ };
46
53
  super(optionsWithDefaults);
47
54
  let bearerTokenAuthenticationPolicyFound = false;
48
- if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
55
+ if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
49
56
  const pipelinePolicies = options.pipeline.getOrderedPolicies();
50
57
  bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
51
58
  coreRestPipeline.bearerTokenAuthenticationPolicyName);
@@ -59,7 +66,8 @@ class BatchManagementClient extends coreClient.ServiceClient {
59
66
  });
60
67
  this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
61
68
  credential: credentials,
62
- scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
69
+ scopes: optionsWithDefaults.credentialScopes ??
70
+ `${optionsWithDefaults.endpoint}/.default`,
63
71
  challengeCallbacks: {
64
72
  authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge,
65
73
  },
@@ -109,6 +117,16 @@ class BatchManagementClient extends coreClient.ServiceClient {
109
117
  };
110
118
  this.pipeline.addPolicy(apiVersionPolicy);
111
119
  }
120
+ batchAccountOperations;
121
+ applicationPackageOperations;
122
+ applicationOperations;
123
+ location;
124
+ operations;
125
+ certificateOperations;
126
+ privateLinkResourceOperations;
127
+ privateEndpointConnectionOperations;
128
+ poolOperations;
129
+ networkSecurityPerimeterOperations;
112
130
  }
113
131
  exports.BatchManagementClient = BatchManagementClient;
114
132
  //# sourceMappingURL=batchManagementClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"batchManagementClient.js","sourceRoot":"","sources":["../../src/batchManagementClient.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AACjD,oFAA8D;AAO9D,oDAW+B;AAe/B,MAAa,qBAAsB,SAAQ,UAAU,CAAC,aAAa;IAKjE;;;;;;OAMG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAA6C;;QAE7C,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAwC;YACpD,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,WAAW;SACxB,CAAC;QAEF,MAAM,cAAc,GAAG,2BAA2B,CAAC;QACnD,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,QAAQ,EACN,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,8BAA8B,GACxE,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAE3B,IAAI,oCAAoC,GAAY,KAAK,CAAC;QAC1D,IAAI,CAAA,OAAO,aAAP,OAA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AC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAYF;AAjJD,sDAiJC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n BatchAccountOperationsImpl,\n ApplicationPackageOperationsImpl,\n ApplicationOperationsImpl,\n LocationImpl,\n OperationsImpl,\n CertificateOperationsImpl,\n PrivateLinkResourceOperationsImpl,\n PrivateEndpointConnectionOperationsImpl,\n PoolOperationsImpl,\n NetworkSecurityPerimeterOperationsImpl,\n} from \"./operations/index.js\";\nimport {\n BatchAccountOperations,\n ApplicationPackageOperations,\n ApplicationOperations,\n Location,\n Operations,\n CertificateOperations,\n PrivateLinkResourceOperations,\n PrivateEndpointConnectionOperations,\n PoolOperations,\n NetworkSecurityPerimeterOperations,\n} from \"./operationsInterfaces/index.js\";\nimport { BatchManagementClientOptionalParams } from \"./models/index.js\";\n\nexport class BatchManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the BatchManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g.\n * 00000000-0000-0000-0000-000000000000)\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: BatchManagementClientOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: BatchManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-batch/10.0.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName,\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName,\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge,\n },\n }),\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2024-07-01\";\n this.batchAccountOperations = new BatchAccountOperationsImpl(this);\n this.applicationPackageOperations = new ApplicationPackageOperationsImpl(\n this,\n );\n this.applicationOperations = new ApplicationOperationsImpl(this);\n this.location = new LocationImpl(this);\n this.operations = new OperationsImpl(this);\n this.certificateOperations = new CertificateOperationsImpl(this);\n this.privateLinkResourceOperations = new PrivateLinkResourceOperationsImpl(\n this,\n );\n this.privateEndpointConnectionOperations =\n new PrivateEndpointConnectionOperationsImpl(this);\n this.poolOperations = new PoolOperationsImpl(this);\n this.networkSecurityPerimeterOperations =\n new NetworkSecurityPerimeterOperationsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest,\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n },\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n batchAccountOperations: BatchAccountOperations;\n applicationPackageOperations: ApplicationPackageOperations;\n applicationOperations: ApplicationOperations;\n location: Location;\n operations: Operations;\n certificateOperations: CertificateOperations;\n privateLinkResourceOperations: PrivateLinkResourceOperations;\n privateEndpointConnectionOperations: PrivateEndpointConnectionOperations;\n poolOperations: PoolOperations;\n networkSecurityPerimeterOperations: NetworkSecurityPerimeterOperations;\n}\n"]}
1
+ {"version":3,"file":"batchManagementClient.js","sourceRoot":"","s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O,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;IAED,sBAAsB,CAAyB;IAC/C,4BAA4B,CAA+B;IAC3D,qBAAqB,CAAwB;IAC7C,QAAQ,CAAW;IACnB,UAAU,CAAa;IACvB,qBAAqB,CAAwB;IAC7C,6BAA6B,CAAgC;IAC7D,mCAAmC,CAAsC;IACzE,cAAc,CAAiB;IAC/B,kCAAkC,CAAqC;CACxE;AAjJD,sDAiJC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n BatchAccountOperationsImpl,\n ApplicationPackageOperationsImpl,\n ApplicationOperationsImpl,\n LocationImpl,\n OperationsImpl,\n CertificateOperationsImpl,\n PrivateLinkResourceOperationsImpl,\n PrivateEndpointConnectionOperationsImpl,\n PoolOperationsImpl,\n NetworkSecurityPerimeterOperationsImpl,\n} from \"./operations/index.js\";\nimport {\n BatchAccountOperations,\n ApplicationPackageOperations,\n ApplicationOperations,\n Location,\n Operations,\n CertificateOperations,\n PrivateLinkResourceOperations,\n PrivateEndpointConnectionOperations,\n PoolOperations,\n NetworkSecurityPerimeterOperations,\n} from \"./operationsInterfaces/index.js\";\nimport { BatchManagementClientOptionalParams } from \"./models/index.js\";\n\nexport class BatchManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the BatchManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g.\n * 00000000-0000-0000-0000-000000000000)\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: BatchManagementClientOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: BatchManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-batch/10.0.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName,\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName,\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge,\n },\n }),\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2024-07-01\";\n this.batchAccountOperations = new BatchAccountOperationsImpl(this);\n this.applicationPackageOperations = new ApplicationPackageOperationsImpl(\n this,\n );\n this.applicationOperations = new ApplicationOperationsImpl(this);\n this.location = new LocationImpl(this);\n this.operations = new OperationsImpl(this);\n this.certificateOperations = new CertificateOperationsImpl(this);\n this.privateLinkResourceOperations = new PrivateLinkResourceOperationsImpl(\n this,\n );\n this.privateEndpointConnectionOperations =\n new PrivateEndpointConnectionOperationsImpl(this);\n this.poolOperations = new PoolOperationsImpl(this);\n this.networkSecurityPerimeterOperations =\n new NetworkSecurityPerimeterOperationsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest,\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n },\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n batchAccountOperations: BatchAccountOperations;\n applicationPackageOperations: ApplicationPackageOperations;\n applicationOperations: ApplicationOperations;\n location: Location;\n operations: Operations;\n certificateOperations: CertificateOperations;\n privateLinkResourceOperations: PrivateLinkResourceOperations;\n privateEndpointConnectionOperations: PrivateEndpointConnectionOperations;\n poolOperations: PoolOperations;\n networkSecurityPerimeterOperations: NetworkSecurityPerimeterOperations;\n}\n"]}
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createLroSpec = createLroSpec;
4
- const tslib_1 = require("tslib");
5
4
  function createLroSpec(inputs) {
6
5
  const { args, spec, sendOperationFn } = inputs;
7
6
  return {
@@ -9,8 +8,13 @@ function createLroSpec(inputs) {
9
8
  requestPath: spec.path,
10
9
  sendInitialRequest: () => sendOperationFn(args, spec),
11
10
  sendPollRequest: (path, options) => {
12
- const { requestBody } = spec, restSpec = tslib_1.__rest(spec, ["requestBody"]);
13
- return sendOperationFn(args, Object.assign(Object.assign({}, restSpec), { httpMethod: "GET", path, abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal }));
11
+ const { requestBody, ...restSpec } = spec;
12
+ return sendOperationFn(args, {
13
+ ...restSpec,
14
+ httpMethod: "GET",
15
+ path,
16
+ abortSignal: options?.abortSignal,
17
+ });
14
18
  },
15
19
  };
16
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":";;AAUA,sCA2BC;;AA3BD,SAAgB,aAAa,CAAI,MAQhC;IACC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;IAC/C,OAAO;QACL,aAAa,EAAE,IAAI,CAAC,UAAU;QAC9B,WAAW,EAAE,IAAI,CAAC,IAAK;QACvB,kBAAkB,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC;QACrD,eAAe,EAAE,CACf,IAAY,EACZ,OAA2C,EAC3C,EAAE;YACF,MAAM,EAAE,WAAW,KAAkB,IAAI,EAAjB,QAAQ,kBAAK,IAAI,EAAnC,eAA4B,CAAO,CAAC;YAC1C,OAAO,eAAe,CAAC,IAAI,kCACtB,QAAQ,KACX,UAAU,EAAE,KAAK,EACjB,IAAI,EACJ,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,IACjC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,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 */\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { LongRunningOperation, LroResponse } from \"@azure/core-lro\";\n\nexport function createLroSpec<T>(inputs: {\n sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>;\n args: Record<string, unknown>;\n spec: {\n readonly requestBody?: unknown;\n readonly path?: string;\n readonly httpMethod: string;\n } & Record<string, any>;\n}): LongRunningOperation<T> {\n const { args, spec, sendOperationFn } = inputs;\n return {\n requestMethod: spec.httpMethod,\n requestPath: spec.path!,\n sendInitialRequest: () => sendOperationFn(args, spec),\n sendPollRequest: (\n path: string,\n options?: { abortSignal?: AbortSignalLike },\n ) => {\n const { requestBody, ...restSpec } = spec;\n return sendOperationFn(args, {\n ...restSpec,\n httpMethod: \"GET\",\n path,\n abortSignal: options?.abortSignal,\n });\n },\n };\n}\n"]}
1
+ {"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":";;AAUA,sCA2BC;AA3BD,SAAgB,aAAa,CAAI,MAQhC;IACC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;IAC/C,OAAO;QACL,aAAa,EAAE,IAAI,CAAC,UAAU;QAC9B,WAAW,EAAE,IAAI,CAAC,IAAK;QACvB,kBAAkB,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC;QACrD,eAAe,EAAE,CACf,IAAY,EACZ,OAA2C,EAC3C,EAAE;YACF,MAAM,EAAE,WAAW,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC;YAC1C,OAAO,eAAe,CAAC,IAAI,EAAE;gBAC3B,GAAG,QAAQ;gBACX,UAAU,EAAE,KAAK;gBACjB,IAAI;gBACJ,WAAW,EAAE,OAAO,EAAE,WAAW;aAClC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,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 */\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { LongRunningOperation, LroResponse } from \"@azure/core-lro\";\n\nexport function createLroSpec<T>(inputs: {\n sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>;\n args: Record<string, unknown>;\n spec: {\n readonly requestBody?: unknown;\n readonly path?: string;\n readonly httpMethod: string;\n } & Record<string, any>;\n}): LongRunningOperation<T> {\n const { args, spec, sendOperationFn } = inputs;\n return {\n requestMethod: spec.httpMethod,\n requestPath: spec.path!,\n sendInitialRequest: () => sendOperationFn(args, spec),\n sendPollRequest: (\n path: string,\n options?: { abortSignal?: AbortSignalLike },\n ) => {\n const { requestBody, ...restSpec } = spec;\n return sendOperationFn(args, {\n ...restSpec,\n httpMethod: \"GET\",\n path,\n abortSignal: options?.abortSignal,\n });\n },\n };\n}\n"]}