@azure/arm-batch 6.0.0 → 7.0.0-beta.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 (254) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/{LICENSE.txt → LICENSE} +1 -1
  3. package/README.md +70 -82
  4. package/dist/index.js +6873 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/src/batchManagementClient.d.ts +24 -0
  9. package/dist-esm/src/batchManagementClient.d.ts.map +1 -0
  10. package/dist-esm/src/batchManagementClient.js +31 -0
  11. package/dist-esm/src/batchManagementClient.js.map +1 -0
  12. package/dist-esm/src/batchManagementClientContext.d.ts +17 -0
  13. package/dist-esm/src/batchManagementClientContext.d.ts.map +1 -0
  14. package/dist-esm/src/batchManagementClientContext.js +50 -0
  15. package/dist-esm/src/batchManagementClientContext.js.map +1 -0
  16. package/dist-esm/src/index.d.ts +6 -0
  17. package/dist-esm/src/index.d.ts.map +1 -0
  18. package/dist-esm/src/index.js +13 -0
  19. package/dist-esm/src/index.js.map +1 -0
  20. package/dist-esm/src/lroImpl.d.ts +16 -0
  21. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  22. package/dist-esm/src/lroImpl.js +29 -0
  23. package/dist-esm/src/lroImpl.js.map +1 -0
  24. package/dist-esm/src/models/index.d.ts +1780 -0
  25. package/dist-esm/src/models/index.d.ts.map +1 -0
  26. package/{esm → dist-esm/src}/models/index.js +1 -0
  27. package/dist-esm/src/models/index.js.map +1 -0
  28. package/dist-esm/src/models/mappers.d.ts +112 -0
  29. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  30. package/{esm → dist-esm/src}/models/mappers.js +1723 -1885
  31. package/dist-esm/src/models/mappers.js.map +1 -0
  32. package/dist-esm/src/models/parameters.d.ts +34 -0
  33. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  34. package/dist-esm/src/models/parameters.js +303 -0
  35. package/dist-esm/src/models/parameters.js.map +1 -0
  36. package/dist-esm/src/operations/applicationOperations.d.ts +71 -0
  37. package/dist-esm/src/operations/applicationOperations.d.ts.map +1 -0
  38. package/dist-esm/src/operations/applicationOperations.js +269 -0
  39. package/dist-esm/src/operations/applicationOperations.js.map +1 -0
  40. package/dist-esm/src/operations/applicationPackageOperations.d.ts +83 -0
  41. package/dist-esm/src/operations/applicationPackageOperations.d.ts.map +1 -0
  42. package/dist-esm/src/operations/applicationPackageOperations.js +294 -0
  43. package/dist-esm/src/operations/applicationPackageOperations.js.map +1 -0
  44. package/dist-esm/src/operations/batchAccountOperations.d.ts +171 -0
  45. package/dist-esm/src/operations/batchAccountOperations.d.ts.map +1 -0
  46. package/dist-esm/src/operations/batchAccountOperations.js +681 -0
  47. package/dist-esm/src/operations/batchAccountOperations.js.map +1 -0
  48. package/dist-esm/src/operations/certificateOperations.d.ts +106 -0
  49. package/dist-esm/src/operations/certificateOperations.d.ts.map +1 -0
  50. package/dist-esm/src/operations/certificateOperations.js +388 -0
  51. package/dist-esm/src/operations/certificateOperations.js.map +1 -0
  52. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  53. package/dist-esm/src/operations/index.d.ts.map +1 -0
  54. package/{esm → dist-esm/src}/operations/index.js +1 -2
  55. package/dist-esm/src/operations/index.js.map +1 -0
  56. package/dist-esm/src/operations/location.d.ts +71 -0
  57. package/dist-esm/src/operations/location.d.ts.map +1 -0
  58. package/dist-esm/src/operations/location.js +316 -0
  59. package/dist-esm/src/operations/location.js.map +1 -0
  60. package/dist-esm/src/operations/operations.d.ts +32 -0
  61. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  62. package/dist-esm/src/operations/operations.js +120 -0
  63. package/dist-esm/src/operations/operations.js.map +1 -0
  64. package/dist-esm/src/operations/poolOperations.d.ts +103 -0
  65. package/dist-esm/src/operations/poolOperations.d.ts.map +1 -0
  66. package/dist-esm/src/operations/poolOperations.js +410 -0
  67. package/dist-esm/src/operations/poolOperations.js.map +1 -0
  68. package/dist-esm/src/operations/privateEndpointConnectionOperations.d.ts +70 -0
  69. package/dist-esm/src/operations/privateEndpointConnectionOperations.d.ts.map +1 -0
  70. package/dist-esm/src/operations/privateEndpointConnectionOperations.js +278 -0
  71. package/dist-esm/src/operations/privateEndpointConnectionOperations.js.map +1 -0
  72. package/dist-esm/src/operations/privateLinkResourceOperations.d.ts +47 -0
  73. package/dist-esm/src/operations/privateLinkResourceOperations.d.ts.map +1 -0
  74. package/dist-esm/src/operations/privateLinkResourceOperations.js +170 -0
  75. package/dist-esm/src/operations/privateLinkResourceOperations.js.map +1 -0
  76. package/dist-esm/src/operationsInterfaces/applicationOperations.d.ts +46 -0
  77. package/dist-esm/src/operationsInterfaces/applicationOperations.d.ts.map +1 -0
  78. package/{src/models/operationsMappers.ts → dist-esm/src/operationsInterfaces/applicationOperations.js} +2 -7
  79. package/dist-esm/src/operationsInterfaces/applicationOperations.js.map +1 -0
  80. package/dist-esm/src/operationsInterfaces/applicationPackageOperations.d.ts +56 -0
  81. package/dist-esm/src/operationsInterfaces/applicationPackageOperations.d.ts.map +1 -0
  82. package/{esm/models/operationsMappers.js → dist-esm/src/operationsInterfaces/applicationPackageOperations.js} +2 -2
  83. package/dist-esm/src/operationsInterfaces/applicationPackageOperations.js.map +1 -0
  84. package/dist-esm/src/operationsInterfaces/batchAccountOperations.d.ts +112 -0
  85. package/dist-esm/src/operationsInterfaces/batchAccountOperations.d.ts.map +1 -0
  86. package/{src/models/locationMappers.ts → dist-esm/src/operationsInterfaces/batchAccountOperations.js} +2 -10
  87. package/dist-esm/src/operationsInterfaces/batchAccountOperations.js.map +1 -0
  88. package/dist-esm/src/operationsInterfaces/certificateOperations.d.ts +81 -0
  89. package/dist-esm/src/operationsInterfaces/certificateOperations.d.ts.map +1 -0
  90. package/dist-esm/src/operationsInterfaces/certificateOperations.js +9 -0
  91. package/dist-esm/src/operationsInterfaces/certificateOperations.js.map +1 -0
  92. package/dist-esm/src/operationsInterfaces/index.d.ts +10 -0
  93. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  94. package/dist-esm/src/operationsInterfaces/index.js +17 -0
  95. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  96. package/dist-esm/src/operationsInterfaces/location.d.ts +31 -0
  97. package/dist-esm/src/operationsInterfaces/location.d.ts.map +1 -0
  98. package/dist-esm/src/operationsInterfaces/location.js +9 -0
  99. package/dist-esm/src/operationsInterfaces/location.js.map +1 -0
  100. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  101. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  102. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  103. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  104. package/dist-esm/src/operationsInterfaces/poolOperations.d.ts +78 -0
  105. package/dist-esm/src/operationsInterfaces/poolOperations.d.ts.map +1 -0
  106. package/dist-esm/src/operationsInterfaces/poolOperations.js +9 -0
  107. package/dist-esm/src/operationsInterfaces/poolOperations.js.map +1 -0
  108. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionOperations.d.ts +45 -0
  109. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionOperations.d.ts.map +1 -0
  110. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionOperations.js +9 -0
  111. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionOperations.js.map +1 -0
  112. package/dist-esm/src/operationsInterfaces/privateLinkResourceOperations.d.ts +22 -0
  113. package/dist-esm/src/operationsInterfaces/privateLinkResourceOperations.d.ts.map +1 -0
  114. package/dist-esm/src/operationsInterfaces/privateLinkResourceOperations.js +9 -0
  115. package/dist-esm/src/operationsInterfaces/privateLinkResourceOperations.js.map +1 -0
  116. package/dist-esm/test/sampleTest.d.ts +4 -0
  117. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  118. package/dist-esm/test/sampleTest.js +479 -0
  119. package/dist-esm/test/sampleTest.js.map +1 -0
  120. package/package.json +66 -32
  121. package/review/arm-batch.api.md +1459 -0
  122. package/rollup.config.js +181 -30
  123. package/src/batchManagementClient.ts +59 -48
  124. package/src/batchManagementClientContext.ts +46 -43
  125. package/src/index.ts +13 -0
  126. package/src/lroImpl.ts +34 -0
  127. package/src/models/index.ts +1460 -3635
  128. package/src/models/mappers.ts +1705 -1851
  129. package/src/models/parameters.ts +216 -117
  130. package/src/operations/applicationOperations.ts +215 -263
  131. package/src/operations/applicationPackageOperations.ts +252 -279
  132. package/src/operations/batchAccountOperations.ts +660 -572
  133. package/src/operations/certificateOperations.ts +360 -359
  134. package/src/operations/index.ts +1 -2
  135. package/src/operations/location.ts +285 -234
  136. package/src/operations/operations.ts +82 -70
  137. package/src/operations/poolOperations.ts +373 -378
  138. package/src/operations/privateEndpointConnectionOperations.ts +269 -169
  139. package/src/operations/privateLinkResourceOperations.ts +156 -126
  140. package/src/operationsInterfaces/applicationOperations.ts +90 -0
  141. package/src/operationsInterfaces/applicationPackageOperations.ts +106 -0
  142. package/src/operationsInterfaces/batchAccountOperations.ts +196 -0
  143. package/src/operationsInterfaces/certificateOperations.ts +139 -0
  144. package/src/operationsInterfaces/index.ts +17 -0
  145. package/src/operationsInterfaces/location.ts +62 -0
  146. package/src/operationsInterfaces/operations.ts +22 -0
  147. package/src/operationsInterfaces/poolOperations.ts +142 -0
  148. package/src/operationsInterfaces/privateEndpointConnectionOperations.ts +87 -0
  149. package/src/operationsInterfaces/privateLinkResourceOperations.ts +45 -0
  150. package/tsconfig.json +3 -3
  151. package/types/arm-batch.d.ts +2528 -0
  152. package/types/tsdoc-metadata.json +11 -0
  153. package/dist/arm-batch.js +0 -6972
  154. package/dist/arm-batch.js.map +0 -1
  155. package/dist/arm-batch.min.js +0 -1
  156. package/dist/arm-batch.min.js.map +0 -1
  157. package/esm/batchManagementClient.d.ts +0 -33
  158. package/esm/batchManagementClient.d.ts.map +0 -1
  159. package/esm/batchManagementClient.js +0 -46
  160. package/esm/batchManagementClient.js.map +0 -1
  161. package/esm/batchManagementClientContext.d.ts +0 -23
  162. package/esm/batchManagementClientContext.d.ts.map +0 -1
  163. package/esm/batchManagementClientContext.js +0 -61
  164. package/esm/batchManagementClientContext.js.map +0 -1
  165. package/esm/models/applicationOperationsMappers.d.ts +0 -2
  166. package/esm/models/applicationOperationsMappers.d.ts.map +0 -1
  167. package/esm/models/applicationOperationsMappers.js +0 -9
  168. package/esm/models/applicationOperationsMappers.js.map +0 -1
  169. package/esm/models/applicationPackageOperationsMappers.d.ts +0 -2
  170. package/esm/models/applicationPackageOperationsMappers.d.ts.map +0 -1
  171. package/esm/models/applicationPackageOperationsMappers.js +0 -9
  172. package/esm/models/applicationPackageOperationsMappers.js.map +0 -1
  173. package/esm/models/batchAccountOperationsMappers.d.ts +0 -2
  174. package/esm/models/batchAccountOperationsMappers.d.ts.map +0 -1
  175. package/esm/models/batchAccountOperationsMappers.js +0 -9
  176. package/esm/models/batchAccountOperationsMappers.js.map +0 -1
  177. package/esm/models/certificateOperationsMappers.d.ts +0 -2
  178. package/esm/models/certificateOperationsMappers.d.ts.map +0 -1
  179. package/esm/models/certificateOperationsMappers.js +0 -9
  180. package/esm/models/certificateOperationsMappers.js.map +0 -1
  181. package/esm/models/index.d.ts +0 -3946
  182. package/esm/models/index.d.ts.map +0 -1
  183. package/esm/models/index.js.map +0 -1
  184. package/esm/models/locationMappers.d.ts +0 -2
  185. package/esm/models/locationMappers.d.ts.map +0 -1
  186. package/esm/models/locationMappers.js +0 -9
  187. package/esm/models/locationMappers.js.map +0 -1
  188. package/esm/models/mappers.d.ts +0 -110
  189. package/esm/models/mappers.d.ts.map +0 -1
  190. package/esm/models/mappers.js.map +0 -1
  191. package/esm/models/operationsMappers.d.ts +0 -2
  192. package/esm/models/operationsMappers.d.ts.map +0 -1
  193. package/esm/models/operationsMappers.js.map +0 -1
  194. package/esm/models/parameters.d.ts +0 -21
  195. package/esm/models/parameters.d.ts.map +0 -1
  196. package/esm/models/parameters.js +0 -250
  197. package/esm/models/parameters.js.map +0 -1
  198. package/esm/models/poolOperationsMappers.d.ts +0 -2
  199. package/esm/models/poolOperationsMappers.d.ts.map +0 -1
  200. package/esm/models/poolOperationsMappers.js +0 -9
  201. package/esm/models/poolOperationsMappers.js.map +0 -1
  202. package/esm/models/privateEndpointConnectionOperationsMappers.d.ts +0 -2
  203. package/esm/models/privateEndpointConnectionOperationsMappers.d.ts.map +0 -1
  204. package/esm/models/privateEndpointConnectionOperationsMappers.js +0 -9
  205. package/esm/models/privateEndpointConnectionOperationsMappers.js.map +0 -1
  206. package/esm/models/privateLinkResourceOperationsMappers.d.ts +0 -2
  207. package/esm/models/privateLinkResourceOperationsMappers.d.ts.map +0 -1
  208. package/esm/models/privateLinkResourceOperationsMappers.js +0 -9
  209. package/esm/models/privateLinkResourceOperationsMappers.js.map +0 -1
  210. package/esm/operations/applicationOperations.d.ts +0 -151
  211. package/esm/operations/applicationOperations.d.ts.map +0 -1
  212. package/esm/operations/applicationOperations.js +0 -232
  213. package/esm/operations/applicationOperations.js.map +0 -1
  214. package/esm/operations/applicationPackageOperations.d.ts +0 -171
  215. package/esm/operations/applicationPackageOperations.d.ts.map +0 -1
  216. package/esm/operations/applicationPackageOperations.js +0 -244
  217. package/esm/operations/applicationPackageOperations.js.map +0 -1
  218. package/esm/operations/batchAccountOperations.d.ts +0 -299
  219. package/esm/operations/batchAccountOperations.d.ts.map +0 -1
  220. package/esm/operations/batchAccountOperations.js +0 -493
  221. package/esm/operations/batchAccountOperations.js.map +0 -1
  222. package/esm/operations/certificateOperations.d.ts +0 -207
  223. package/esm/operations/certificateOperations.d.ts.map +0 -1
  224. package/esm/operations/certificateOperations.js +0 -310
  225. package/esm/operations/certificateOperations.js.map +0 -1
  226. package/esm/operations/index.d.ts.map +0 -1
  227. package/esm/operations/index.js.map +0 -1
  228. package/esm/operations/location.d.ts +0 -124
  229. package/esm/operations/location.d.ts.map +0 -1
  230. package/esm/operations/location.js +0 -216
  231. package/esm/operations/location.js.map +0 -1
  232. package/esm/operations/operations.d.ts +0 -46
  233. package/esm/operations/operations.d.ts.map +0 -1
  234. package/esm/operations/operations.js +0 -79
  235. package/esm/operations/operations.js.map +0 -1
  236. package/esm/operations/poolOperations.d.ts +0 -206
  237. package/esm/operations/poolOperations.d.ts.map +0 -1
  238. package/esm/operations/poolOperations.js +0 -341
  239. package/esm/operations/poolOperations.js.map +0 -1
  240. package/esm/operations/privateEndpointConnectionOperations.d.ts +0 -104
  241. package/esm/operations/privateEndpointConnectionOperations.d.ts.map +0 -1
  242. package/esm/operations/privateEndpointConnectionOperations.js +0 -195
  243. package/esm/operations/privateEndpointConnectionOperations.js.map +0 -1
  244. package/esm/operations/privateLinkResourceOperations.d.ts +0 -79
  245. package/esm/operations/privateLinkResourceOperations.d.ts.map +0 -1
  246. package/esm/operations/privateLinkResourceOperations.js +0 -121
  247. package/esm/operations/privateLinkResourceOperations.js.map +0 -1
  248. package/src/models/applicationOperationsMappers.ts +0 -79
  249. package/src/models/applicationPackageOperationsMappers.ts +0 -80
  250. package/src/models/batchAccountOperationsMappers.ts +0 -89
  251. package/src/models/certificateOperationsMappers.ts +0 -84
  252. package/src/models/poolOperationsMappers.ts +0 -85
  253. package/src/models/privateEndpointConnectionOperationsMappers.ts +0 -80
  254. package/src/models/privateLinkResourceOperationsMappers.ts +0 -79
