@azure/arm-batch 7.2.1-alpha.20221101.1 → 8.0.0

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 (124) hide show
  1. package/CHANGELOG.md +16 -8
  2. package/dist/index.js +337 -126
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist-esm/samples-dev/applicationCreateSample.js +1 -1
  7. package/dist-esm/samples-dev/applicationDeleteSample.js +1 -1
  8. package/dist-esm/samples-dev/applicationGetSample.js +1 -1
  9. package/dist-esm/samples-dev/applicationListSample.js +1 -1
  10. package/dist-esm/samples-dev/applicationPackageActivateSample.js +1 -1
  11. package/dist-esm/samples-dev/applicationPackageCreateSample.js +1 -1
  12. package/dist-esm/samples-dev/applicationPackageDeleteSample.js +1 -1
  13. package/dist-esm/samples-dev/applicationPackageGetSample.js +1 -1
  14. package/dist-esm/samples-dev/applicationPackageListSample.js +1 -1
  15. package/dist-esm/samples-dev/applicationUpdateSample.js +1 -1
  16. package/dist-esm/samples-dev/batchAccountCreateSample.js +5 -5
  17. package/dist-esm/samples-dev/batchAccountDeleteSample.js +1 -1
  18. package/dist-esm/samples-dev/batchAccountGetDetectorSample.js +1 -1
  19. package/dist-esm/samples-dev/batchAccountGetKeysSample.js +1 -1
  20. package/dist-esm/samples-dev/batchAccountGetSample.js +2 -2
  21. package/dist-esm/samples-dev/batchAccountListByResourceGroupSample.js +1 -1
  22. package/dist-esm/samples-dev/batchAccountListDetectorsSample.js +1 -1
  23. package/dist-esm/samples-dev/batchAccountListOutboundNetworkDependenciesEndpointsSample.js +3 -3
  24. package/dist-esm/samples-dev/batchAccountListSample.js +1 -1
  25. package/dist-esm/samples-dev/batchAccountRegenerateKeySample.js +1 -1
  26. package/dist-esm/samples-dev/batchAccountSynchronizeAutoStorageKeysSample.js +1 -1
  27. package/dist-esm/samples-dev/batchAccountUpdateSample.js +1 -1
  28. package/dist-esm/samples-dev/certificateCancelDeletionSample.js +5 -1
  29. package/dist-esm/samples-dev/certificateCancelDeletionSample.js.map +1 -1
  30. package/dist-esm/samples-dev/certificateCreateSample.js +9 -9
  31. package/dist-esm/samples-dev/certificateDeleteSample.js +3 -3
  32. package/dist-esm/samples-dev/certificateGetSample.js +6 -6
  33. package/dist-esm/samples-dev/certificateListByBatchAccountSample.js +6 -6
  34. package/dist-esm/samples-dev/certificateUpdateSample.js +3 -3
  35. package/dist-esm/samples-dev/locationCheckNameAvailabilitySample.js +2 -2
  36. package/dist-esm/samples-dev/locationGetQuotasSample.js +1 -1
  37. package/dist-esm/samples-dev/locationListSupportedCloudServiceSkusSample.js +1 -1
  38. package/dist-esm/samples-dev/locationListSupportedVirtualMachineSkusSample.js +1 -1
  39. package/dist-esm/samples-dev/operationsListSample.js +1 -1
  40. package/dist-esm/samples-dev/poolCreateSample.js +11 -10
  41. package/dist-esm/samples-dev/poolCreateSample.js.map +1 -1
  42. package/dist-esm/samples-dev/poolDeleteSample.js +1 -1
  43. package/dist-esm/samples-dev/poolDisableAutoScaleSample.js +1 -1
  44. package/dist-esm/samples-dev/poolGetSample.js +2 -2
  45. package/dist-esm/samples-dev/poolListByBatchAccountSample.js +2 -2
  46. package/dist-esm/samples-dev/poolStopResizeSample.js +1 -1
  47. package/dist-esm/samples-dev/poolUpdateSample.js +6 -5
  48. package/dist-esm/samples-dev/poolUpdateSample.js.map +1 -1
  49. package/dist-esm/samples-dev/privateEndpointConnectionDeleteSample.js +1 -1
  50. package/dist-esm/samples-dev/privateEndpointConnectionGetSample.js +1 -1
  51. package/dist-esm/samples-dev/privateEndpointConnectionListByBatchAccountSample.js +1 -1
  52. package/dist-esm/samples-dev/privateEndpointConnectionUpdateSample.js +1 -1
  53. package/dist-esm/samples-dev/privateLinkResourceGetSample.js +1 -1
  54. package/dist-esm/samples-dev/privateLinkResourceListByBatchAccountSample.js +1 -1
  55. package/dist-esm/src/batchManagementClient.d.ts.map +1 -1
  56. package/dist-esm/src/batchManagementClient.js +21 -19
  57. package/dist-esm/src/batchManagementClient.js.map +1 -1
  58. package/dist-esm/src/index.d.ts +1 -0
  59. package/dist-esm/src/index.d.ts.map +1 -1
  60. package/dist-esm/src/index.js +1 -0
  61. package/dist-esm/src/index.js.map +1 -1
  62. package/dist-esm/src/models/index.d.ts +20 -7
  63. package/dist-esm/src/models/index.d.ts.map +1 -1
  64. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  65. package/dist-esm/src/models/mappers.js +21 -6
  66. package/dist-esm/src/models/mappers.js.map +1 -1
  67. package/dist-esm/src/models/parameters.js +1 -1
  68. package/dist-esm/src/operations/applicationOperations.d.ts.map +1 -1
  69. package/dist-esm/src/operations/applicationOperations.js +19 -7
  70. package/dist-esm/src/operations/applicationOperations.js.map +1 -1
  71. package/dist-esm/src/operations/applicationPackageOperations.d.ts.map +1 -1
  72. package/dist-esm/src/operations/applicationPackageOperations.js +19 -7
  73. package/dist-esm/src/operations/applicationPackageOperations.js.map +1 -1
  74. package/dist-esm/src/operations/batchAccountOperations.d.ts +2 -2
  75. package/dist-esm/src/operations/batchAccountOperations.d.ts.map +1 -1
  76. package/dist-esm/src/operations/batchAccountOperations.js +75 -30
  77. package/dist-esm/src/operations/batchAccountOperations.js.map +1 -1
  78. package/dist-esm/src/operations/certificateOperations.d.ts +25 -7
  79. package/dist-esm/src/operations/certificateOperations.d.ts.map +1 -1
  80. package/dist-esm/src/operations/certificateOperations.js +44 -14
  81. package/dist-esm/src/operations/certificateOperations.js.map +1 -1
  82. package/dist-esm/src/operations/location.d.ts.map +1 -1
  83. package/dist-esm/src/operations/location.js +37 -14
  84. package/dist-esm/src/operations/location.js.map +1 -1
  85. package/dist-esm/src/operations/operations.d.ts.map +1 -1
  86. package/dist-esm/src/operations/operations.js +19 -7
  87. package/dist-esm/src/operations/operations.js.map +1 -1
  88. package/dist-esm/src/operations/poolOperations.d.ts.map +1 -1
  89. package/dist-esm/src/operations/poolOperations.js +19 -7
  90. package/dist-esm/src/operations/poolOperations.js.map +1 -1
  91. package/dist-esm/src/operations/privateEndpointConnectionOperations.d.ts.map +1 -1
  92. package/dist-esm/src/operations/privateEndpointConnectionOperations.js +19 -7
  93. package/dist-esm/src/operations/privateEndpointConnectionOperations.js.map +1 -1
  94. package/dist-esm/src/operations/privateLinkResourceOperations.d.ts.map +1 -1
  95. package/dist-esm/src/operations/privateLinkResourceOperations.js +19 -7
  96. package/dist-esm/src/operations/privateLinkResourceOperations.js.map +1 -1
  97. package/dist-esm/src/operationsInterfaces/batchAccountOperations.d.ts +1 -1
  98. package/dist-esm/src/operationsInterfaces/certificateOperations.d.ts +22 -6
  99. package/dist-esm/src/operationsInterfaces/certificateOperations.d.ts.map +1 -1
  100. package/dist-esm/src/pagingHelper.d.ts +13 -0
  101. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  102. package/dist-esm/src/pagingHelper.js +32 -0
  103. package/dist-esm/src/pagingHelper.js.map +1 -0
  104. package/dist-esm/test/batch_examples.js +1 -1
  105. package/package.json +6 -5
  106. package/review/arm-batch.api.md +11 -3
  107. package/src/batchManagementClient.ts +27 -21
  108. package/src/index.ts +1 -0
  109. package/src/models/index.ts +20 -7
  110. package/src/models/mappers.ts +23 -6
  111. package/src/models/parameters.ts +1 -1
  112. package/src/operations/applicationOperations.ts +27 -9
  113. package/src/operations/applicationPackageOperations.ts +28 -14
  114. package/src/operations/batchAccountOperations.ts +98 -43
  115. package/src/operations/certificateOperations.ts +51 -19
  116. package/src/operations/location.ts +47 -23
  117. package/src/operations/operations.ts +21 -8
  118. package/src/operations/poolOperations.ts +26 -12
  119. package/src/operations/privateEndpointConnectionOperations.ts +26 -12
  120. package/src/operations/privateLinkResourceOperations.ts +26 -12
  121. package/src/operationsInterfaces/batchAccountOperations.ts +1 -1
  122. package/src/operationsInterfaces/certificateOperations.ts +22 -6
  123. package/src/pagingHelper.ts +39 -0
  124. package/types/arm-batch.d.ts +53 -14
