@azure/arm-batch 5.0.0 → 7.0.0-alpha.20211214.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 (258) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/{LICENSE.txt → LICENSE} +2 -2
  3. package/README.md +72 -77
  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/dist-esm/src/models/index.js +9 -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 +1814 -1452
  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 +3 -5
  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/dist-esm/src/operationsInterfaces/applicationOperations.js +9 -0
  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/dist-esm/src/operationsInterfaces/applicationPackageOperations.js +9 -0
  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/dist-esm/src/operationsInterfaces/batchAccountOperations.js +9 -0
  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 +65 -29
  121. package/review/arm-batch.api.md +1459 -0
  122. package/rollup.config.js +181 -30
  123. package/src/batchManagementClient.ts +61 -45
  124. package/src/batchManagementClientContext.ts +48 -40
  125. package/src/index.ts +13 -0
  126. package/src/lroImpl.ts +34 -0
  127. package/src/models/index.ts +1469 -3055
  128. package/src/models/mappers.ts +1967 -1573
  129. package/src/models/parameters.ts +218 -120
  130. package/src/operations/applicationOperations.ts +217 -262
  131. package/src/operations/applicationPackageOperations.ts +254 -277
  132. package/src/operations/batchAccountOperations.ts +682 -466
  133. package/src/operations/certificateOperations.ts +365 -353
  134. package/src/operations/index.ts +3 -5
  135. package/src/operations/location.ts +344 -78
  136. package/src/operations/operations.ts +84 -70
  137. package/src/operations/poolOperations.ts +379 -375
  138. package/src/operations/privateEndpointConnectionOperations.ts +271 -168
  139. package/src/operations/privateLinkResourceOperations.ts +158 -125
  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 -6207
  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 -27
  158. package/esm/batchManagementClient.d.ts.map +0 -1
  159. package/esm/batchManagementClient.js +0 -42
  160. package/esm/batchManagementClient.js.map +0 -1
  161. package/esm/batchManagementClientContext.d.ts +0 -17
  162. package/esm/batchManagementClientContext.d.ts.map +0 -1
  163. package/esm/batchManagementClientContext.js +0 -57
  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 -3392
  182. package/esm/models/index.d.ts.map +0 -1
  183. package/esm/models/index.js +0 -8
  184. package/esm/models/index.js.map +0 -1
  185. package/esm/models/locationMappers.d.ts +0 -2
  186. package/esm/models/locationMappers.d.ts.map +0 -1
  187. package/esm/models/locationMappers.js +0 -9
  188. package/esm/models/locationMappers.js.map +0 -1
  189. package/esm/models/mappers.d.ts +0 -96
  190. package/esm/models/mappers.d.ts.map +0 -1
  191. package/esm/models/mappers.js.map +0 -1
  192. package/esm/models/operationsMappers.d.ts +0 -2
  193. package/esm/models/operationsMappers.d.ts.map +0 -1
  194. package/esm/models/operationsMappers.js +0 -9
  195. package/esm/models/operationsMappers.js.map +0 -1
  196. package/esm/models/parameters.d.ts +0 -21
  197. package/esm/models/parameters.d.ts.map +0 -1
  198. package/esm/models/parameters.js +0 -251
  199. package/esm/models/parameters.js.map +0 -1
  200. package/esm/models/poolOperationsMappers.d.ts +0 -2
  201. package/esm/models/poolOperationsMappers.d.ts.map +0 -1
  202. package/esm/models/poolOperationsMappers.js +0 -9
  203. package/esm/models/poolOperationsMappers.js.map +0 -1
  204. package/esm/models/privateEndpointConnectionOperationsMappers.d.ts +0 -2
  205. package/esm/models/privateEndpointConnectionOperationsMappers.d.ts.map +0 -1
  206. package/esm/models/privateEndpointConnectionOperationsMappers.js +0 -9
  207. package/esm/models/privateEndpointConnectionOperationsMappers.js.map +0 -1
  208. package/esm/models/privateLinkResourceOperationsMappers.d.ts +0 -2
  209. package/esm/models/privateLinkResourceOperationsMappers.d.ts.map +0 -1
  210. package/esm/models/privateLinkResourceOperationsMappers.js +0 -9
  211. package/esm/models/privateLinkResourceOperationsMappers.js.map +0 -1
  212. package/esm/operations/applicationOperations.d.ts +0 -151
  213. package/esm/operations/applicationOperations.d.ts.map +0 -1
  214. package/esm/operations/applicationOperations.js +0 -229
  215. package/esm/operations/applicationOperations.js.map +0 -1
  216. package/esm/operations/applicationPackageOperations.d.ts +0 -170
  217. package/esm/operations/applicationPackageOperations.d.ts.map +0 -1
  218. package/esm/operations/applicationPackageOperations.js +0 -241
  219. package/esm/operations/applicationPackageOperations.js.map +0 -1
  220. package/esm/operations/batchAccountOperations.d.ts +0 -246
  221. package/esm/operations/batchAccountOperations.d.ts.map +0 -1
  222. package/esm/operations/batchAccountOperations.js +0 -428
  223. package/esm/operations/batchAccountOperations.js.map +0 -1
  224. package/esm/operations/certificateOperations.d.ts +0 -198
  225. package/esm/operations/certificateOperations.d.ts.map +0 -1
  226. package/esm/operations/certificateOperations.js +0 -331
  227. package/esm/operations/certificateOperations.js.map +0 -1
  228. package/esm/operations/index.d.ts.map +0 -1
  229. package/esm/operations/index.js.map +0 -1
  230. package/esm/operations/location.d.ts +0 -52
  231. package/esm/operations/location.d.ts.map +0 -1
  232. package/esm/operations/location.js +0 -93
  233. package/esm/operations/location.js.map +0 -1
  234. package/esm/operations/operations.d.ts +0 -46
  235. package/esm/operations/operations.d.ts.map +0 -1
  236. package/esm/operations/operations.js +0 -77
  237. package/esm/operations/operations.js.map +0 -1
  238. package/esm/operations/poolOperations.d.ts +0 -199
  239. package/esm/operations/poolOperations.d.ts.map +0 -1
  240. package/esm/operations/poolOperations.js +0 -358
  241. package/esm/operations/poolOperations.js.map +0 -1
  242. package/esm/operations/privateEndpointConnectionOperations.d.ts +0 -104
  243. package/esm/operations/privateEndpointConnectionOperations.d.ts.map +0 -1
  244. package/esm/operations/privateEndpointConnectionOperations.js +0 -192
  245. package/esm/operations/privateEndpointConnectionOperations.js.map +0 -1
  246. package/esm/operations/privateLinkResourceOperations.d.ts +0 -79
  247. package/esm/operations/privateLinkResourceOperations.d.ts.map +0 -1
  248. package/esm/operations/privateLinkResourceOperations.js +0 -118
  249. package/esm/operations/privateLinkResourceOperations.js.map +0 -1
  250. package/src/models/applicationOperationsMappers.ts +0 -72
  251. package/src/models/applicationPackageOperationsMappers.ts +0 -73
  252. package/src/models/batchAccountOperationsMappers.ts +0 -78
  253. package/src/models/certificateOperationsMappers.ts +0 -77
  254. package/src/models/locationMappers.ts +0 -14
  255. package/src/models/operationsMappers.ts +0 -14
  256. package/src/models/poolOperationsMappers.ts +0 -78
  257. package/src/models/privateEndpointConnectionOperationsMappers.ts +0 -73
  258. package/src/models/privateLinkResourceOperationsMappers.ts +0 -72