@@ -3,24 +3,44 @@
3
3
  * Licensed under the MIT License.
4
4
  *
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is
7
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
7
  */
9
8
 
10
- import * as msRest from "@azure/ms-rest-js";
11
- import * as msRestAzure from "@azure/ms-rest-azure-js";
12
- import * as Models from "../models";
13
- import * as Mappers from "../models/poolOperationsMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { PoolOperations } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
14
13
  import * as Parameters from "../models/parameters";
15
14
  import { BatchManagementClientContext } from "../batchManagementClientContext";
15
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
+ import { LroImpl } from "../lroImpl";
17
+ import {
18
+ Pool,
19
+ PoolListByBatchAccountNextOptionalParams,
20
+ PoolListByBatchAccountOptionalParams,
21
+ PoolListByBatchAccountResponse,
22
+ PoolCreateOptionalParams,
23
+ PoolCreateResponse,
24
+ PoolUpdateOptionalParams,
25
+ PoolUpdateResponse,
26
+ PoolDeleteOptionalParams,
27
+ PoolGetOptionalParams,
28
+ PoolGetResponse,
29
+ PoolDisableAutoScaleOptionalParams,
30
+ PoolDisableAutoScaleResponse,
31
+ PoolStopResizeOptionalParams,
32
+ PoolStopResizeResponse,
33
+ PoolListByBatchAccountNextResponse
34
+ } from "../models";
16
35
 