package/dist/index.js CHANGED
@@ -28,6 +28,38 @@ function _interopNamespace(e) {
28
28
  var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
29
29
  var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
30
30
 
31
+ /*
32
+ * Copyright (c) Microsoft Corporation.
33
+ * Licensed under the MIT License.
34
+ *
35
+ * Code generated by Microsoft (R) AutoRest Code Generator.
36
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
37
+ */
38
+ const pageMap = new WeakMap();
39
+ /**
40
+ * Given a result page from a pageable operation, returns a
41
+ * continuation token that can be used to begin paging from
42
+ * that point later.
43
+ * @param page A result object from calling .byPage() on a paged operation.
44
+ * @returns The continuation token that can be passed into byPage().
45
+ */
46
+ function getContinuationToken(page) {
47
+ var _a;
48
+ if (typeof page !== "object" || page === null) {
49
+ return undefined;
50
+ }
51
+ return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
52
+ }
53
+ function setContinuationToken(page, continuationToken) {
54
+ var _a;
55
+ if (typeof page !== "object" || page === null || !continuationToken) {
56
+ return;
57
+ }
58
+ const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
59
+ pageInfo.continuationToken = continuationToken;
60
+ pageMap.set(page, pageInfo);
61
+ }
62
+
31
63
  /*
32
64
  * Copyright (c) Microsoft Corporation.
33
65
  * Licensed under the MIT License.
@@ -390,8 +422,8 @@ const PrivateLinkServiceConnectionState = {
390
422
  name: "String"
391
423
  }
392
424
  },
393
- actionRequired: {
394
- serializedName: "actionRequired",
425
+ actionsRequired: {
426
+ serializedName: "actionsRequired",
395
427
  readOnly: true,
396
428
  type: {
397
429
  name: "String"
@@ -1781,8 +1813,8 @@ const NetworkConfiguration = {
1781
1813
  name: "String"
1782
1814
  }
1783
1815
  },
1784
- dynamicVNetAssignmentScope: {
1785
- serializedName: "dynamicVNetAssignmentScope",
1816
+ dynamicVnetAssignmentScope: {
1817
+ serializedName: "dynamicVnetAssignmentScope",
1786
1818
  type: {
1787
1819
  name: "Enum",
1788
1820
  allowedValues: ["none", "job"]
@@ -2559,8 +2591,8 @@ const CifsMountConfiguration = {
2559
2591
  name: "Composite",
2560
2592
  className: "CifsMountConfiguration",
2561
2593
  modelProperties: {
2562
- username: {
2563
- serializedName: "username",
2594
+ userName: {
2595
+ serializedName: "userName",
2564
2596
  required: true,
2565
2597
  type: {
2566
2598
  name: "String"
@@ -3214,6 +3246,20 @@ const Pool = {
3214
3246
  }
3215
3247
  }
3216
3248
  }
3249
+ }, targetNodeCommunicationMode: {
3250
+ serializedName: "properties.targetNodeCommunicationMode",
3251
+ type: {
3252
+ name: "Enum",
3253
+ allowedValues: ["Default", "Classic", "Simplified"]
3254
+ }
3255
+ }, currentNodeCommunicationMode: {
3256
+ serializedName: "properties.currentNodeCommunicationMode",
3257
+ readOnly: true,
3258
+ nullable: true,
3259
+ type: {
3260
+ name: "Enum",
3261
+ allowedValues: ["Default", "Classic", "Simplified"]
3262
+ }
3217
3263
  } })
3218
3264
  }
3219
3265
  };
@@ -3353,6 +3399,7 @@ const BatchAccount = {
3353
3399
  }, allowedAuthenticationModes: {
3354
3400
  serializedName: "properties.allowedAuthenticationModes",
3355
3401
  readOnly: true,
3402
+ nullable: true,
3356
3403
  type: {
3357
3404
  name: "Sequence",
3358
3405
  element: {
@@ -3867,7 +3914,7 @@ const accountName = {
3867
3914
  const apiVersion = {
3868
3915
  parameterPath: "apiVersion",
3869
3916
  mapper: {
3870
- defaultValue: "2022-06-01",
3917
+ defaultValue: "2022-10-01",
3871
3918
  isConstant: true,
3872
3919
  serializedName: "api-version",
3873
3920
  type: {
@@ -4165,20 +4212,31 @@ class BatchAccountOperationsImpl {
4165
4212
  [Symbol.asyncIterator]() {
4166
4213
  return this;
4167
4214
  },
4168
- byPage: () => {
4169
- return this.listPagingPage(options);
4215
+ byPage: (settings) => {
4216
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
4217
+ throw new Error("maxPageSize is not supported by this operation.");
4218
+ }
4219
+ return this.listPagingPage(options, settings);
4170
4220
  }
4171
4221
  };
4172
4222
  }
4173
- listPagingPage(options) {
4223
+ listPagingPage(options, settings) {
4174
4224
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
4175
- let result = yield tslib.__await(this._list(options));
4176
- yield yield tslib.__await(result.value || []);
4177
- let continuationToken = result.nextLink;
4225
+ let result;
4226
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
4227
+ if (!continuationToken) {
4228
+ result = yield tslib.__await(this._list(options));
4229
+ let page = result.value || [];
4230
+ continuationToken = result.nextLink;
4231
+ setContinuationToken(page, continuationToken);
4232
+ yield yield tslib.__await(page);
4233
+ }
4178
4234
  while (continuationToken) {
4179
4235
  result = yield tslib.__await(this._listNext(continuationToken, options));
4180
4236
  continuationToken = result.nextLink;
4181
- yield yield tslib.__await(result.value || []);
4237
+ let page = result.value || [];
4238
+ setContinuationToken(page, continuationToken);
4239
+ yield yield tslib.__await(page);
4182
4240
  }
4183
4241
  });
4184
4242
  }
@@ -4214,20 +4272,31 @@ class BatchAccountOperationsImpl {
4214
4272
  [Symbol.asyncIterator]() {
4215
4273
  return this;
4216
4274
  },
4217
- byPage: () => {
4218
- return this.listByResourceGroupPagingPage(resourceGroupName, options);
4275
+ byPage: (settings) => {
4276
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
4277
+ throw new Error("maxPageSize is not supported by this operation.");
4278
+ }
4279
+ return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
4219
4280
  }
4220
4281
  };
4221
4282
  }
4222
- listByResourceGroupPagingPage(resourceGroupName, options) {
4283
+ listByResourceGroupPagingPage(resourceGroupName, options, settings) {
4223
4284
  return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
4224
- let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
4225
- yield yield tslib.__await(result.value || []);
4226
- let continuationToken = result.nextLink;
4285
+ let result;
4286
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
4287
+ if (!continuationToken) {
4288
+ result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
4289
+ let page = result.value || [];
4290
+ continuationToken = result.nextLink;
4291
+ setContinuationToken(page, continuationToken);
4292
+ yield yield tslib.__await(page);
4293
+ }
4227
4294
  while (continuationToken) {
4228
4295
  result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
4229
4296
  continuationToken = result.nextLink;
4230
- yield yield tslib.__await(result.value || []);
4297
+ let page = result.value || [];
4298
+ setContinuationToken(page, continuationToken);
4299
+ yield yield tslib.__await(page);
4231
4300
  }
4232
4301
  });
4233
4302
  }
@@ -4264,20 +4333,31 @@ class BatchAccountOperationsImpl {
4264
4333
  [Symbol.asyncIterator]() {
4265
4334
  return this;
4266
4335
  },
4267
- byPage: () => {
4268
- return this.listDetectorsPagingPage(resourceGroupName, accountName, options);
4336
+ byPage: (settings) => {
4337
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
4338
+ throw new Error("maxPageSize is not supported by this operation.");
4339
+ }
4340
+ return this.listDetectorsPagingPage(resourceGroupName, accountName, options, settings);
4269
4341
  }
4270
4342
  };
4271
4343
  }
4272
- listDetectorsPagingPage(resourceGroupName, accountName, options) {
4344
+ listDetectorsPagingPage(resourceGroupName, accountName, options, settings) {
4273
4345
  return tslib.__asyncGenerator(this, arguments, function* listDetectorsPagingPage_1() {
4274
- let result = yield tslib.__await(this._listDetectors(resourceGroupName, accountName, options));
4275
- yield yield tslib.__await(result.value || []);
4276
- let continuationToken = result.nextLink;
4346
+ let result;
4347
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
4348
+ if (!continuationToken) {
4349
+ result = yield tslib.__await(this._listDetectors(resourceGroupName, accountName, options));
4350
+ let page = result.value || [];
4351
+ continuationToken = result.nextLink;
4352
+ setContinuationToken(page, continuationToken);
4353
+ yield yield tslib.__await(page);
4354
+ }
4277
4355
  while (continuationToken) {
4278
4356
  result = yield tslib.__await(this._listDetectorsNext(resourceGroupName, accountName, continuationToken, options));
4279
4357
  continuationToken = result.nextLink;
4280
- yield yield tslib.__await(result.value || []);
4358
+ let page = result.value || [];
4359
+ setContinuationToken(page, continuationToken);
4360
+ yield yield tslib.__await(page);
4281
4361
  }
4282
4362
  });
4283
4363
  }
@@ -4305,7 +4385,7 @@ class BatchAccountOperationsImpl {
4305
4385
  * you must make sure your network allows outbound access to these endpoints. Failure to allow access
4306
4386
  * to these endpoints may cause Batch to mark the affected nodes as unusable. For more information
4307
4387
  * about creating a pool inside of a virtual network, see
4308
- * https://docs.microsoft.com/azure/batch/batch-virtual-network
4388
+ * https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network.
4309
4389
  * @param resourceGroupName The name of the resource group that contains the Batch account.
4310
4390
  * @param accountName The name of the Batch account.
4311
4391
  * @param options The options parameters.
@@ -4319,20 +4399,31 @@ class BatchAccountOperationsImpl {
4319
4399
  [Symbol.asyncIterator]() {
4320
4400
  return this;
4321
4401
  },
4322
- byPage: () => {
4323
- return this.listOutboundNetworkDependenciesEndpointsPagingPage(resourceGroupName, accountName, options);
4402
+ byPage: (settings) => {
4403
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
4404
+ throw new Error("maxPageSize is not supported by this operation.");
4405
+ }
4406
+ return this.listOutboundNetworkDependenciesEndpointsPagingPage(resourceGroupName, accountName, options, settings);
4324
4407
  }
4325
4408
  };
4326
4409
  }
4327
- listOutboundNetworkDependenciesEndpointsPagingPage(resourceGroupName, accountName, options) {
4410
+ listOutboundNetworkDependenciesEndpointsPagingPage(resourceGroupName, accountName, options, settings) {
4328
4411
  return tslib.__asyncGenerator(this, arguments, function* listOutboundNetworkDependenciesEndpointsPagingPage_1() {
4329
- let result = yield tslib.__await(this._listOutboundNetworkDependenciesEndpoints(resourceGroupName, accountName, options));
4330
- yield yield tslib.__await(result.value || []);
4331
- let continuationToken = result.nextLink;
4412
+ let result;
4413
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
4414
+ if (!continuationToken) {
4415
+ result = yield tslib.__await(this._listOutboundNetworkDependenciesEndpoints(resourceGroupName, accountName, options));
4416
+ let page = result.value || [];
4417
+ continuationToken = result.nextLink;
4418
+ setContinuationToken(page, continuationToken);
4419
+ yield yield tslib.__await(page);
4420
+ }
4332
4421
  while (continuationToken) {
4333
4422
  result = yield tslib.__await(this._listOutboundNetworkDependenciesEndpointsNext(resourceGroupName, accountName, continuationToken, options));
4334
4423
  continuationToken = result.nextLink;
4335
- yield yield tslib.__await(result.value || []);
4424
+ let page = result.value || [];
4425
+ setContinuationToken(page, continuationToken);
4426
+ yield yield tslib.__await(page);
4336
4427
  }
4337
4428
  });
4338
4429
  }
@@ -4562,7 +4653,7 @@ class BatchAccountOperationsImpl {
4562
4653
  * you must make sure your network allows outbound access to these endpoints. Failure to allow access
4563
4654
  * to these endpoints may cause Batch to mark the affected nodes as unusable. For more information
4564
4655
  * about creating a pool inside of a virtual network, see
4565
- * https://docs.microsoft.com/azure/batch/batch-virtual-network
4656
+ * https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network.
4566
4657
  * @param resourceGroupName The name of the resource group that contains the Batch account.
4567
4658
  * @param accountName The name of the Batch account.
4568
4659
  * @param options The options parameters.
@@ -4991,20 +5082,31 @@ class ApplicationPackageOperationsImpl {
4991
5082
  [Symbol.asyncIterator]() {
4992
5083
  return this;
4993
5084
  },
4994
- byPage: () => {
4995
- return this.listPagingPage(resourceGroupName, accountName, applicationName, options);
5085
+ byPage: (settings) => {
5086
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
5087
+ throw new Error("maxPageSize is not supported by this operation.");
5088
+ }
5089
+ return this.listPagingPage(resourceGroupName, accountName, applicationName, options, settings);
4996
5090
  }
4997
5091
  };
4998
5092
  }
4999
- listPagingPage(resourceGroupName, accountName, applicationName, options) {
5093
+ listPagingPage(resourceGroupName, accountName, applicationName, options, settings) {
5000
5094
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
5001
- let result = yield tslib.__await(this._list(resourceGroupName, accountName, applicationName, options));
5002
- yield yield tslib.__await(result.value || []);
5003
- let continuationToken = result.nextLink;
5095
+ let result;
5096
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
5097
+ if (!continuationToken) {
5098
+ result = yield tslib.__await(this._list(resourceGroupName, accountName, applicationName, options));
5099
+ let page = result.value || [];
5100
+ continuationToken = result.nextLink;
5101
+ setContinuationToken(page, continuationToken);
5102
+ yield yield tslib.__await(page);
5103
+ }
5004
5104
  while (continuationToken) {
5005
5105
  result = yield tslib.__await(this._listNext(resourceGroupName, accountName, applicationName, continuationToken, options));
5006
5106
  continuationToken = result.nextLink;
5007
- yield yield tslib.__await(result.value || []);
5107
+ let page = result.value || [];
5108
+ setContinuationToken(page, continuationToken);
5109
+ yield yield tslib.__await(page);
5008
5110
  }
5009
5111
  });
5010
5112
  }
@@ -5280,20 +5382,31 @@ class ApplicationOperationsImpl {
5280
5382
  [Symbol.asyncIterator]() {
5281
5383
  return this;
5282
5384
  },
5283
- byPage: () => {
5284
- return this.listPagingPage(resourceGroupName, accountName, options);
5385
+ byPage: (settings) => {
5386
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
5387
+ throw new Error("maxPageSize is not supported by this operation.");
5388
+ }
5389
+ return this.listPagingPage(resourceGroupName, accountName, options, settings);
5285
5390
  }
5286
5391
  };
5287
5392
  }
5288
- listPagingPage(resourceGroupName, accountName, options) {
5393
+ listPagingPage(resourceGroupName, accountName, options, settings) {
5289
5394
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
5290
- let result = yield tslib.__await(this._list(resourceGroupName, accountName, options));
5291
- yield yield tslib.__await(result.value || []);
5292
- let continuationToken = result.nextLink;
5395
+ let result;
5396
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
5397
+ if (!continuationToken) {
5398
+ result = yield tslib.__await(this._list(resourceGroupName, accountName, options));
5399
+ let page = result.value || [];
5400
+ continuationToken = result.nextLink;
5401
+ setContinuationToken(page, continuationToken);
5402
+ yield yield tslib.__await(page);
5403
+ }
5293
5404
  while (continuationToken) {
5294
5405
  result = yield tslib.__await(this._listNext(resourceGroupName, accountName, continuationToken, options));
5295
5406
  continuationToken = result.nextLink;
5296
- yield yield tslib.__await(result.value || []);
5407
+ let page = result.value || [];
5408
+ setContinuationToken(page, continuationToken);
5409
+ yield yield tslib.__await(page);
5297
5410
  }
5298
5411
  });
5299
5412
  }
@@ -5544,20 +5657,31 @@ class LocationImpl {
5544
5657
  [Symbol.asyncIterator]() {
5545
5658
  return this;
5546
5659
  },
5547
- byPage: () => {
5548
- return this.listSupportedVirtualMachineSkusPagingPage(locationName, options);
5660
+ byPage: (settings) => {
5661
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
5662
+ throw new Error("maxPageSize is not supported by this operation.");
5663
+ }
5664
+ return this.listSupportedVirtualMachineSkusPagingPage(locationName, options, settings);
5549
5665
  }
5550
5666
  };
5551
5667
  }
5552
- listSupportedVirtualMachineSkusPagingPage(locationName, options) {
5668
+ listSupportedVirtualMachineSkusPagingPage(locationName, options, settings) {
5553
5669
  return tslib.__asyncGenerator(this, arguments, function* listSupportedVirtualMachineSkusPagingPage_1() {
5554
- let result = yield tslib.__await(this._listSupportedVirtualMachineSkus(locationName, options));
5555
- yield yield tslib.__await(result.value || []);
5556
- let continuationToken = result.nextLink;
5670
+ let result;
5671
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
5672
+ if (!continuationToken) {
5673
+ result = yield tslib.__await(this._listSupportedVirtualMachineSkus(locationName, options));
5674
+ let page = result.value || [];
5675
+ continuationToken = result.nextLink;
5676
+ setContinuationToken(page, continuationToken);
5677
+ yield yield tslib.__await(page);
5678
+ }
5557
5679
  while (continuationToken) {
5558
5680
  result = yield tslib.__await(this._listSupportedVirtualMachineSkusNext(locationName, continuationToken, options));
5559
5681
  continuationToken = result.nextLink;
5560
- yield yield tslib.__await(result.value || []);
5682
+ let page = result.value || [];
5683
+ setContinuationToken(page, continuationToken);
5684
+ yield yield tslib.__await(page);
5561
5685
  }
5562
5686
  });
5563
5687
  }
@@ -5593,20 +5717,31 @@ class LocationImpl {
5593
5717
  [Symbol.asyncIterator]() {
5594
5718
  return this;
5595
5719
  },
5596
- byPage: () => {
5597
- return this.listSupportedCloudServiceSkusPagingPage(locationName, options);
5720
+ byPage: (settings) => {
5721
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
5722
+ throw new Error("maxPageSize is not supported by this operation.");
5723
+ }
5724
+ return this.listSupportedCloudServiceSkusPagingPage(locationName, options, settings);
5598
5725
  }
5599
5726
  };
5600
5727
  }
5601
- listSupportedCloudServiceSkusPagingPage(locationName, options) {
5728
+ listSupportedCloudServiceSkusPagingPage(locationName, options, settings) {
5602
5729
  return tslib.__asyncGenerator(this, arguments, function* listSupportedCloudServiceSkusPagingPage_1() {
5603
- let result = yield tslib.__await(this._listSupportedCloudServiceSkus(locationName, options));
5604
- yield yield tslib.__await(result.value || []);
5605
- let continuationToken = result.nextLink;
5730
+ let result;
5731
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
5732
+ if (!continuationToken) {
5733
+ result = yield tslib.__await(this._listSupportedCloudServiceSkus(locationName, options));
5734
+ let page = result.value || [];
5735
+ continuationToken = result.nextLink;
5736
+ setContinuationToken(page, continuationToken);
5737
+ yield yield tslib.__await(page);
5738
+ }
5606
5739
  while (continuationToken) {
5607
5740
  result = yield tslib.__await(this._listSupportedCloudServiceSkusNext(locationName, continuationToken, options));
5608
5741
  continuationToken = result.nextLink;
5609
- yield yield tslib.__await(result.value || []);
5742
+ let page = result.value || [];
5743
+ setContinuationToken(page, continuationToken);
5744
+ yield yield tslib.__await(page);
5610
5745
  }
5611
5746
  });
5612
5747
  }
@@ -5855,20 +5990,31 @@ class OperationsImpl {
5855
5990
  [Symbol.asyncIterator]() {
5856
5991
  return this;
5857
5992
  },
5858
- byPage: () => {
5859
- return this.listPagingPage(options);
5993
+ byPage: (settings) => {
5994
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
5995
+ throw new Error("maxPageSize is not supported by this operation.");
5996
+ }
5997
+ return this.listPagingPage(options, settings);
5860
5998
  }
5861
5999
  };
5862
6000
  }
5863
- listPagingPage(options) {
6001
+ listPagingPage(options, settings) {
5864
6002
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
5865
- let result = yield tslib.__await(this._list(options));
5866
- yield yield tslib.__await(result.value || []);
5867
- let continuationToken = result.nextLink;
6003
+ let result;
6004
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
6005
+ if (!continuationToken) {
6006
+ result = yield tslib.__await(this._list(options));
6007
+ let page = result.value || [];
6008
+ continuationToken = result.nextLink;
6009
+ setContinuationToken(page, continuationToken);
6010
+ yield yield tslib.__await(page);
6011
+ }
5868
6012
  while (continuationToken) {
5869
6013
  result = yield tslib.__await(this._listNext(continuationToken, options));
5870
6014
  continuationToken = result.nextLink;
5871
- yield yield tslib.__await(result.value || []);
6015
+ let page = result.value || [];
6016
+ setContinuationToken(page, continuationToken);
6017
+ yield yield tslib.__await(page);
5872
6018
  }
5873
6019
  });
5874
6020
  }
@@ -5959,7 +6105,9 @@ class CertificateOperationsImpl {
5959
6105
  this.client = client;
5960
6106
  }
5961
6107
  /**
5962
- * Lists all of the certificates in the specified account.
6108
+ * Warning: This operation is deprecated and will be removed after February, 2024. Please use the
6109
+ * [Azure KeyVault
6110
+ * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.
5963
6111
  * @param resourceGroupName The name of the resource group that contains the Batch account.
5964
6112
  * @param accountName The name of the Batch account.
5965
6113
  * @param options The options parameters.
@@ -5973,20 +6121,31 @@ class CertificateOperationsImpl {
5973
6121
  [Symbol.asyncIterator]() {
5974
6122
  return this;
5975
6123
  },
5976
- byPage: () => {
5977
- return this.listByBatchAccountPagingPage(resourceGroupName, accountName, options);
6124
+ byPage: (settings) => {
6125
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
6126
+ throw new Error("maxPageSize is not supported by this operation.");
6127
+ }
6128
+ return this.listByBatchAccountPagingPage(resourceGroupName, accountName, options, settings);
5978
6129
  }
5979
6130
  };
5980
6131
  }
5981
- listByBatchAccountPagingPage(resourceGroupName, accountName, options) {
6132
+ listByBatchAccountPagingPage(resourceGroupName, accountName, options, settings) {
5982
6133
  return tslib.__asyncGenerator(this, arguments, function* listByBatchAccountPagingPage_1() {
5983
- let result = yield tslib.__await(this._listByBatchAccount(resourceGroupName, accountName, options));
5984
- yield yield tslib.__await(result.value || []);
5985
- let continuationToken = result.nextLink;
6134
+ let result;
6135
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
6136
+ if (!continuationToken) {
6137
+ result = yield tslib.__await(this._listByBatchAccount(resourceGroupName, accountName, options));
6138
+ let page = result.value || [];
6139
+ continuationToken = result.nextLink;
6140
+ setContinuationToken(page, continuationToken);
6141
+ yield yield tslib.__await(page);
6142
+ }
5986
6143
  while (continuationToken) {
5987
6144
  result = yield tslib.__await(this._listByBatchAccountNext(resourceGroupName, accountName, continuationToken, options));
5988
6145
  continuationToken = result.nextLink;
5989
- yield yield tslib.__await(result.value || []);
6146
+ let page = result.value || [];
6147
+ setContinuationToken(page, continuationToken);
6148
+ yield yield tslib.__await(page);
5990
6149
  }
5991
6150
  });
5992
6151
  }
@@ -6009,7 +6168,9 @@ class CertificateOperationsImpl {
6009
6168
  });
6010
6169
  }
6011
6170
  /**
6012
- * Lists all of the certificates in the specified account.
6171
+ * Warning: This operation is deprecated and will be removed after February, 2024. Please use the
6172
+ * [Azure KeyVault
6173
+ * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.
6013
6174
  * @param resourceGroupName The name of the resource group that contains the Batch account.
6014
6175
  * @param accountName The name of the Batch account.
6015
6176
  * @param options The options parameters.
@@ -6018,7 +6179,9 @@ class CertificateOperationsImpl {
6018
6179
  return this.client.sendOperationRequest({ resourceGroupName, accountName, options }, listByBatchAccountOperationSpec$3);
6019
6180
  }
6020
6181
  /**
6021
- * Creates a new certificate inside the specified account.
6182
+ * Warning: This operation is deprecated and will be removed after February, 2024. Please use the
6183
+ * [Azure KeyVault
6184
+ * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.
6022
6185
  * @param resourceGroupName The name of the resource group that contains the Batch account.
6023
6186
  * @param accountName The name of the Batch account.
6024
6187
  * @param certificateName The identifier for the certificate. This must be made up of algorithm and
@@ -6031,7 +6194,9 @@ class CertificateOperationsImpl {
6031
6194
  return this.client.sendOperationRequest({ resourceGroupName, accountName, certificateName, parameters, options }, createOperationSpec$1);
6032
6195
  }
6033
6196
  /**
6034
- * Updates the properties of an existing certificate.
6197
+ * Warning: This operation is deprecated and will be removed after February, 2024. Please use the
6198
+ * [Azure KeyVault
6199
+ * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.
6035
6200
  * @param resourceGroupName The name of the resource group that contains the Batch account.
6036
6201
  * @param accountName The name of the Batch account.
6037
6202
  * @param certificateName The identifier for the certificate. This must be made up of algorithm and
@@ -6044,7 +6209,9 @@ class CertificateOperationsImpl {
6044
6209
  return this.client.sendOperationRequest({ resourceGroupName, accountName, certificateName, parameters, options }, updateOperationSpec$2);
6045
6210
  }
6046
6211
  /**
6047
- * Deletes the specified certificate.
6212
+ * Warning: This operation is deprecated and will be removed after February, 2024. Please use the
6213
+ * [Azure KeyVault
6214
+ * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.
6048
6215
  * @param resourceGroupName The name of the resource group that contains the Batch account.
6049
6216
  * @param accountName The name of the Batch account.
6050
6217
  * @param certificateName The identifier for the certificate. This must be made up of algorithm and
@@ -6087,7 +6254,9 @@ class CertificateOperationsImpl {
6087
6254
  });
6088
6255
  }
6089
6256
  /**
6090
- * Deletes the specified certificate.
6257
+ * Warning: This operation is deprecated and will be removed after February, 2024. Please use the
6258
+ * [Azure KeyVault
6259
+ * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.
6091
6260
  * @param resourceGroupName The name of the resource group that contains the Batch account.
6092
6261
  * @param accountName The name of the Batch account.
6093
6262
  * @param certificateName The identifier for the certificate. This must be made up of algorithm and
@@ -6102,7 +6271,9 @@ class CertificateOperationsImpl {
6102
6271
  });
6103
6272
  }
6104
6273
  /**
6105
- * Gets information about the specified certificate.
6274
+ * Warning: This operation is deprecated and will be removed after February, 2024. Please use the
6275
+ * [Azure KeyVault
6276
+ * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.
6106
6277
  * @param resourceGroupName The name of the resource group that contains the Batch account.
6107
6278
  * @param accountName The name of the Batch account.
6108
6279
  * @param certificateName The identifier for the certificate. This must be made up of algorithm and
@@ -6120,6 +6291,10 @@ class CertificateOperationsImpl {
6120
6291
  * delete the certificate, you do not need to run this operation after the deletion failed. You must
6121
6292
  * make sure that the certificate is not being used by any resources, and then you can try again to
6122
6293
  * delete the certificate.
6294
+ *
6295
+ * Warning: This operation is deprecated and will be removed after February, 2024. Please use the
6296
+ * [Azure KeyVault
6297
+ * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.
6123
6298
  * @param resourceGroupName The name of the resource group that contains the Batch account.
6124
6299
  * @param accountName The name of the Batch account.
6125
6300
  * @param certificateName The identifier for the certificate. This must be made up of algorithm and
@@ -6357,20 +6532,31 @@ class PrivateLinkResourceOperationsImpl {
6357
6532
  [Symbol.asyncIterator]() {
6358
6533
  return this;
6359
6534
  },
6360
- byPage: () => {
6361
- return this.listByBatchAccountPagingPage(resourceGroupName, accountName, options);
6535
+ byPage: (settings) => {
6536
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
6537
+ throw new Error("maxPageSize is not supported by this operation.");
6538
+ }
6539
+ return this.listByBatchAccountPagingPage(resourceGroupName, accountName, options, settings);
6362
6540
  }
6363
6541
  };
6364
6542
  }
6365
- listByBatchAccountPagingPage(resourceGroupName, accountName, options) {
6543
+ listByBatchAccountPagingPage(resourceGroupName, accountName, options, settings) {
6366
6544
  return tslib.__asyncGenerator(this, arguments, function* listByBatchAccountPagingPage_1() {
6367
- let result = yield tslib.__await(this._listByBatchAccount(resourceGroupName, accountName, options));
6368
- yield yield tslib.__await(result.value || []);
6369
- let continuationToken = result.nextLink;
6545
+ let result;
6546
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
6547
+ if (!continuationToken) {
6548
+ result = yield tslib.__await(this._listByBatchAccount(resourceGroupName, accountName, options));
6549
+ let page = result.value || [];
6550
+ continuationToken = result.nextLink;
6551
+ setContinuationToken(page, continuationToken);
6552
+ yield yield tslib.__await(page);
6553
+ }
6370
6554
  while (continuationToken) {
6371
6555
  result = yield tslib.__await(this._listByBatchAccountNext(resourceGroupName, accountName, continuationToken, options));
6372
6556
  continuationToken = result.nextLink;
6373
- yield yield tslib.__await(result.value || []);
6557
+ let page = result.value || [];
6558
+ setContinuationToken(page, continuationToken);
6559
+ yield yield tslib.__await(page);
6374
6560
  }
6375
6561
  });
6376
6562
  }
@@ -6523,20 +6709,31 @@ class PrivateEndpointConnectionOperationsImpl {
6523
6709
  [Symbol.asyncIterator]() {
6524
6710
  return this;
6525
6711
  },
6526
- byPage: () => {
6527
- return this.listByBatchAccountPagingPage(resourceGroupName, accountName, options);
6712
+ byPage: (settings) => {
6713
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
6714
+ throw new Error("maxPageSize is not supported by this operation.");
6715
+ }
6716
+ return this.listByBatchAccountPagingPage(resourceGroupName, accountName, options, settings);
6528
6717
  }
6529
6718
  };
6530
6719
  }
6531
- listByBatchAccountPagingPage(resourceGroupName, accountName, options) {
6720
+ listByBatchAccountPagingPage(resourceGroupName, accountName, options, settings) {
6532
6721
  return tslib.__asyncGenerator(this, arguments, function* listByBatchAccountPagingPage_1() {
6533
- let result = yield tslib.__await(this._listByBatchAccount(resourceGroupName, accountName, options));
6534
- yield yield tslib.__await(result.value || []);
6535
- let continuationToken = result.nextLink;
6722
+ let result;
6723
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
6724
+ if (!continuationToken) {
6725
+ result = yield tslib.__await(this._listByBatchAccount(resourceGroupName, accountName, options));
6726
+ let page = result.value || [];
6727
+ continuationToken = result.nextLink;
6728
+ setContinuationToken(page, continuationToken);
6729
+ yield yield tslib.__await(page);
6730
+ }
6536
6731
  while (continuationToken) {
6537
6732
  result = yield tslib.__await(this._listByBatchAccountNext(resourceGroupName, accountName, continuationToken, options));
6538
6733
  continuationToken = result.nextLink;
6539
- yield yield tslib.__await(result.value || []);
6734
+ let page = result.value || [];
6735
+ setContinuationToken(page, continuationToken);
6736
+ yield yield tslib.__await(page);
6540
6737
  }
6541
6738
  });
6542
6739
  }
@@ -6889,20 +7086,31 @@ class PoolOperationsImpl {
6889
7086
  [Symbol.asyncIterator]() {
6890
7087
  return this;
6891
7088
  },
6892
- byPage: () => {
6893
- return this.listByBatchAccountPagingPage(resourceGroupName, accountName, options);
7089
+ byPage: (settings) => {
7090
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
7091
+ throw new Error("maxPageSize is not supported by this operation.");
7092
+ }
7093
+ return this.listByBatchAccountPagingPage(resourceGroupName, accountName, options, settings);
6894
7094
  }
6895
7095
  };
6896
7096
  }
6897
- listByBatchAccountPagingPage(resourceGroupName, accountName, options) {
7097
+ listByBatchAccountPagingPage(resourceGroupName, accountName, options, settings) {
6898
7098
  return tslib.__asyncGenerator(this, arguments, function* listByBatchAccountPagingPage_1() {
6899
- let result = yield tslib.__await(this._listByBatchAccount(resourceGroupName, accountName, options));
6900
- yield yield tslib.__await(result.value || []);
6901
- let continuationToken = result.nextLink;
7099
+ let result;
7100
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
7101
+ if (!continuationToken) {
7102
+ result = yield tslib.__await(this._listByBatchAccount(resourceGroupName, accountName, options));
7103
+ let page = result.value || [];
7104
+ continuationToken = result.nextLink;
7105
+ setContinuationToken(page, continuationToken);
7106
+ yield yield tslib.__await(page);
7107
+ }
6902
7108
  while (continuationToken) {
6903
7109
  result = yield tslib.__await(this._listByBatchAccountNext(resourceGroupName, accountName, continuationToken, options));
6904
7110
  continuationToken = result.nextLink;
6905
- yield yield tslib.__await(result.value || []);
7111
+ let page = result.value || [];
7112
+ setContinuationToken(page, continuationToken);
7113
+ yield yield tslib.__await(page);
6906
7114
  }
6907
7115
  });
6908
7116
  }
@@ -7279,7 +7487,7 @@ class BatchManagementClient extends coreClient__namespace.ServiceClient {
7279
7487
  * @param options The parameter options
7280
7488
  */
7281
7489
  constructor(credentials, subscriptionId, options) {
7282
- var _a, _b;
7490
+ var _a, _b, _c;
7283
7491
  if (credentials === undefined) {
7284
7492
  throw new Error("'credentials' cannot be null");
7285
7493
  }
@@ -7294,38 +7502,40 @@ class BatchManagementClient extends coreClient__namespace.ServiceClient {
7294
7502
  requestContentType: "application/json; charset=utf-8",
7295
7503
  credential: credentials
7296
7504
  };
7297
- const packageDetails = `azsdk-js-arm-batch/7.2.1`;
7505
+ const packageDetails = `azsdk-js-arm-batch/8.0.0`;
7298
7506
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
7299
7507
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
7300
7508
  : `${packageDetails}`;
7301
- if (!options.credentialScopes) {
7302
- options.credentialScopes = ["https://management.azure.com/.default"];
7303
- }
7304
7509
  const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
7305
7510
  userAgentPrefix
7306
- }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
7511
+ }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
7307
7512
  super(optionsWithDefaults);