@@ -1,27 +1,45 @@
1
1
  /*
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for
4
- * license information.
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
5
4
  *
6
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is
8
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
9
7
  */
10
8
 
11
- import * as msRest from "@azure/ms-rest-js";
12
- import * as msRestAzure from "@azure/ms-rest-azure-js";
13
- import * as Models from "../models";
14
- import * as Mappers from "../models/certificateOperationsMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { CertificateOperations } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
15
13
  import * as Parameters from "../models/parameters";
16
14
  import { BatchManagementClientContext } from "../batchManagementClientContext";
15
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
+ import { LroImpl } from "../lroImpl";
17
+ import {
18
+ Certificate,
19
+ CertificateListByBatchAccountNextOptionalParams,
20
+ CertificateListByBatchAccountOptionalParams,
21
+ CertificateListByBatchAccountResponse,
22
+ CertificateCreateOrUpdateParameters,
23
+ CertificateCreateOptionalParams,
24
+ CertificateCreateResponse,
25
+ CertificateUpdateOptionalParams,
26
+ CertificateUpdateResponse,
27
+ CertificateDeleteOptionalParams,
28
+ CertificateGetOptionalParams,
29
+ CertificateGetResponse,
30
+ CertificateCancelDeletionOptionalParams,
31
+ CertificateCancelDeletionResponse,
32
+ CertificateListByBatchAccountNextResponse
33
+ } from "../models";
17
34
 