17
- /** Class representing a PoolOperations. */
18
- export class PoolOperations {
36
+ /// <reference lib="esnext.asynciterable" />
37
+ /** Class containing PoolOperations operations. */
38
+ export class PoolOperationsImpl implements PoolOperations {
19
39
  private readonly client: BatchManagementClientContext;
20
40
 
21
41
  /**
22
- * Create a PoolOperations.
23
- * @param {BatchManagementClientContext} client Reference to the service client.
42
+ * Initialize a new instance of the class PoolOperations class.
43
+ * @param client Reference to the service client
24
44
  */
25
45
  constructor(client: BatchManagementClientContext) {
26
46
  this.client = client;
@@ -30,72 +50,109 @@ export class PoolOperations {
30
50
  * Lists all of the pools in the specified account.
31
51
  * @param resourceGroupName The name of the resource group that contains the Batch account.
32
52
  * @param accountName The name of the Batch account.
33
- * @param [options] The optional parameters
34
- * @returns Promise<Models.PoolListByBatchAccountResponse>
53
+ * @param options The options parameters.
35
54
  */
36
- listByBatchAccount(resourceGroupName: string, accountName: string, options?: Models.PoolListByBatchAccountOptionalParams): Promise<Models.PoolListByBatchAccountResponse>;
37
- /**
38
- * @param resourceGroupName The name of the resource group that contains the Batch account.
39
- * @param accountName The name of the Batch account.
40
- * @param callback The callback
41
- */
42
- listByBatchAccount(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback<Models.ListPoolsResult>): void;
43
- /**
44
- * @param resourceGroupName The name of the resource group that contains the Batch account.
45
- * @param accountName The name of the Batch account.
46
- * @param options The optional parameters
47
- * @param callback The callback
48
- */
49
- listByBatchAccount(resourceGroupName: string, accountName: string, options: Models.PoolListByBatchAccountOptionalParams, callback: msRest.ServiceCallback<Models.ListPoolsResult>): void;
50
- listByBatchAccount(resourceGroupName: string, accountName: string, options?: Models.PoolListByBatchAccountOptionalParams | msRest.ServiceCallback<Models.ListPoolsResult>, callback?: msRest.ServiceCallback<Models.ListPoolsResult>): Promise<Models.PoolListByBatchAccountResponse> {
51
- return this.client.sendOperationRequest(
52
- {
55
+ public listByBatchAccount(
56
+ resourceGroupName: string,
57
+ accountName: string,
58
+ options?: PoolListByBatchAccountOptionalParams
59
+ ): PagedAsyncIterableIterator<Pool> {
60
+ const iter = this.listByBatchAccountPagingAll(
61
+ resourceGroupName,
62
+ accountName,
63
+ options
64
+ );
65
+ return {
66
+ next() {
67
+ return iter.next();
68
+ },
69
+ [Symbol.asyncIterator]() {
70
+ return this;
71
+ },
72
+ byPage: () => {
73
+ return this.listByBatchAccountPagingPage(
74
+ resourceGroupName,
75
+ accountName,
76
+ options
77
+ );
78
+ }
79
+ };
80
+ }
81
+
82
+ private async *listByBatchAccountPagingPage(
83
+ resourceGroupName: string,
84
+ accountName: string,
85
+ options?: PoolListByBatchAccountOptionalParams
86
+ ): AsyncIterableIterator<Pool[]> {
87
+ let result = await this._listByBatchAccount(
88
+ resourceGroupName,
89
+ accountName,
90
+ options
91
+ );
92
+ yield result.value || [];
93
+ let continuationToken = result.nextLink;
94
+ while (continuationToken) {
95
+ result = await this._listByBatchAccountNext(
53
96
  resourceGroupName,
54
97
  accountName,
98
+ continuationToken,
55
99
  options
56
- },
57
- listByBatchAccountOperationSpec,
58
- callback) as Promise<Models.PoolListByBatchAccountResponse>;
100
+ );
101
+ continuationToken = result.nextLink;
102
+ yield result.value || [];
103
+ }
104
+ }
105
+
106
+ private async *listByBatchAccountPagingAll(
107
+ resourceGroupName: string,
108
+ accountName: string,
109
+ options?: PoolListByBatchAccountOptionalParams
110
+ ): AsyncIterableIterator<Pool> {
111
+ for await (const page of this.listByBatchAccountPagingPage(
112
+ resourceGroupName,
113
+ accountName,
114
+ options
115
+ )) {
116
+ yield* page;
117
+ }
59
118
  }
60
119
 
61
120
  /**
62
- * Creates a new pool inside the specified account.
63
- * @param resourceGroupName The name of the resource group that contains the Batch account.
64
- * @param accountName The name of the Batch account.
65
- * @param poolName The pool name. This must be unique within the account.
66
- * @param parameters Additional parameters for pool creation.
67
- * @param [options] The optional parameters
68
- * @returns Promise<Models.PoolCreateResponse>
69
- */
70
- create(resourceGroupName: string, accountName: string, poolName: string, parameters: Models.Pool, options?: Models.PoolCreateOptionalParams): Promise<Models.PoolCreateResponse>;
71
- /**
121
+ * Lists all of the pools in the specified account.
72
122
  * @param resourceGroupName The name of the resource group that contains the Batch account.
73
123
  * @param accountName The name of the Batch account.
74
- * @param poolName The pool name. This must be unique within the account.
75
- * @param parameters Additional parameters for pool creation.
76
- * @param callback The callback
124
+ * @param options The options parameters.
77
125
  */
78
- create(resourceGroupName: string, accountName: string, poolName: string, parameters: Models.Pool, callback: msRest.ServiceCallback<Models.Pool>): void;
126
+ private _listByBatchAccount(
127
+ resourceGroupName: string,
128
+ accountName: string,
129
+ options?: PoolListByBatchAccountOptionalParams
130
+ ): Promise<PoolListByBatchAccountResponse> {
131
+ return this.client.sendOperationRequest(
132
+ { resourceGroupName, accountName, options },
133
+ listByBatchAccountOperationSpec
134
+ );
135
+ }
136
+
79
137
  /**
138
+ * Creates a new pool inside the specified account.
80
139
  * @param resourceGroupName The name of the resource group that contains the Batch account.
81
140
  * @param accountName The name of the Batch account.
82
141
  * @param poolName The pool name. This must be unique within the account.
83
142
  * @param parameters Additional parameters for pool creation.
84
- * @param options The optional parameters
85
- * @param callback The callback
143
+ * @param options The options parameters.
86
144
  */
87
- create(resourceGroupName: string, accountName: string, poolName: string, parameters: Models.Pool, options: Models.PoolCreateOptionalParams, callback: msRest.ServiceCallback<Models.Pool>): void;
88
- create(resourceGroupName: string, accountName: string, poolName: string, parameters: Models.Pool, options?: Models.PoolCreateOptionalParams | msRest.ServiceCallback<Models.Pool>, callback?: msRest.ServiceCallback<Models.Pool>): Promise<Models.PoolCreateResponse> {
145
+ create(
146
+ resourceGroupName: string,
147
+ accountName: string,
148
+ poolName: string,
149
+ parameters: Pool,
150
+ options?: PoolCreateOptionalParams
151
+ ): Promise<PoolCreateResponse> {
89
152
  return this.client.sendOperationRequest(
90
- {
91
- resourceGroupName,
92
- accountName,
93
- poolName,
94
- parameters,
95
- options
96
- },
97
- createOperationSpec,
98
- callback) as Promise<Models.PoolCreateResponse>;
153
+ { resourceGroupName, accountName, poolName, parameters, options },
154
+ createOperationSpec
155
+ );
99
156
  }
100
157
 
101
158
  /**
@@ -104,41 +161,20 @@ export class PoolOperations {
104
161
  * @param accountName The name of the Batch account.
105
162
  * @param poolName The pool name. This must be unique within the account.
106
163
  * @param parameters Pool properties that should be updated. Properties that are supplied will be
107
- * updated, any property not supplied will be unchanged.
108
- * @param [options] The optional parameters
109
- * @returns Promise<Models.PoolUpdateResponse>
110
- */
111
- update(resourceGroupName: string, accountName: string, poolName: string, parameters: Models.Pool, options?: Models.PoolUpdateOptionalParams): Promise<Models.PoolUpdateResponse>;
112
- /**
113
- * @param resourceGroupName The name of the resource group that contains the Batch account.
114
- * @param accountName The name of the Batch account.
115
- * @param poolName The pool name. This must be unique within the account.
116
- * @param parameters Pool properties that should be updated. Properties that are supplied will be
117
- * updated, any property not supplied will be unchanged.
118
- * @param callback The callback
119
- */
120
- update(resourceGroupName: string, accountName: string, poolName: string, parameters: Models.Pool, callback: msRest.ServiceCallback<Models.Pool>): void;
121
- /**
122
- * @param resourceGroupName The name of the resource group that contains the Batch account.
123
- * @param accountName The name of the Batch account.
124
- * @param poolName The pool name. This must be unique within the account.
125
- * @param parameters Pool properties that should be updated. Properties that are supplied will be
126
- * updated, any property not supplied will be unchanged.
127
- * @param options The optional parameters
128
- * @param callback The callback
164
+ * updated, any property not supplied will be unchanged.
165
+ * @param options The options parameters.
129
166
  */
130
- update(resourceGroupName: string, accountName: string, poolName: string, parameters: Models.Pool, options: Models.PoolUpdateOptionalParams, callback: msRest.ServiceCallback<Models.Pool>): void;
131
- update(resourceGroupName: string, accountName: string, poolName: string, parameters: Models.Pool, options?: Models.PoolUpdateOptionalParams | msRest.ServiceCallback<Models.Pool>, callback?: msRest.ServiceCallback<Models.Pool>): Promise<Models.PoolUpdateResponse> {
167
+ update(
168
+ resourceGroupName: string,
169
+ accountName: string,
170
+ poolName: string,
171
+ parameters: Pool,
172
+ options?: PoolUpdateOptionalParams
173
+ ): Promise<PoolUpdateResponse> {
132
174
  return this.client.sendOperationRequest(
133
- {
134
- resourceGroupName,
135
- accountName,
136
- poolName,
137
- parameters,
138
- options
139
- },
140
- updateOperationSpec,
141
- callback) as Promise<Models.PoolUpdateResponse>;
175
+ { resourceGroupName, accountName, poolName, parameters, options },
176
+ updateOperationSpec
177
+ );
142
178
  }
143
179
 
144
180
  /**
@@ -146,48 +182,104 @@ export class PoolOperations {
146
182
  * @param resourceGroupName The name of the resource group that contains the Batch account.
147
183
  * @param accountName The name of the Batch account.
148
184
  * @param poolName The pool name. This must be unique within the account.
149
- * @param [options] The optional parameters
150
- * @returns Promise<Models.PoolDeleteResponse>
185
+ * @param options The options parameters.
151
186
  */
152
- deleteMethod(resourceGroupName: string, accountName: string, poolName: string, options?: msRest.RequestOptionsBase): Promise<Models.PoolDeleteResponse> {
153
- return this.beginDeleteMethod(resourceGroupName,accountName,poolName,options)
154
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.PoolDeleteResponse>;
187
+ async beginDelete(
188
+ resourceGroupName: string,
189
+ accountName: string,
190
+ poolName: string,
191
+ options?: PoolDeleteOptionalParams
192
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
193
+ const directSendOperation = async (
194
+ args: coreClient.OperationArguments,
195
+ spec: coreClient.OperationSpec
196
+ ): Promise<void> => {
197
+ return this.client.sendOperationRequest(args, spec);
198
+ };
199
+ const sendOperation = async (
200
+ args: coreClient.OperationArguments,
201
+ spec: coreClient.OperationSpec
202
+ ) => {
203
+ let currentRawResponse:
204
+ | coreClient.FullOperationResponse
205
+ | undefined = undefined;
206
+ const providedCallback = args.options?.onResponse;
207
+ const callback: coreClient.RawResponseCallback = (
208
+ rawResponse: coreClient.FullOperationResponse,
209
+ flatResponse: unknown
210
+ ) => {
211
+ currentRawResponse = rawResponse;
212
+ providedCallback?.(rawResponse, flatResponse);
213
+ };
214
+ const updatedArgs = {
215
+ ...args,
216
+ options: {
217
+ ...args.options,
218
+ onResponse: callback
219
+ }
220
+ };
221
+ const flatResponse = await directSendOperation(updatedArgs, spec);
222
+ return {
223
+ flatResponse,
224
+ rawResponse: {
225
+ statusCode: currentRawResponse!.status,
226
+ body: currentRawResponse!.parsedBody,
227
+ headers: currentRawResponse!.headers.toJSON()
228
+ }
229
+ };
230
+ };
231
+
232
+ const lro = new LroImpl(
233
+ sendOperation,
234
+ { resourceGroupName, accountName, poolName, options },
235
+ deleteOperationSpec
236
+ );
237
+ return new LroEngine(lro, {
238
+ resumeFrom: options?.resumeFrom,
239
+ intervalInMs: options?.updateIntervalInMs,
240
+ lroResourceLocationConfig: "location"
241
+ });
155
242
  }
156
243
 
157
244
  /**
158
- * Gets information about the specified pool.
159
- * @param resourceGroupName The name of the resource group that contains the Batch account.
160
- * @param accountName The name of the Batch account.
161
- * @param poolName The pool name. This must be unique within the account.
162
- * @param [options] The optional parameters
163
- * @returns Promise<Models.PoolGetResponse>
164
- */
165
- get(resourceGroupName: string, accountName: string, poolName: string, options?: msRest.RequestOptionsBase): Promise<Models.PoolGetResponse>;
166
- /**
245
+ * Deletes the specified pool.
167
246
  * @param resourceGroupName The name of the resource group that contains the Batch account.
168
247
  * @param accountName The name of the Batch account.
169
248
  * @param poolName The pool name. This must be unique within the account.
170
- * @param callback The callback
249
+ * @param options The options parameters.
171
250
  */
172
- get(resourceGroupName: string, accountName: string, poolName: string, callback: msRest.ServiceCallback<Models.Pool>): void;
251
+ async beginDeleteAndWait(
252
+ resourceGroupName: string,
253
+ accountName: string,
254
+ poolName: string,
255
+ options?: PoolDeleteOptionalParams
256
+ ): Promise<void> {
257
+ const poller = await this.beginDelete(
258
+ resourceGroupName,
259
+ accountName,
260
+ poolName,
261
+ options
262
+ );
263
+ return poller.pollUntilDone();
264
+ }
265
+
173
266
  /**
267
+ * Gets information about the specified pool.
174
268
  * @param resourceGroupName The name of the resource group that contains the Batch account.
175
269
  * @param accountName The name of the Batch account.
176
270
  * @param poolName The pool name. This must be unique within the account.
177
- * @param options The optional parameters
178
- * @param callback The callback
271
+ * @param options The options parameters.
179
272
  */
180
- get(resourceGroupName: string, accountName: string, poolName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.Pool>): void;
181
- get(resourceGroupName: string, accountName: string, poolName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.Pool>, callback?: msRest.ServiceCallback<Models.Pool>): Promise<Models.PoolGetResponse> {
273
+ get(
274
+ resourceGroupName: string,
275
+ accountName: string,
276
+ poolName: string,
277
+ options?: PoolGetOptionalParams
278
+ ): Promise<PoolGetResponse> {
182
279
  return this.client.sendOperationRequest(
183
- {
184
- resourceGroupName,
185
- accountName,
186
- poolName,
187
- options
188
- },
189
- getOperationSpec,
190
- callback) as Promise<Models.PoolGetResponse>;
280
+ { resourceGroupName, accountName, poolName, options },
281
+ getOperationSpec
282
+ );
191
283
  }
192
284
 
193
285
  /**
@@ -195,147 +287,70 @@ export class PoolOperations {
195
287
  * @param resourceGroupName The name of the resource group that contains the Batch account.
196
288
  * @param accountName The name of the Batch account.
197
289
  * @param poolName The pool name. This must be unique within the account.
198
- * @param [options] The optional parameters
199
- * @returns Promise<Models.PoolDisableAutoScaleResponse>
200
- */
201
- disableAutoScale(resourceGroupName: string, accountName: string, poolName: string, options?: msRest.RequestOptionsBase): Promise<Models.PoolDisableAutoScaleResponse>;
202
- /**
203
- * @param resourceGroupName The name of the resource group that contains the Batch account.
204
- * @param accountName The name of the Batch account.
205
- * @param poolName The pool name. This must be unique within the account.
206
- * @param callback The callback
207
- */
208
- disableAutoScale(resourceGroupName: string, accountName: string, poolName: string, callback: msRest.ServiceCallback<Models.Pool>): void;
209
- /**
210
- * @param resourceGroupName The name of the resource group that contains the Batch account.
211
- * @param accountName The name of the Batch account.
212
- * @param poolName The pool name. This must be unique within the account.
213
- * @param options The optional parameters
214
- * @param callback The callback
290
+ * @param options The options parameters.
215
291
  */
216
- disableAutoScale(resourceGroupName: string, accountName: string, poolName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.Pool>): void;
217
- disableAutoScale(resourceGroupName: string, accountName: string, poolName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.Pool>, callback?: msRest.ServiceCallback<Models.Pool>): Promise<Models.PoolDisableAutoScaleResponse> {
292
+ disableAutoScale(
293
+ resourceGroupName: string,
294
+ accountName: string,
295
+ poolName: string,
296
+ options?: PoolDisableAutoScaleOptionalParams
297
+ ): Promise<PoolDisableAutoScaleResponse> {
218
298
  return this.client.sendOperationRequest(
219
- {
220
- resourceGroupName,
221
- accountName,
222
- poolName,
223
- options
224
- },
225
- disableAutoScaleOperationSpec,
226
- callback) as Promise<Models.PoolDisableAutoScaleResponse>;
299
+ { resourceGroupName, accountName, poolName, options },
300
+ disableAutoScaleOperationSpec
301
+ );
227
302
  }
228
303
 
229
304
  /**
230
- * This does not restore the pool to its previous state before the resize operation: it only stops
231
- * any further changes being made, and the pool maintains its current state. After stopping, the
232
- * pool stabilizes at the number of nodes it was at when the stop operation was done. During the
233
- * stop operation, the pool allocation state changes first to stopping and then to steady. A resize
234
- * operation need not be an explicit resize pool request; this API can also be used to halt the
235
- * initial sizing of the pool when it is created.
236
- * @summary Stops an ongoing resize operation on the pool.
237
- * @param resourceGroupName The name of the resource group that contains the Batch account.
238
- * @param accountName The name of the Batch account.
239
- * @param poolName The pool name. This must be unique within the account.
240
- * @param [options] The optional parameters
241
- * @returns Promise<Models.PoolStopResizeResponse>
242
- */
243
- stopResize(resourceGroupName: string, accountName: string, poolName: string, options?: msRest.RequestOptionsBase): Promise<Models.PoolStopResizeResponse>;
244
- /**
245
- * @param resourceGroupName The name of the resource group that contains the Batch account.
246
- * @param accountName The name of the Batch account.
247
- * @param poolName The pool name. This must be unique within the account.
248
- * @param callback The callback
249
- */
250
- stopResize(resourceGroupName: string, accountName: string, poolName: string, callback: msRest.ServiceCallback<Models.Pool>): void;
251
- /**
305
+ * This does not restore the pool to its previous state before the resize operation: it only stops any
306
+ * further changes being made, and the pool maintains its current state. After stopping, the pool
307
+ * stabilizes at the number of nodes it was at when the stop operation was done. During the stop
308
+ * operation, the pool allocation state changes first to stopping and then to steady. A resize
309
+ * operation need not be an explicit resize pool request; this API can also be used to halt the initial
310
+ * sizing of the pool when it is created.
252
311
  * @param resourceGroupName The name of the resource group that contains the Batch account.
253
312
  * @param accountName The name of the Batch account.
254
313
  * @param poolName The pool name. This must be unique within the account.
255
- * @param options The optional parameters
256
- * @param callback The callback
314
+ * @param options The options parameters.
257
315
  */
258
- stopResize(resourceGroupName: string, accountName: string, poolName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.Pool>): void;
259
- stopResize(resourceGroupName: string, accountName: string, poolName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.Pool>, callback?: msRest.ServiceCallback<Models.Pool>): Promise<Models.PoolStopResizeResponse> {
316
+ stopResize(
317
+ resourceGroupName: string,
318
+ accountName: string,
319
+ poolName: string,
320
+ options?: PoolStopResizeOptionalParams
321
+ ): Promise<PoolStopResizeResponse> {
260
322
  return this.client.sendOperationRequest(
261
- {
262
- resourceGroupName,
263
- accountName,
264
- poolName,
265
- options
266
- },
267
- stopResizeOperationSpec,
268
- callback) as Promise<Models.PoolStopResizeResponse>;
323
+ { resourceGroupName, accountName, poolName, options },
324
+ stopResizeOperationSpec
325
+ );
269
326
  }
270
327
 
271
328
  /**
272
- * Deletes the specified pool.
329
+ * ListByBatchAccountNext
273
330
  * @param resourceGroupName The name of the resource group that contains the Batch account.
274
331
  * @param accountName The name of the Batch account.
275
- * @param poolName The pool name. This must be unique within the account.
276
- * @param [options] The optional parameters
277
- * @returns Promise<msRestAzure.LROPoller>
278
- */
279
- beginDeleteMethod(resourceGroupName: string, accountName: string, poolName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
280
- return this.client.sendLRORequest(
281
- {
282
- resourceGroupName,
283
- accountName,
284
- poolName,
285
- options
286
- },
287
- beginDeleteMethodOperationSpec,
288
- options);
289
- }
290
-
291
- /**
292
- * Lists all of the pools in the specified account.
293
- * @param nextPageLink The NextLink from the previous successful call to List operation.
294
- * @param [options] The optional parameters
295
- * @returns Promise<Models.PoolListByBatchAccountNextResponse>
332
+ * @param nextLink The nextLink from the previous successful call to the ListByBatchAccount method.
333
+ * @param options The options parameters.
296
334
  */
297
- listByBatchAccountNext(nextPageLink: string, options?: Models.PoolListByBatchAccountNextOptionalParams): Promise<Models.PoolListByBatchAccountNextResponse>;
298
- /**
299
- * @param nextPageLink The NextLink from the previous successful call to List operation.
300
- * @param callback The callback
301
- */
302
- listByBatchAccountNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.ListPoolsResult>): void;
303
- /**
304
- * @param nextPageLink The NextLink from the previous successful call to List operation.
305
- * @param options The optional parameters
306
- * @param callback The callback
307
- */
308
- listByBatchAccountNext(nextPageLink: string, options: Models.PoolListByBatchAccountNextOptionalParams, callback: msRest.ServiceCallback<Models.ListPoolsResult>): void;
309
- listByBatchAccountNext(nextPageLink: string, options?: Models.PoolListByBatchAccountNextOptionalParams | msRest.ServiceCallback<Models.ListPoolsResult>, callback?: msRest.ServiceCallback<Models.ListPoolsResult>): Promise<Models.PoolListByBatchAccountNextResponse> {
335
+ private _listByBatchAccountNext(
336
+ resourceGroupName: string,
337
+ accountName: string,
338
+ nextLink: string,
339
+ options?: PoolListByBatchAccountNextOptionalParams
340
+ ): Promise<PoolListByBatchAccountNextResponse> {
310
341
  return this.client.sendOperationRequest(
311
- {
312
- nextPageLink,
313
- options
314
- },
315
- listByBatchAccountNextOperationSpec,
316
- callback) as Promise<Models.PoolListByBatchAccountNextResponse>;
342
+ { resourceGroupName, accountName, nextLink, options },
343
+ listByBatchAccountNextOperationSpec
344
+ );
317
345
  }
318
346
  }
319
-
320
347
  // Operation Specifications
321
- const serializer = new msRest.Serializer(Mappers);
322
- const listByBatchAccountOperationSpec: msRest.OperationSpec = {
348
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
349
+
350
+ const listByBatchAccountOperationSpec: coreClient.OperationSpec = {
351
+ path:
352
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools",
323
353
  httpMethod: "GET",
324
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools",
325
- urlParameters: [
326
- Parameters.resourceGroupName,
327
- Parameters.accountName1,
328
- Parameters.subscriptionId
329
- ],
330
- queryParameters: [
331
- Parameters.maxresults,
332
- Parameters.select,
333
- Parameters.filter,
334
- Parameters.apiVersion
335
- ],
336
- headerParameters: [
337
- Parameters.acceptLanguage
338
- ],
339
354
  responses: {
340
355
  200: {
341
356
  bodyMapper: Mappers.ListPoolsResult
@@ -344,215 +359,181 @@ const listByBatchAccountOperationSpec: msRest.OperationSpec = {
344
359
  bodyMapper: Mappers.CloudError
345
360
  }
346
361
  },
347
- serializer
348
- };
349
-
350
- const createOperationSpec: msRest.OperationSpec = {
351
- httpMethod: "PUT",
352
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}",
353
- urlParameters: [
354
- Parameters.resourceGroupName,
355
- Parameters.accountName1,
356
- Parameters.poolName,
357
- Parameters.subscriptionId
358
- ],
359
362
  queryParameters: [
360
- Parameters.apiVersion
363
+ Parameters.apiVersion,
364
+ Parameters.maxresults,
365
+ Parameters.filter,
366
+ Parameters.select
361
367
  ],
362
- headerParameters: [
363
- Parameters.ifMatch,
364
- Parameters.ifNoneMatch,
365
- Parameters.acceptLanguage
368
+ urlParameters: [
369
+ Parameters.$host,
370
+ Parameters.resourceGroupName,
371
+ Parameters.subscriptionId,
372
+ Parameters.accountName1
366
373
  ],
367
- requestBody: {
368
- parameterPath: "parameters",
369
- mapper: {
370
- ...Mappers.Pool,
371
- required: true
372
- }
373
- },
374
+ headerParameters: [Parameters.accept],
375
+ serializer
376
+ };
377
+ const createOperationSpec: coreClient.OperationSpec = {
378
+ path:
379
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}",
380
+ httpMethod: "PUT",
374
381
  responses: {
375
382
  200: {
376
383
  bodyMapper: Mappers.Pool,
377
384
  headersMapper: Mappers.PoolCreateHeaders
378
385
  },
379
386
  default: {
380
- bodyMapper: Mappers.CloudError,
381
- headersMapper: Mappers.PoolCreateHeaders
387
+ bodyMapper: Mappers.CloudError
382
388
  }
383
389
  },
384
- serializer
385
- };
386
-
387
- const updateOperationSpec: msRest.OperationSpec = {
388
- httpMethod: "PATCH",
389
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}",
390
+ requestBody: Parameters.parameters10,
391
+ queryParameters: [Parameters.apiVersion],
390
392
  urlParameters: [
393
+ Parameters.$host,
391
394
  Parameters.resourceGroupName,
395
+ Parameters.subscriptionId,
392
396
  Parameters.accountName1,
393
- Parameters.poolName,
394
- Parameters.subscriptionId
395
- ],
396
- queryParameters: [
397
- Parameters.apiVersion
397
+ Parameters.poolName
398
398
  ],
399
399
  headerParameters: [
400
+ Parameters.contentType,
401
+ Parameters.accept,
400
402
  Parameters.ifMatch,
401
- Parameters.acceptLanguage
403
+ Parameters.ifNoneMatch
402
404
  ],
403
- requestBody: {
404
- parameterPath: "parameters",
405
- mapper: {
406
- ...Mappers.Pool,
407
- required: true
408
- }
409
- },
405
+ mediaType: "json",
406
+ serializer
407
+ };
408
+ const updateOperationSpec: coreClient.OperationSpec = {
409
+ path:
410
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}",
411
+ httpMethod: "PATCH",
410
412
  responses: {
411
413
  200: {
412
414
  bodyMapper: Mappers.Pool,
413
415
  headersMapper: Mappers.PoolUpdateHeaders
414
416
  },
415
417
  default: {
416
- bodyMapper: Mappers.CloudError,
417
- headersMapper: Mappers.PoolUpdateHeaders
418
+ bodyMapper: Mappers.CloudError
418
419
  }
419
420
  },
420
- serializer
421
- };
422
-
423
- const getOperationSpec: msRest.OperationSpec = {
424
- httpMethod: "GET",
425
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}",
421
+ requestBody: Parameters.parameters10,
422
+ queryParameters: [Parameters.apiVersion],
426
423
  urlParameters: [
424
+ Parameters.$host,
427
425
  Parameters.resourceGroupName,
426
+ Parameters.subscriptionId,
428
427
  Parameters.accountName1,
429
- Parameters.poolName,
430
- Parameters.subscriptionId
431
- ],
432
- queryParameters: [
433
- Parameters.apiVersion
428
+ Parameters.poolName
434
429
  ],
435
430
  headerParameters: [
436
- Parameters.acceptLanguage
431
+ Parameters.contentType,
432
+ Parameters.accept,
433
+ Parameters.ifMatch
437
434
  ],
435
+ mediaType: "json",
436
+ serializer
437
+ };
438
+ const deleteOperationSpec: coreClient.OperationSpec = {
439
+ path:
440
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}",
441
+ httpMethod: "DELETE",
438
442
  responses: {
439
- 200: {
440
- bodyMapper: Mappers.Pool,
441
- headersMapper: Mappers.PoolGetHeaders
442
- },
443
+ 200: {},
444
+ 201: {},
445
+ 202: {},
446
+ 204: {},
443
447
  default: {
444
- bodyMapper: Mappers.CloudError,
445
- headersMapper: Mappers.PoolGetHeaders
448
+ bodyMapper: Mappers.CloudError
446
449
  }
447
450
  },
448
- serializer
449
- };
450
-
451
- const disableAutoScaleOperationSpec: msRest.OperationSpec = {
452
- httpMethod: "POST",
453
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}/disableAutoScale",
451
+ queryParameters: [Parameters.apiVersion],
454
452
  urlParameters: [
453
+ Parameters.$host,
455
454
  Parameters.resourceGroupName,
455
+ Parameters.subscriptionId,
456
456
  Parameters.accountName1,
457
- Parameters.poolName,
458
- Parameters.subscriptionId
459
- ],
460
- queryParameters: [
461
- Parameters.apiVersion
462
- ],
463
- headerParameters: [
464
- Parameters.acceptLanguage
457
+ Parameters.poolName
465
458
  ],
459
+ headerParameters: [Parameters.accept],
460
+ serializer
461
+ };
462
+ const getOperationSpec: coreClient.OperationSpec = {
463
+ path:
464
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}",
465
+ httpMethod: "GET",
466
466
  responses: {
467
467
  200: {
468
468
  bodyMapper: Mappers.Pool,
469
- headersMapper: Mappers.PoolDisableAutoScaleHeaders
469
+ headersMapper: Mappers.PoolGetHeaders
470
470
  },
471
471
  default: {
472
- bodyMapper: Mappers.CloudError,
473
- headersMapper: Mappers.PoolDisableAutoScaleHeaders
472
+ bodyMapper: Mappers.CloudError
474
473
  }
475
474
  },