7513
+ let bearerTokenAuthenticationPolicyFound = false;
7308
7514
  if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
7309
7515
  const pipelinePolicies = options.pipeline.getOrderedPolicies();
7310
- const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
7516
+ bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
7311
7517
  coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
7312
- if (!bearerTokenAuthenticationPolicyFound) {
7313
- this.pipeline.removePolicy({
7314
- name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
7315
- });
7316
- this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
7317
- scopes: `${optionsWithDefaults.baseUri}/.default`,
7318
- challengeCallbacks: {
7319
- authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
7320
- }
7321
- }));
7322
- }
7518
+ }
7519
+ if (!options ||
7520
+ !options.pipeline ||
7521
+ options.pipeline.getOrderedPolicies().length == 0 ||
7522
+ !bearerTokenAuthenticationPolicyFound) {
7523
+ this.pipeline.removePolicy({
7524
+ name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
7525
+ });
7526
+ this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
7527
+ credential: credentials,
7528
+ scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
7529
+ challengeCallbacks: {
7530
+ authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
7531
+ }
7532
+ }));
7323
7533
  }
7324
7534
  // Parameter assignments
7325
7535
  this.subscriptionId = subscriptionId;
7326
7536
  // Assigning values to Constant parameters
7327
7537
  this.$host = options.$host || "https://management.azure.com";
7328
- this.apiVersion = options.apiVersion || "2022-06-01";
7538
+ this.apiVersion = options.apiVersion || "2022-10-01";
7329
7539
  this.batchAccountOperations = new BatchAccountOperationsImpl(this);
7330
7540
  this.applicationPackageOperations = new ApplicationPackageOperationsImpl(this);
7331
7541
  this.applicationOperations = new ApplicationOperationsImpl(this);
@@ -7367,4 +7577,5 @@ class BatchManagementClient extends coreClient__namespace.ServiceClient {
7367
7577
  }
7368
7578
 
7369
7579
  exports.BatchManagementClient = BatchManagementClient;
7580
+ exports.getContinuationToken = getContinuationToken;
7370
7581
  //# sourceMappingURL=index.js.map