18
- /** Class representing a CertificateOperations. */
19
- export class CertificateOperations {
35
+ /// <reference lib="esnext.asynciterable" />
36
+ /** Class containing CertificateOperations operations. */
37
+ export class CertificateOperationsImpl implements CertificateOperations {
20
38
  private readonly client: BatchManagementClientContext;
21
39
 
22
40
  /**
23
- * Create a CertificateOperations.
24
- * @param {BatchManagementClientContext} client Reference to the service client.
41
+ * Initialize a new instance of the class CertificateOperations class.
42
+ * @param client Reference to the service client
25
43
  */
26
44
  constructor(client: BatchManagementClientContext) {
27
45
  this.client = client;
@@ -31,32 +49,88 @@ export class CertificateOperations {
31
49
  * Lists all of the certificates in the specified account.
32
50
  * @param resourceGroupName The name of the resource group that contains the Batch account.
33
51
  * @param accountName The name of the Batch account.
34
- * @param [options] The optional parameters
35
- * @returns Promise<Models.CertificateListByBatchAccountResponse>
52
+ * @param options The options parameters.
36
53
  */
37
- listByBatchAccount(resourceGroupName: string, accountName: string, options?: Models.CertificateListByBatchAccountOptionalParams): Promise<Models.CertificateListByBatchAccountResponse>;
38
- /**
39
- * @param resourceGroupName The name of the resource group that contains the Batch account.
40
- * @param accountName The name of the Batch account.
41
- * @param callback The callback
42
- */
43
- listByBatchAccount(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback<Models.ListCertificatesResult>): void;
54
+ public listByBatchAccount(
55
+ resourceGroupName: string,
56
+ accountName: string,
57
+ options?: CertificateListByBatchAccountOptionalParams
58
+ ): PagedAsyncIterableIterator<Certificate> {
59
+ const iter = this.listByBatchAccountPagingAll(
60
+ resourceGroupName,
61
+ accountName,
62
+ options
63
+ );
64
+ return {
65
+ next() {
66
+ return iter.next();
67
+ },
68
+ [Symbol.asyncIterator]() {
69
+ return this;
70
+ },
71
+ byPage: () => {
72
+ return this.listByBatchAccountPagingPage(
73
+ resourceGroupName,
74
+ accountName,
75
+ options
76
+ );
77
+ }
78
+ };
79
+ }
80
+
81
+ private async *listByBatchAccountPagingPage(
82
+ resourceGroupName: string,
83
+ accountName: string,
84
+ options?: CertificateListByBatchAccountOptionalParams
85
+ ): AsyncIterableIterator<Certificate[]> {
86
+ let result = await this._listByBatchAccount(
87
+ resourceGroupName,
88
+ accountName,
89
+ options
90
+ );
91
+ yield result.value || [];
92
+ let continuationToken = result.nextLink;
93
+ while (continuationToken) {
94
+ result = await this._listByBatchAccountNext(
95
+ resourceGroupName,
96
+ accountName,
97
+ continuationToken,
98
+ options
99
+ );
100
+ continuationToken = result.nextLink;
101
+ yield result.value || [];
102
+ }
103
+ }
104
+
105
+ private async *listByBatchAccountPagingAll(
106
+ resourceGroupName: string,
107
+ accountName: string,
108
+ options?: CertificateListByBatchAccountOptionalParams
109
+ ): AsyncIterableIterator<Certificate> {
110
+ for await (const page of this.listByBatchAccountPagingPage(
111
+ resourceGroupName,
112
+ accountName,
113
+ options
114
+ )) {
115
+ yield* page;
116
+ }
117
+ }
118
+
44
119
  /**
120
+ * Lists all of the certificates in the specified account.
45
121
  * @param resourceGroupName The name of the resource group that contains the Batch account.
46
122
  * @param accountName The name of the Batch account.
47
- * @param options The optional parameters
48
- * @param callback The callback
123
+ * @param options The options parameters.
49
124
  */
50
- listByBatchAccount(resourceGroupName: string, accountName: string, options: Models.CertificateListByBatchAccountOptionalParams, callback: msRest.ServiceCallback<Models.ListCertificatesResult>): void;
51
- listByBatchAccount(resourceGroupName: string, accountName: string, options?: Models.CertificateListByBatchAccountOptionalParams | msRest.ServiceCallback<Models.ListCertificatesResult>, callback?: msRest.ServiceCallback<Models.ListCertificatesResult>): Promise<Models.CertificateListByBatchAccountResponse> {
125
+ private _listByBatchAccount(
126
+ resourceGroupName: string,
127
+ accountName: string,
128
+ options?: CertificateListByBatchAccountOptionalParams
129
+ ): Promise<CertificateListByBatchAccountResponse> {
52
130
  return this.client.sendOperationRequest(
53
- {
54
- resourceGroupName,
55
- accountName,
56
- options
57
- },
58
- listByBatchAccountOperationSpec,
59
- callback) as Promise<Models.CertificateListByBatchAccountResponse>;
131
+ { resourceGroupName, accountName, options },
132
+ listByBatchAccountOperationSpec
133
+ );
60
134
  }
61
135
 
62
136
  /**
@@ -64,15 +138,22 @@ export class CertificateOperations {
64
138
  * @param resourceGroupName The name of the resource group that contains the Batch account.
65
139
  * @param accountName The name of the Batch account.
66
140
  * @param certificateName The identifier for the certificate. This must be made up of algorithm and
67
- * thumbprint separated by a dash, and must match the certificate data in the request. For example
68
- * SHA1-a3d1c5.
141
+ * thumbprint separated by a dash, and must match the certificate data in the request. For example
142
+ * SHA1-a3d1c5.
69
143
  * @param parameters Additional parameters for certificate creation.
70
- * @param [options] The optional parameters
71
- * @returns Promise<Models.CertificateCreateResponse>
144
+ * @param options The options parameters.
72
145
  */
73
- create(resourceGroupName: string, accountName: string, certificateName: string, parameters: Models.CertificateCreateOrUpdateParameters, options?: Models.CertificateCreateOptionalParams): Promise<Models.CertificateCreateResponse> {
74
- return this.beginCreate(resourceGroupName,accountName,certificateName,parameters,options)
75
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.CertificateCreateResponse>;
146
+ create(
147
+ resourceGroupName: string,
148
+ accountName: string,
149
+ certificateName: string,
150
+ parameters: CertificateCreateOrUpdateParameters,
151
+ options?: CertificateCreateOptionalParams
152
+ ): Promise<CertificateCreateResponse> {
153
+ return this.client.sendOperationRequest(
154
+ { resourceGroupName, accountName, certificateName, parameters, options },
155
+ createOperationSpec
156
+ );
76
157
  }
77
158
 
78
159
  /**
@@ -80,45 +161,22 @@ export class CertificateOperations {
80
161
  * @param resourceGroupName The name of the resource group that contains the Batch account.
81
162
  * @param accountName The name of the Batch account.
82
163
  * @param certificateName The identifier for the certificate. This must be made up of algorithm and
83
- * thumbprint separated by a dash, and must match the certificate data in the request. For example
84
- * SHA1-a3d1c5.
164
+ * thumbprint separated by a dash, and must match the certificate data in the request. For example
165
+ * SHA1-a3d1c5.
85
166
  * @param parameters Certificate entity to update.
86
- * @param [options] The optional parameters
87
- * @returns Promise<Models.CertificateUpdateResponse>
167
+ * @param options The options parameters.
88
168
  */
89
- update(resourceGroupName: string, accountName: string, certificateName: string, parameters: Models.CertificateCreateOrUpdateParameters, options?: Models.CertificateUpdateOptionalParams): Promise<Models.CertificateUpdateResponse>;
90
- /**
91
- * @param resourceGroupName The name of the resource group that contains the Batch account.
92
- * @param accountName The name of the Batch account.
93
- * @param certificateName The identifier for the certificate. This must be made up of algorithm and
94
- * thumbprint separated by a dash, and must match the certificate data in the request. For example
95
- * SHA1-a3d1c5.
96
- * @param parameters Certificate entity to update.
97
- * @param callback The callback
98
- */
99
- update(resourceGroupName: string, accountName: string, certificateName: string, parameters: Models.CertificateCreateOrUpdateParameters, callback: msRest.ServiceCallback<Models.Certificate>): void;
100
- /**
101
- * @param resourceGroupName The name of the resource group that contains the Batch account.
102
- * @param accountName The name of the Batch account.
103
- * @param certificateName The identifier for the certificate. This must be made up of algorithm and
104
- * thumbprint separated by a dash, and must match the certificate data in the request. For example
105
- * SHA1-a3d1c5.
106
- * @param parameters Certificate entity to update.
107
- * @param options The optional parameters
108
- * @param callback The callback
109
- */
110
- update(resourceGroupName: string, accountName: string, certificateName: string, parameters: Models.CertificateCreateOrUpdateParameters, options: Models.CertificateUpdateOptionalParams, callback: msRest.ServiceCallback<Models.Certificate>): void;
111
- update(resourceGroupName: string, accountName: string, certificateName: string, parameters: Models.CertificateCreateOrUpdateParameters, options?: Models.CertificateUpdateOptionalParams | msRest.ServiceCallback<Models.Certificate>, callback?: msRest.ServiceCallback<Models.Certificate>): Promise<Models.CertificateUpdateResponse> {
169
+ update(
170
+ resourceGroupName: string,
171
+ accountName: string,
172
+ certificateName: string,
173
+ parameters: CertificateCreateOrUpdateParameters,
174
+ options?: CertificateUpdateOptionalParams
175
+ ): Promise<CertificateUpdateResponse> {
112
176
  return this.client.sendOperationRequest(
113
- {
114
- resourceGroupName,
115
- accountName,
116
- certificateName,
117
- parameters,
118
- options
119
- },
120
- updateOperationSpec,
121
- callback) as Promise<Models.CertificateUpdateResponse>;
177
+ { resourceGroupName, accountName, certificateName, parameters, options },
178
+ updateOperationSpec
179
+ );
122
180
  }
123
181
 
124
182
  /**
@@ -126,383 +184,323 @@ export class CertificateOperations {
126
184
  * @param resourceGroupName The name of the resource group that contains the Batch account.
127
185
  * @param accountName The name of the Batch account.
128
186
  * @param certificateName The identifier for the certificate. This must be made up of algorithm and
129
- * thumbprint separated by a dash, and must match the certificate data in the request. For example
130
- * SHA1-a3d1c5.
131
- * @param [options] The optional parameters
132
- * @returns Promise<Models.CertificateDeleteResponse>
187
+ * thumbprint separated by a dash, and must match the certificate data in the request. For example
188
+ * SHA1-a3d1c5.
189
+ * @param options The options parameters.
133
190
  */
134
- deleteMethod(resourceGroupName: string, accountName: string, certificateName: string, options?: msRest.RequestOptionsBase): Promise<Models.CertificateDeleteResponse> {
135
- return this.beginDeleteMethod(resourceGroupName,accountName,certificateName,options)
136
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.CertificateDeleteResponse>;
191
+ async beginDelete(
192
+ resourceGroupName: string,
193
+ accountName: string,
194
+ certificateName: string,
195
+ options?: CertificateDeleteOptionalParams
196
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
197
+ const directSendOperation = async (
198
+ args: coreClient.OperationArguments,
199
+ spec: coreClient.OperationSpec
200
+ ): Promise<void> => {
201
+ return this.client.sendOperationRequest(args, spec);
202
+ };
203
+ const sendOperation = async (
204
+ args: coreClient.OperationArguments,
205
+ spec: coreClient.OperationSpec
206
+ ) => {
207
+ let currentRawResponse:
208
+ | coreClient.FullOperationResponse
209
+ | undefined = undefined;
210
+ const providedCallback = args.options?.onResponse;
211
+ const callback: coreClient.RawResponseCallback = (
212
+ rawResponse: coreClient.FullOperationResponse,
213
+ flatResponse: unknown
214
+ ) => {
215
+ currentRawResponse = rawResponse;
216
+ providedCallback?.(rawResponse, flatResponse);
217
+ };
218
+ const updatedArgs = {
219
+ ...args,
220
+ options: {
221
+ ...args.options,
222
+ onResponse: callback
223
+ }
224
+ };
225
+ const flatResponse = await directSendOperation(updatedArgs, spec);
226
+ return {
227
+ flatResponse,
228
+ rawResponse: {
229
+ statusCode: currentRawResponse!.status,
230
+ body: currentRawResponse!.parsedBody,
231
+ headers: currentRawResponse!.headers.toJSON()
232
+ }
233
+ };
234
+ };
235
+
236
+ const lro = new LroImpl(
237
+ sendOperation,
238
+ { resourceGroupName, accountName, certificateName, options },
239
+ deleteOperationSpec
240
+ );
241
+ return new LroEngine(lro, {
242
+ resumeFrom: options?.resumeFrom,
243
+ intervalInMs: options?.updateIntervalInMs,
244
+ lroResourceLocationConfig: "location"
245
+ });
137
246
  }
138
247
 
139
248
  /**
140
- * Gets information about the specified certificate.
141
- * @param resourceGroupName The name of the resource group that contains the Batch account.
142
- * @param accountName The name of the Batch account.
143
- * @param certificateName The identifier for the certificate. This must be made up of algorithm and
144
- * thumbprint separated by a dash, and must match the certificate data in the request. For example
145
- * SHA1-a3d1c5.
146
- * @param [options] The optional parameters
147
- * @returns Promise<Models.CertificateGetResponse>
148
- */
149
- get(resourceGroupName: string, accountName: string, certificateName: string, options?: msRest.RequestOptionsBase): Promise<Models.CertificateGetResponse>;
150
- /**
151
- * @param resourceGroupName The name of the resource group that contains the Batch account.
152
- * @param accountName The name of the Batch account.
153
- * @param certificateName The identifier for the certificate. This must be made up of algorithm and
154
- * thumbprint separated by a dash, and must match the certificate data in the request. For example
155
- * SHA1-a3d1c5.
156
- * @param callback The callback
157
- */
158
- get(resourceGroupName: string, accountName: string, certificateName: string, callback: msRest.ServiceCallback<Models.Certificate>): void;
159
- /**
249
+ * Deletes the specified certificate.
160
250
  * @param resourceGroupName The name of the resource group that contains the Batch account.
161
251
  * @param accountName The name of the Batch account.
162
252
  * @param certificateName The identifier for the certificate. This must be made up of algorithm and
163
- * thumbprint separated by a dash, and must match the certificate data in the request. For example
164
- * SHA1-a3d1c5.
165
- * @param options The optional parameters
166
- * @param callback The callback
253
+ * thumbprint separated by a dash, and must match the certificate data in the request. For example
254
+ * SHA1-a3d1c5.
255
+ * @param options The options parameters.
167
256
  */
168
- get(resourceGroupName: string, accountName: string, certificateName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.Certificate>): void;
169
- get(resourceGroupName: string, accountName: string, certificateName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.Certificate>, callback?: msRest.ServiceCallback<Models.Certificate>): Promise<Models.CertificateGetResponse> {
170
- return this.client.sendOperationRequest(
171
- {
172
- resourceGroupName,
173
- accountName,
174
- certificateName,
175
- options
176
- },
177
- getOperationSpec,
178
- callback) as Promise<Models.CertificateGetResponse>;
257
+ async beginDeleteAndWait(
258
+ resourceGroupName: string,
259
+ accountName: string,
260
+ certificateName: string,
261
+ options?: CertificateDeleteOptionalParams
262
+ ): Promise<void> {
263
+ const poller = await this.beginDelete(
264
+ resourceGroupName,
265
+ accountName,
266
+ certificateName,
267
+ options
268
+ );
269
+ return poller.pollUntilDone();
179
270
  }
180
271
 
181
272
  /**
182
- * If you try to delete a certificate that is being used by a pool or compute node, the status of
183
- * the certificate changes to deleteFailed. If you decide that you want to continue using the
184
- * certificate, you can use this operation to set the status of the certificate back to active. If
185
- * you intend to delete the certificate, you do not need to run this operation after the deletion
186
- * failed. You must make sure that the certificate is not being used by any resources, and then you
187
- * can try again to delete the certificate.
188
- * @summary Cancels a failed deletion of a certificate from the specified account.
189
- * @param resourceGroupName The name of the resource group that contains the Batch account.
190
- * @param accountName The name of the Batch account.
191
- * @param certificateName The identifier for the certificate. This must be made up of algorithm and
192
- * thumbprint separated by a dash, and must match the certificate data in the request. For example
193
- * SHA1-a3d1c5.
194
- * @param [options] The optional parameters
195
- * @returns Promise<Models.CertificateCancelDeletionResponse>
196
- */
197
- cancelDeletion(resourceGroupName: string, accountName: string, certificateName: string, options?: msRest.RequestOptionsBase): Promise<Models.CertificateCancelDeletionResponse>;
198
- /**
199
- * @param resourceGroupName The name of the resource group that contains the Batch account.
200
- * @param accountName The name of the Batch account.
201
- * @param certificateName The identifier for the certificate. This must be made up of algorithm and
202
- * thumbprint separated by a dash, and must match the certificate data in the request. For example
203
- * SHA1-a3d1c5.
204
- * @param callback The callback
205
- */
206
- cancelDeletion(resourceGroupName: string, accountName: string, certificateName: string, callback: msRest.ServiceCallback<Models.Certificate>): void;
207
- /**
273
+ * Gets information about the specified certificate.
208
274
  * @param resourceGroupName The name of the resource group that contains the Batch account.
209
275
  * @param accountName The name of the Batch account.
210
276
  * @param certificateName The identifier for the certificate. This must be made up of algorithm and
211
- * thumbprint separated by a dash, and must match the certificate data in the request. For example
212
- * SHA1-a3d1c5.
213
- * @param options The optional parameters
214
- * @param callback The callback
277
+ * thumbprint separated by a dash, and must match the certificate data in the request. For example
278
+ * SHA1-a3d1c5.
279
+ * @param options The options parameters.
215
280
  */
216
- cancelDeletion(resourceGroupName: string, accountName: string, certificateName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.Certificate>): void;
217
- cancelDeletion(resourceGroupName: string, accountName: string, certificateName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.Certificate>, callback?: msRest.ServiceCallback<Models.Certificate>): Promise<Models.CertificateCancelDeletionResponse> {
281
+ get(
282
+ resourceGroupName: string,
283
+ accountName: string,
284
+ certificateName: string,
285
+ options?: CertificateGetOptionalParams
286
+ ): Promise<CertificateGetResponse> {
218
287
  return this.client.sendOperationRequest(
219
- {
220
- resourceGroupName,
221
- accountName,
222
- certificateName,
223
- options
224
- },
225
- cancelDeletionOperationSpec,
226
- callback) as Promise<Models.CertificateCancelDeletionResponse>;
288
+ { resourceGroupName, accountName, certificateName, options },
289
+ getOperationSpec
290
+ );
227
291
  }
228
292
 
229
293
  /**
230
- * Creates a new certificate inside the specified account.
294
+ * If you try to delete a certificate that is being used by a pool or compute node, the status of the
295
+ * certificate changes to deleteFailed. If you decide that you want to continue using the certificate,
296
+ * you can use this operation to set the status of the certificate back to active. If you intend to
297
+ * delete the certificate, you do not need to run this operation after the deletion failed. You must
298
+ * make sure that the certificate is not being used by any resources, and then you can try again to
299
+ * delete the certificate.
231
300
  * @param resourceGroupName The name of the resource group that contains the Batch account.
232
301
  * @param accountName The name of the Batch account.
233
302
  * @param certificateName The identifier for the certificate. This must be made up of algorithm and
234
- * thumbprint separated by a dash, and must match the certificate data in the request. For example
235
- * SHA1-a3d1c5.
236
- * @param parameters Additional parameters for certificate creation.
237
- * @param [options] The optional parameters
238
- * @returns Promise<msRestAzure.LROPoller>
303
+ * thumbprint separated by a dash, and must match the certificate data in the request. For example
304
+ * SHA1-a3d1c5.
305
+ * @param options The options parameters.
239
306
  */
240
- beginCreate(resourceGroupName: string, accountName: string, certificateName: string, parameters: Models.CertificateCreateOrUpdateParameters, options?: Models.CertificateBeginCreateOptionalParams): Promise<msRestAzure.LROPoller> {
241
- return this.client.sendLRORequest(
242
- {
243
- resourceGroupName,
244
- accountName,
245
- certificateName,
246
- parameters,
247
- options
248
- },
249
- beginCreateOperationSpec,
250
- options);
307
+ cancelDeletion(
308
+ resourceGroupName: string,
309
+ accountName: string,
310
+ certificateName: string,
311
+ options?: CertificateCancelDeletionOptionalParams
312
+ ): Promise<CertificateCancelDeletionResponse> {
313
+ return this.client.sendOperationRequest(
314
+ { resourceGroupName, accountName, certificateName, options },
315
+ cancelDeletionOperationSpec
316
+ );
251
317
  }
252
318
 
253
319
  /**
254
- * Deletes the specified certificate.
320
+ * ListByBatchAccountNext
255
321
  * @param resourceGroupName The name of the resource group that contains the Batch account.
256
322
  * @param accountName The name of the Batch account.
257
- * @param certificateName The identifier for the certificate. This must be made up of algorithm and
258
- * thumbprint separated by a dash, and must match the certificate data in the request. For example
259
- * SHA1-a3d1c5.
260
- * @param [options] The optional parameters
261
- * @returns Promise<msRestAzure.LROPoller>
262
- */
263
- beginDeleteMethod(resourceGroupName: string, accountName: string, certificateName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
264
- return this.client.sendLRORequest(
265
- {
266
- resourceGroupName,
267
- accountName,
268
- certificateName,
269
- options
270
- },
271
- beginDeleteMethodOperationSpec,
272
- options);
273
- }
274
-
275
- /**
276
- * Lists all of the certificates in the specified account.
277
- * @param nextPageLink The NextLink from the previous successful call to List operation.
278
- * @param [options] The optional parameters
279
- * @returns Promise<Models.CertificateListByBatchAccountNextResponse>
280
- */
281
- listByBatchAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.CertificateListByBatchAccountNextResponse>;
282
- /**
283
- * @param nextPageLink The NextLink from the previous successful call to List operation.
284
- * @param callback The callback
285
- */
286
- listByBatchAccountNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.ListCertificatesResult>): void;
287
- /**
288
- * @param nextPageLink The NextLink from the previous successful call to List operation.
289
- * @param options The optional parameters
290
- * @param callback The callback
323
+ * @param nextLink The nextLink from the previous successful call to the ListByBatchAccount method.
324
+ * @param options The options parameters.
291
325
  */
292
- listByBatchAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ListCertificatesResult>): void;
293
- listByBatchAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ListCertificatesResult>, callback?: msRest.ServiceCallback<Models.ListCertificatesResult>): Promise<Models.CertificateListByBatchAccountNextResponse> {
326
+ private _listByBatchAccountNext(
327
+ resourceGroupName: string,
328
+ accountName: string,
329
+ nextLink: string,
330
+ options?: CertificateListByBatchAccountNextOptionalParams
331
+ ): Promise<CertificateListByBatchAccountNextResponse> {
294
332
  return this.client.sendOperationRequest(
295
- {
296
- nextPageLink,
297
- options
298
- },
299
- listByBatchAccountNextOperationSpec,
300
- callback) as Promise<Models.CertificateListByBatchAccountNextResponse>;
333
+ { resourceGroupName, accountName, nextLink, options },
334
+ listByBatchAccountNextOperationSpec
335
+ );
301
336
  }
302
337
  }
303
-
304
338
  // Operation Specifications
305
- const serializer = new msRest.Serializer(Mappers);
306
- const listByBatchAccountOperationSpec: msRest.OperationSpec = {
339
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
340
+
341
+ const listByBatchAccountOperationSpec: coreClient.OperationSpec = {
342
+ path:
343
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates",
307
344
  httpMethod: "GET",
308
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates",
309
- urlParameters: [
310
- Parameters.resourceGroupName,
311
- Parameters.accountName1,
312
- Parameters.subscriptionId
313
- ],
345
+ responses: {
346
+ 200: {
347
+ bodyMapper: Mappers.ListCertificatesResult
348
+ },
349
+ default: {
350
+ bodyMapper: Mappers.CloudError
351
+ }
352
+ },
314
353
  queryParameters: [
354
+ Parameters.apiVersion,
315
355
  Parameters.maxresults,
316
- Parameters.select,
317
356
  Parameters.filter,
318
- Parameters.apiVersion
357
+ Parameters.select
319
358
  ],
320
- headerParameters: [
321
- Parameters.acceptLanguage
359
+ urlParameters: [
360
+ Parameters.$host,
361
+ Parameters.resourceGroupName,
362
+ Parameters.subscriptionId,
363
+ Parameters.accountName1
322
364
  ],
365
+ headerParameters: [Parameters.accept],
366
+ serializer
367
+ };
368
+ const createOperationSpec: coreClient.OperationSpec = {
369
+ path:
370
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}",
371
+ httpMethod: "PUT",
323
372
  responses: {
324
373
  200: {
325
- bodyMapper: Mappers.ListCertificatesResult
374
+ bodyMapper: Mappers.Certificate,
375
+ headersMapper: Mappers.CertificateCreateHeaders
326
376
  },
327
377
  default: {
328
378
  bodyMapper: Mappers.CloudError
329
379
  }
330
380
  },
331
- serializer
332
- };
333
-
334
- const updateOperationSpec: msRest.OperationSpec = {
335
- httpMethod: "PATCH",
336
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}",
381
+ requestBody: Parameters.parameters8,
382
+ queryParameters: [Parameters.apiVersion],
337
383
  urlParameters: [
384
+ Parameters.$host,
338
385
  Parameters.resourceGroupName,
386
+ Parameters.subscriptionId,
339
387
  Parameters.accountName1,
340
- Parameters.certificateName,
341
- Parameters.subscriptionId
342
- ],
343
- queryParameters: [
344
- Parameters.apiVersion
388
+ Parameters.certificateName
345
389
  ],
346
390
  headerParameters: [
391
+ Parameters.contentType,
392
+ Parameters.accept,
347
393
  Parameters.ifMatch,
348
- Parameters.acceptLanguage
394
+ Parameters.ifNoneMatch
349
395
  ],
350
- requestBody: {
351
- parameterPath: "parameters",
352
- mapper: {
353
- ...Mappers.CertificateCreateOrUpdateParameters,
354
- required: true
355
- }
356
- },
396
+ mediaType: "json",
397
+ serializer
398
+ };
399
+ const updateOperationSpec: coreClient.OperationSpec = {
400
+ path:
401
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}",
402
+ httpMethod: "PATCH",
357
403
  responses: {
358
404
  200: {
359
405
  bodyMapper: Mappers.Certificate,
360
406
  headersMapper: Mappers.CertificateUpdateHeaders
361
407
  },
362
408
  default: {
363
- bodyMapper: Mappers.CloudError,
364
- headersMapper: Mappers.CertificateUpdateHeaders
409
+ bodyMapper: Mappers.CloudError
365
410
  }
366
411
  },
367
- serializer
368
- };
369
-
370
- const getOperationSpec: msRest.OperationSpec = {
371
- httpMethod: "GET",
372
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}",
412
+ requestBody: Parameters.parameters8,
413
+ queryParameters: [Parameters.apiVersion],
373
414
  urlParameters: [
415
+ Parameters.$host,
374
416
  Parameters.resourceGroupName,
417
+ Parameters.subscriptionId,
375
418
  Parameters.accountName1,
376
- Parameters.certificateName,
377
- Parameters.subscriptionId
378
- ],
379
- queryParameters: [
380
- Parameters.apiVersion
419
+ Parameters.certificateName
381
420
  ],
382
421
  headerParameters: [
383
- Parameters.acceptLanguage
422
+ Parameters.contentType,
423
+ Parameters.accept,
424
+ Parameters.ifMatch
384
425
  ],
426
+ mediaType: "json",
427
+ serializer
428
+ };
429
+ const deleteOperationSpec: coreClient.OperationSpec = {
430
+ path:
431
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}",
432
+ httpMethod: "DELETE",
385
433
  responses: {
386
- 200: {
387
- bodyMapper: Mappers.Certificate,
388
- headersMapper: Mappers.CertificateGetHeaders
389
- },
434
+ 200: {},
435
+ 201: {},
436
+ 202: {},
437
+ 204: {},
390
438
  default: {
391
- bodyMapper: Mappers.CloudError,
392
- headersMapper: Mappers.CertificateGetHeaders
439
+ bodyMapper: Mappers.CloudError
393
440
  }
394
441
  },
395
- serializer
396
- };
397
-
398
- const cancelDeletionOperationSpec: msRest.OperationSpec = {
399
- httpMethod: "POST",
400
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}/cancelDelete",
442
+ queryParameters: [Parameters.apiVersion],
401
443
  urlParameters: [
444
+ Parameters.$host,
402
445
  Parameters.resourceGroupName,
446
+ Parameters.subscriptionId,
403
447
  Parameters.accountName1,
404
- Parameters.certificateName,
405
- Parameters.subscriptionId
406
- ],
407
- queryParameters: [
408
- Parameters.apiVersion
409
- ],
410
- headerParameters: [
411
- Parameters.acceptLanguage
448
+ Parameters.certificateName
412
449
  ],
450
+ headerParameters: [Parameters.accept],
451
+ serializer
452
+ };
453
+ const getOperationSpec: coreClient.OperationSpec = {
454
+ path:
455
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}",
456
+ httpMethod: "GET",
413
457
  responses: {
414
458
  200: {
415
459
  bodyMapper: Mappers.Certificate,
416
- headersMapper: Mappers.CertificateCancelDeletionHeaders
460
+ headersMapper: Mappers.CertificateGetHeaders
417
461
  },
418
462
  default: {
419
- bodyMapper: Mappers.CloudError,
420
- headersMapper: Mappers.CertificateCancelDeletionHeaders
463
+ bodyMapper: Mappers.CloudError
421
464
  }
422
465
  },