476
- serializer
477
- };
478
-
479
- const stopResizeOperationSpec: msRest.OperationSpec = {
480
- httpMethod: "POST",
481
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}/stopResize",
475
+ queryParameters: [Parameters.apiVersion],
482
476
  urlParameters: [
477
+ Parameters.$host,
483
478
  Parameters.resourceGroupName,
479
+ Parameters.subscriptionId,
484
480
  Parameters.accountName1,
485
- Parameters.poolName,
486
- Parameters.subscriptionId
487
- ],
488
- queryParameters: [
489
- Parameters.apiVersion
490
- ],
491
- headerParameters: [
492
- Parameters.acceptLanguage
481
+ Parameters.poolName
493
482
  ],
483
+ headerParameters: [Parameters.accept],
484
+ serializer
485
+ };
486
+ const disableAutoScaleOperationSpec: coreClient.OperationSpec = {
487
+ path:
488
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}/disableAutoScale",
489
+ httpMethod: "POST",
494
490
  responses: {
495
491
  200: {
496
492
  bodyMapper: Mappers.Pool,
497
- headersMapper: Mappers.PoolStopResizeHeaders
493
+ headersMapper: Mappers.PoolDisableAutoScaleHeaders
498
494
  },
499
495
  default: {
500
- bodyMapper: Mappers.CloudError,
501
- headersMapper: Mappers.PoolStopResizeHeaders
496
+ bodyMapper: Mappers.CloudError
502
497
  }
503
498
  },
504
- serializer
505
- };
506
-
507
- const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
508
- httpMethod: "DELETE",
509
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}",
499
+ queryParameters: [Parameters.apiVersion],
510
500
  urlParameters: [
501
+ Parameters.$host,
511
502
  Parameters.resourceGroupName,
503
+ Parameters.subscriptionId,
512
504
  Parameters.accountName1,
513
- Parameters.poolName,
514
- Parameters.subscriptionId
515
- ],
516
- queryParameters: [
517
- Parameters.apiVersion
518
- ],
519
- headerParameters: [
520
- Parameters.acceptLanguage
505
+ Parameters.poolName
521
506
  ],
507
+ headerParameters: [Parameters.accept],
508
+ serializer
509
+ };
510
+ const stopResizeOperationSpec: coreClient.OperationSpec = {
511
+ path:
512
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}/stopResize",
513
+ httpMethod: "POST",
522
514
  responses: {
523
515
  200: {
524
- headersMapper: Mappers.PoolDeleteHeaders
525
- },
526
- 202: {
527
- headersMapper: Mappers.PoolDeleteHeaders
528
- },
529
- 204: {
530
- headersMapper: Mappers.PoolDeleteHeaders
516
+ bodyMapper: Mappers.Pool,
517
+ headersMapper: Mappers.PoolStopResizeHeaders
531
518
  },
532
519
  default: {
533
- bodyMapper: Mappers.CloudError,
534
- headersMapper: Mappers.PoolDeleteHeaders
520
+ bodyMapper: Mappers.CloudError
535
521
  }
536
522
  },