423
- serializer
424
- };
425
-
426
- const beginCreateOperationSpec: msRest.OperationSpec = {
427
- httpMethod: "PUT",
428
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}",
466
+ queryParameters: [Parameters.apiVersion],
429
467
  urlParameters: [
468
+ Parameters.$host,
430
469
  Parameters.resourceGroupName,
470
+ Parameters.subscriptionId,
431
471
  Parameters.accountName1,
432
- Parameters.certificateName,
433
- Parameters.subscriptionId
472
+ Parameters.certificateName
434
473
  ],
435
- queryParameters: [
436
- Parameters.apiVersion
437
- ],
438
- headerParameters: [
439
- Parameters.ifMatch,
440
- Parameters.ifNoneMatch,
441
- Parameters.acceptLanguage
442
- ],
443
- requestBody: {
444
- parameterPath: "parameters",
445
- mapper: {
446
- ...Mappers.CertificateCreateOrUpdateParameters,
447
- required: true
448
- }
449
- },
474
+ headerParameters: [Parameters.accept],
475
+ serializer
476
+ };
477
+ const cancelDeletionOperationSpec: coreClient.OperationSpec = {
478
+ path:
479
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}/cancelDelete",
480
+ httpMethod: "POST",
450
481
  responses: {
451
482
  200: {
452
483
  bodyMapper: Mappers.Certificate,
453
- headersMapper: Mappers.CertificateCreateHeaders
484
+ headersMapper: Mappers.CertificateCancelDeletionHeaders
454
485
  },
455
486
  default: {
456
- bodyMapper: Mappers.CloudError,
457
- headersMapper: Mappers.CertificateCreateHeaders
487
+ bodyMapper: Mappers.CloudError
458
488
  }
459
489
  },