523
+ queryParameters: [Parameters.apiVersion],
524
+ urlParameters: [
525
+ Parameters.$host,
526
+ Parameters.resourceGroupName,
527
+ Parameters.subscriptionId,
528
+ Parameters.accountName1,
529
+ Parameters.poolName
530
+ ],
531
+ headerParameters: [Parameters.accept],
537
532
  serializer
538
533
  };
539
-
540
- const listByBatchAccountNextOperationSpec: msRest.OperationSpec = {
541
- httpMethod: "GET",
542
- baseUrl: "https://management.azure.com",
534
+ const listByBatchAccountNextOperationSpec: coreClient.OperationSpec = {
543
535
  path: "{nextLink}",
544
- urlParameters: [
545
- Parameters.nextPageLink
546
- ],
547
- queryParameters: [
548
- Parameters.maxresults,
549
- Parameters.select,
550
- Parameters.filter,
551
- Parameters.apiVersion
552
- ],
553
- headerParameters: [
554
- Parameters.acceptLanguage
555
- ],
536
+ httpMethod: "GET",
556
537
  responses: {
557
538
  200: {
558
539
  bodyMapper: Mappers.ListPoolsResult
@@ -561,5 +542,19 @@ const listByBatchAccountNextOperationSpec: msRest.OperationSpec = {
561
542
  bodyMapper: Mappers.CloudError
562
543
  }
563
544
  },
545
+ queryParameters: [
546
+ Parameters.apiVersion,
547
+ Parameters.maxresults,
548
+ Parameters.filter,
549
+ Parameters.select
550
+ ],
551
+ urlParameters: [
552
+ Parameters.$host,
553
+ Parameters.resourceGroupName,
554
+ Parameters.subscriptionId,
555
+ Parameters.accountName1,
556
+ Parameters.nextLink
557
+ ],
558
+ headerParameters: [Parameters.accept],
564
559
  serializer
565
560
  };