460
- serializer
461
- };
462
-
463
- const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
464
- httpMethod: "DELETE",
465
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}",
490
+ queryParameters: [Parameters.apiVersion],
466
491
  urlParameters: [
492
+ Parameters.$host,
467
493
  Parameters.resourceGroupName,
494
+ Parameters.subscriptionId,
468
495
  Parameters.accountName1,
469
- Parameters.certificateName,
470
- Parameters.subscriptionId
471
- ],
472
- queryParameters: [
473
- Parameters.apiVersion
474
- ],
475
- headerParameters: [
476
- Parameters.acceptLanguage
496
+ Parameters.certificateName
477
497
  ],
478
- responses: {
479
- 200: {
480
- headersMapper: Mappers.CertificateDeleteHeaders
481
- },
482
- 202: {
483
- headersMapper: Mappers.CertificateDeleteHeaders
484
- },
485
- 204: {
486
- headersMapper: Mappers.CertificateDeleteHeaders
487
- },
488
- default: {
489
- bodyMapper: Mappers.CloudError,
490
- headersMapper: Mappers.CertificateDeleteHeaders
491
- }
492
- },
498
+ headerParameters: [Parameters.accept],
493
499
  serializer
494
500
  };
495
-
496
- const listByBatchAccountNextOperationSpec: msRest.OperationSpec = {
497
- httpMethod: "GET",
498
- baseUrl: "https://management.azure.com",
501
+ const listByBatchAccountNextOperationSpec: coreClient.OperationSpec = {
499
502
  path: "{nextLink}",
500
- urlParameters: [
501
- Parameters.nextPageLink
502
- ],
503
- headerParameters: [
504
- Parameters.acceptLanguage
505
- ],
503
+ httpMethod: "GET",
506
504
  responses: {
507
505
  200: {
508
506
  bodyMapper: Mappers.ListCertificatesResult
@@ -511,5 +509,19 @@ const listByBatchAccountNextOperationSpec: msRest.OperationSpec = {
511
509
  bodyMapper: Mappers.CloudError
512
510
  }
513
511
  },
512
+ queryParameters: [
513
+ Parameters.apiVersion,
514
+ Parameters.maxresults,
515
+ Parameters.filter,
516
+ Parameters.select
517
+ ],
518
+ urlParameters: [
519
+ Parameters.$host,
520
+ Parameters.resourceGroupName,
521
+ Parameters.subscriptionId,
522
+ Parameters.accountName1,
523
+ Parameters.nextLink
524
+ ],
525
+ headerParameters: [Parameters.accept],
514
526
  serializer
515
527
  };