@azure/arm-batch 4.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 (251) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/{LICENSE.txt → LICENSE} +2 -2
  3. package/README.md +75 -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 +2357 -1248
  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 +2 -0
  53. package/dist-esm/src/operations/index.d.ts.map +1 -0
  54. package/dist-esm/src/operations/index.js +17 -0
  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 +71 -34
  121. package/review/arm-batch.api.md +1459 -0
  122. package/rollup.config.js +184 -27
  123. package/src/batchManagementClient.ts +75 -0
  124. package/src/batchManagementClientContext.ts +71 -0
  125. package/src/index.ts +13 -0
  126. package/src/lroImpl.ts +34 -0
  127. package/src/models/index.ts +2045 -0
  128. package/{lib → src}/models/mappers.ts +2413 -1223
  129. package/src/models/parameters.ts +351 -0
  130. package/src/operations/applicationOperations.ts +357 -0
  131. package/src/operations/applicationPackageOperations.ts +410 -0
  132. package/src/operations/batchAccountOperations.ts +901 -0
  133. package/src/operations/certificateOperations.ts +527 -0
  134. package/{lib → src}/operations/index.ts +5 -5
  135. package/src/operations/location.ts +413 -0
  136. package/src/operations/operations.ts +137 -0
  137. package/src/operations/poolOperations.ts +560 -0
  138. package/src/operations/privateEndpointConnectionOperations.ts +388 -0
  139. package/src/operations/privateLinkResourceOperations.ts +235 -0
  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/{esm/operations/index.js → src/operationsInterfaces/index.ts} +6 -6
  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 +4 -4
  151. package/types/arm-batch.d.ts +2528 -0
  152. package/types/tsdoc-metadata.json +11 -0
  153. package/dist/arm-batch.js +0 -4689
  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 -25
  158. package/esm/batchManagementClient.d.ts.map +0 -1
  159. package/esm/batchManagementClient.js +0 -40
  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 -11
  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 -11
  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 -11
  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 -11
  180. package/esm/models/certificateOperationsMappers.js.map +0 -1
  181. package/esm/models/index.d.ts +0 -3108
  182. package/esm/models/index.d.ts.map +0 -1
  183. package/esm/models/index.js +0 -10
  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 -11
  188. package/esm/models/locationMappers.js.map +0 -1
  189. package/esm/models/mappers.d.ts +0 -76
  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 -11
  195. package/esm/models/operationsMappers.js.map +0 -1
  196. package/esm/models/parameters.d.ts +0 -18
  197. package/esm/models/parameters.d.ts.map +0 -1
  198. package/esm/models/parameters.js +0 -196
  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 -11
  203. package/esm/models/poolOperationsMappers.js.map +0 -1
  204. package/esm/operations/applicationOperations.d.ts +0 -151
  205. package/esm/operations/applicationOperations.d.ts.map +0 -1
  206. package/esm/operations/applicationOperations.js +0 -226
  207. package/esm/operations/applicationOperations.js.map +0 -1
  208. package/esm/operations/applicationPackageOperations.d.ts +0 -124
  209. package/esm/operations/applicationPackageOperations.d.ts.map +0 -1
  210. package/esm/operations/applicationPackageOperations.js +0 -171
  211. package/esm/operations/applicationPackageOperations.js.map +0 -1
  212. package/esm/operations/batchAccountOperations.d.ts +0 -246
  213. package/esm/operations/batchAccountOperations.d.ts.map +0 -1
  214. package/esm/operations/batchAccountOperations.js +0 -426
  215. package/esm/operations/batchAccountOperations.js.map +0 -1
  216. package/esm/operations/certificateOperations.d.ts +0 -198
  217. package/esm/operations/certificateOperations.d.ts.map +0 -1
  218. package/esm/operations/certificateOperations.js +0 -326
  219. package/esm/operations/certificateOperations.js.map +0 -1
  220. package/esm/operations/index.d.ts.map +0 -1
  221. package/esm/operations/index.js.map +0 -1
  222. package/esm/operations/location.d.ts +0 -52
  223. package/esm/operations/location.d.ts.map +0 -1
  224. package/esm/operations/location.js +0 -93
  225. package/esm/operations/location.js.map +0 -1
  226. package/esm/operations/operations.d.ts +0 -46
  227. package/esm/operations/operations.d.ts.map +0 -1
  228. package/esm/operations/operations.js +0 -77
  229. package/esm/operations/operations.js.map +0 -1
  230. package/esm/operations/poolOperations.d.ts +0 -199
  231. package/esm/operations/poolOperations.d.ts.map +0 -1
  232. package/esm/operations/poolOperations.js +0 -352
  233. package/esm/operations/poolOperations.js.map +0 -1
  234. package/lib/batchManagementClient.ts +0 -55
  235. package/lib/batchManagementClientContext.ts +0 -63
  236. package/lib/models/applicationOperationsMappers.ts +0 -19
  237. package/lib/models/applicationPackageOperationsMappers.ts +0 -16
  238. package/lib/models/batchAccountOperationsMappers.ts +0 -61
  239. package/lib/models/certificateOperationsMappers.ts +0 -60
  240. package/lib/models/index.ts +0 -3252
  241. package/lib/models/locationMappers.ts +0 -17
  242. package/lib/models/operationsMappers.ts +0 -17
  243. package/lib/models/parameters.ts +0 -198
  244. package/lib/models/poolOperationsMappers.ts +0 -61
  245. package/lib/operations/applicationOperations.ts +0 -399
  246. package/lib/operations/applicationPackageOperations.ts +0 -307
  247. package/lib/operations/batchAccountOperations.ts +0 -683
  248. package/lib/operations/certificateOperations.ts +0 -510
  249. package/lib/operations/location.ts +0 -147
  250. package/lib/operations/operations.ts +0 -123
  251. package/lib/operations/poolOperations.ts +0 -550
@@ -0,0 +1,413 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { Location } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
13
+ import * as Parameters from "../models/parameters";
14
+ import { BatchManagementClientContext } from "../batchManagementClientContext";
15
+ import {
16
+ SupportedSku,
17
+ LocationListSupportedVirtualMachineSkusNextOptionalParams,
18
+ LocationListSupportedVirtualMachineSkusOptionalParams,
19
+ LocationListSupportedCloudServiceSkusNextOptionalParams,
20
+ LocationListSupportedCloudServiceSkusOptionalParams,
21
+ LocationGetQuotasOptionalParams,
22
+ LocationGetQuotasResponse,
23
+ LocationListSupportedVirtualMachineSkusResponse,
24
+ LocationListSupportedCloudServiceSkusResponse,
25
+ CheckNameAvailabilityParameters,
26
+ LocationCheckNameAvailabilityOptionalParams,
27
+ LocationCheckNameAvailabilityResponse,
28
+ LocationListSupportedVirtualMachineSkusNextResponse,
29
+ LocationListSupportedCloudServiceSkusNextResponse
30
+ } from "../models";
31
+
32
+ /// <reference lib="esnext.asynciterable" />
33
+ /** Class containing Location operations. */
34
+ export class LocationImpl implements Location {
35
+ private readonly client: BatchManagementClientContext;
36
+
37
+ /**
38
+ * Initialize a new instance of the class Location class.
39
+ * @param client Reference to the service client
40
+ */
41
+ constructor(client: BatchManagementClientContext) {
42
+ this.client = client;
43
+ }
44
+
45
+ /**
46
+ * Gets the list of Batch supported Virtual Machine VM sizes available at the given location.
47
+ * @param locationName The region for which to retrieve Batch service supported SKUs.
48
+ * @param options The options parameters.
49
+ */
50
+ public listSupportedVirtualMachineSkus(
51
+ locationName: string,
52
+ options?: LocationListSupportedVirtualMachineSkusOptionalParams
53
+ ): PagedAsyncIterableIterator<SupportedSku> {
54
+ const iter = this.listSupportedVirtualMachineSkusPagingAll(
55
+ locationName,
56
+ options
57
+ );
58
+ return {
59
+ next() {
60
+ return iter.next();
61
+ },
62
+ [Symbol.asyncIterator]() {
63
+ return this;
64
+ },
65
+ byPage: () => {
66
+ return this.listSupportedVirtualMachineSkusPagingPage(
67
+ locationName,
68
+ options
69
+ );
70
+ }
71
+ };
72
+ }
73
+
74
+ private async *listSupportedVirtualMachineSkusPagingPage(
75
+ locationName: string,
76
+ options?: LocationListSupportedVirtualMachineSkusOptionalParams
77
+ ): AsyncIterableIterator<SupportedSku[]> {
78
+ let result = await this._listSupportedVirtualMachineSkus(
79
+ locationName,
80
+ options
81
+ );
82
+ yield result.value || [];
83
+ let continuationToken = result.nextLink;
84
+ while (continuationToken) {
85
+ result = await this._listSupportedVirtualMachineSkusNext(
86
+ locationName,
87
+ continuationToken,
88
+ options
89
+ );
90
+ continuationToken = result.nextLink;
91
+ yield result.value || [];
92
+ }
93
+ }
94
+
95
+ private async *listSupportedVirtualMachineSkusPagingAll(
96
+ locationName: string,
97
+ options?: LocationListSupportedVirtualMachineSkusOptionalParams
98
+ ): AsyncIterableIterator<SupportedSku> {
99
+ for await (const page of this.listSupportedVirtualMachineSkusPagingPage(
100
+ locationName,
101
+ options
102
+ )) {
103
+ yield* page;
104
+ }
105
+ }
106
+
107
+ /**
108
+ * Gets the list of Batch supported Cloud Service VM sizes available at the given location.
109
+ * @param locationName The region for which to retrieve Batch service supported SKUs.
110
+ * @param options The options parameters.
111
+ */
112
+ public listSupportedCloudServiceSkus(
113
+ locationName: string,
114
+ options?: LocationListSupportedCloudServiceSkusOptionalParams
115
+ ): PagedAsyncIterableIterator<SupportedSku> {
116
+ const iter = this.listSupportedCloudServiceSkusPagingAll(
117
+ locationName,
118
+ options
119
+ );
120
+ return {
121
+ next() {
122
+ return iter.next();
123
+ },
124
+ [Symbol.asyncIterator]() {
125
+ return this;
126
+ },
127
+ byPage: () => {
128
+ return this.listSupportedCloudServiceSkusPagingPage(
129
+ locationName,
130
+ options
131
+ );
132
+ }
133
+ };
134
+ }
135
+
136
+ private async *listSupportedCloudServiceSkusPagingPage(
137
+ locationName: string,
138
+ options?: LocationListSupportedCloudServiceSkusOptionalParams
139
+ ): AsyncIterableIterator<SupportedSku[]> {
140
+ let result = await this._listSupportedCloudServiceSkus(
141
+ locationName,
142
+ options
143
+ );
144
+ yield result.value || [];
145
+ let continuationToken = result.nextLink;
146
+ while (continuationToken) {
147
+ result = await this._listSupportedCloudServiceSkusNext(
148
+ locationName,
149
+ continuationToken,
150
+ options
151
+ );
152
+ continuationToken = result.nextLink;
153
+ yield result.value || [];
154
+ }
155
+ }
156
+
157
+ private async *listSupportedCloudServiceSkusPagingAll(
158
+ locationName: string,
159
+ options?: LocationListSupportedCloudServiceSkusOptionalParams
160
+ ): AsyncIterableIterator<SupportedSku> {
161
+ for await (const page of this.listSupportedCloudServiceSkusPagingPage(
162
+ locationName,
163
+ options
164
+ )) {
165
+ yield* page;
166
+ }
167
+ }
168
+
169
+ /**
170
+ * Gets the Batch service quotas for the specified subscription at the given location.
171
+ * @param locationName The region for which to retrieve Batch service quotas.
172
+ * @param options The options parameters.
173
+ */
174
+ getQuotas(
175
+ locationName: string,
176
+ options?: LocationGetQuotasOptionalParams
177
+ ): Promise<LocationGetQuotasResponse> {
178
+ return this.client.sendOperationRequest(
179
+ { locationName, options },
180
+ getQuotasOperationSpec
181
+ );
182
+ }
183
+
184
+ /**
185
+ * Gets the list of Batch supported Virtual Machine VM sizes available at the given location.
186
+ * @param locationName The region for which to retrieve Batch service supported SKUs.
187
+ * @param options The options parameters.
188
+ */
189
+ private _listSupportedVirtualMachineSkus(
190
+ locationName: string,
191
+ options?: LocationListSupportedVirtualMachineSkusOptionalParams
192
+ ): Promise<LocationListSupportedVirtualMachineSkusResponse> {
193
+ return this.client.sendOperationRequest(
194
+ { locationName, options },
195
+ listSupportedVirtualMachineSkusOperationSpec
196
+ );
197
+ }
198
+
199
+ /**
200
+ * Gets the list of Batch supported Cloud Service VM sizes available at the given location.
201
+ * @param locationName The region for which to retrieve Batch service supported SKUs.
202
+ * @param options The options parameters.
203
+ */
204
+ private _listSupportedCloudServiceSkus(
205
+ locationName: string,
206
+ options?: LocationListSupportedCloudServiceSkusOptionalParams
207
+ ): Promise<LocationListSupportedCloudServiceSkusResponse> {
208
+ return this.client.sendOperationRequest(
209
+ { locationName, options },
210
+ listSupportedCloudServiceSkusOperationSpec
211
+ );
212
+ }
213
+
214
+ /**
215
+ * Checks whether the Batch account name is available in the specified region.
216
+ * @param locationName The desired region for the name check.
217
+ * @param parameters Properties needed to check the availability of a name.
218
+ * @param options The options parameters.
219
+ */
220
+ checkNameAvailability(
221
+ locationName: string,
222
+ parameters: CheckNameAvailabilityParameters,
223
+ options?: LocationCheckNameAvailabilityOptionalParams
224
+ ): Promise<LocationCheckNameAvailabilityResponse> {
225
+ return this.client.sendOperationRequest(
226
+ { locationName, parameters, options },
227
+ checkNameAvailabilityOperationSpec
228
+ );
229
+ }
230
+
231
+ /**
232
+ * ListSupportedVirtualMachineSkusNext
233
+ * @param locationName The region for which to retrieve Batch service supported SKUs.
234
+ * @param nextLink The nextLink from the previous successful call to the
235
+ * ListSupportedVirtualMachineSkus method.
236
+ * @param options The options parameters.
237
+ */
238
+ private _listSupportedVirtualMachineSkusNext(
239
+ locationName: string,
240
+ nextLink: string,
241
+ options?: LocationListSupportedVirtualMachineSkusNextOptionalParams
242
+ ): Promise<LocationListSupportedVirtualMachineSkusNextResponse> {
243
+ return this.client.sendOperationRequest(
244
+ { locationName, nextLink, options },
245
+ listSupportedVirtualMachineSkusNextOperationSpec
246
+ );
247
+ }
248
+
249
+ /**
250
+ * ListSupportedCloudServiceSkusNext
251
+ * @param locationName The region for which to retrieve Batch service supported SKUs.
252
+ * @param nextLink The nextLink from the previous successful call to the ListSupportedCloudServiceSkus
253
+ * method.
254
+ * @param options The options parameters.
255
+ */
256
+ private _listSupportedCloudServiceSkusNext(
257
+ locationName: string,
258
+ nextLink: string,
259
+ options?: LocationListSupportedCloudServiceSkusNextOptionalParams
260
+ ): Promise<LocationListSupportedCloudServiceSkusNextResponse> {
261
+ return this.client.sendOperationRequest(
262
+ { locationName, nextLink, options },
263
+ listSupportedCloudServiceSkusNextOperationSpec
264
+ );
265
+ }
266
+ }
267
+ // Operation Specifications
268
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
269
+
270
+ const getQuotasOperationSpec: coreClient.OperationSpec = {
271
+ path:
272
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/quotas",
273
+ httpMethod: "GET",
274
+ responses: {
275
+ 200: {
276
+ bodyMapper: Mappers.BatchLocationQuota
277
+ },
278
+ default: {
279
+ bodyMapper: Mappers.CloudError
280
+ }
281
+ },
282
+ queryParameters: [Parameters.apiVersion],
283
+ urlParameters: [
284
+ Parameters.$host,
285
+ Parameters.subscriptionId,
286
+ Parameters.locationName
287
+ ],
288
+ headerParameters: [Parameters.accept],
289
+ serializer
290
+ };
291
+ const listSupportedVirtualMachineSkusOperationSpec: coreClient.OperationSpec = {
292
+ path:
293
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/virtualMachineSkus",
294
+ httpMethod: "GET",
295
+ responses: {
296
+ 200: {
297
+ bodyMapper: Mappers.SupportedSkusResult
298
+ },
299
+ default: {
300
+ bodyMapper: Mappers.CloudError
301
+ }
302
+ },
303
+ queryParameters: [
304
+ Parameters.apiVersion,
305
+ Parameters.maxresults,
306
+ Parameters.filter
307
+ ],
308
+ urlParameters: [
309
+ Parameters.$host,
310
+ Parameters.subscriptionId,
311
+ Parameters.locationName
312
+ ],
313
+ headerParameters: [Parameters.accept],
314
+ serializer
315
+ };
316
+ const listSupportedCloudServiceSkusOperationSpec: coreClient.OperationSpec = {
317
+ path:
318
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/cloudServiceSkus",
319
+ httpMethod: "GET",
320
+ responses: {
321
+ 200: {
322
+ bodyMapper: Mappers.SupportedSkusResult
323
+ },
324
+ default: {
325
+ bodyMapper: Mappers.CloudError
326
+ }
327
+ },
328
+ queryParameters: [
329
+ Parameters.apiVersion,
330
+ Parameters.maxresults,
331
+ Parameters.filter
332
+ ],
333
+ urlParameters: [
334
+ Parameters.$host,
335
+ Parameters.subscriptionId,
336
+ Parameters.locationName
337
+ ],
338
+ headerParameters: [Parameters.accept],
339
+ serializer
340
+ };
341
+ const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = {
342
+ path:
343
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/checkNameAvailability",
344
+ httpMethod: "POST",
345
+ responses: {
346
+ 200: {
347
+ bodyMapper: Mappers.CheckNameAvailabilityResult
348
+ },
349
+ default: {
350
+ bodyMapper: Mappers.CloudError
351
+ }
352
+ },
353
+ requestBody: Parameters.parameters7,
354
+ queryParameters: [Parameters.apiVersion],
355
+ urlParameters: [
356
+ Parameters.$host,
357
+ Parameters.subscriptionId,
358
+ Parameters.locationName
359
+ ],
360
+ headerParameters: [Parameters.contentType, Parameters.accept],
361
+ mediaType: "json",
362
+ serializer
363
+ };
364
+ const listSupportedVirtualMachineSkusNextOperationSpec: coreClient.OperationSpec = {
365
+ path: "{nextLink}",
366
+ httpMethod: "GET",
367
+ responses: {
368
+ 200: {
369
+ bodyMapper: Mappers.SupportedSkusResult
370
+ },
371
+ default: {
372
+ bodyMapper: Mappers.CloudError
373
+ }
374
+ },
375
+ queryParameters: [
376
+ Parameters.apiVersion,
377
+ Parameters.maxresults,
378
+ Parameters.filter
379
+ ],
380
+ urlParameters: [
381
+ Parameters.$host,
382
+ Parameters.subscriptionId,
383
+ Parameters.nextLink,
384
+ Parameters.locationName
385
+ ],
386
+ headerParameters: [Parameters.accept],
387
+ serializer
388
+ };
389
+ const listSupportedCloudServiceSkusNextOperationSpec: coreClient.OperationSpec = {
390
+ path: "{nextLink}",
391
+ httpMethod: "GET",
392
+ responses: {
393
+ 200: {
394
+ bodyMapper: Mappers.SupportedSkusResult
395
+ },
396
+ default: {
397
+ bodyMapper: Mappers.CloudError
398
+ }
399
+ },
400
+ queryParameters: [
401
+ Parameters.apiVersion,
402
+ Parameters.maxresults,
403
+ Parameters.filter
404
+ ],
405
+ urlParameters: [
406
+ Parameters.$host,
407
+ Parameters.subscriptionId,
408
+ Parameters.nextLink,
409
+ Parameters.locationName
410
+ ],
411
+ headerParameters: [Parameters.accept],
412
+ serializer
413
+ };
@@ -0,0 +1,137 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { Operations } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
13
+ import * as Parameters from "../models/parameters";
14
+ import { BatchManagementClientContext } from "../batchManagementClientContext";
15
+ import {
16
+ Operation,
17
+ OperationsListNextOptionalParams,
18
+ OperationsListOptionalParams,
19
+ OperationsListResponse,
20
+ OperationsListNextResponse
21
+ } from "../models";
22
+
23
+ /// <reference lib="esnext.asynciterable" />
24
+ /** Class containing Operations operations. */
25
+ export class OperationsImpl implements Operations {
26
+ private readonly client: BatchManagementClientContext;
27
+
28
+ /**
29
+ * Initialize a new instance of the class Operations class.
30
+ * @param client Reference to the service client
31
+ */
32
+ constructor(client: BatchManagementClientContext) {
33
+ this.client = client;
34
+ }
35
+
36
+ /**
37
+ * Lists available operations for the Microsoft.Batch provider
38
+ * @param options The options parameters.
39
+ */
40
+ public list(
41
+ options?: OperationsListOptionalParams
42
+ ): PagedAsyncIterableIterator<Operation> {
43
+ const iter = this.listPagingAll(options);
44
+ return {
45
+ next() {
46
+ return iter.next();
47
+ },
48
+ [Symbol.asyncIterator]() {
49
+ return this;
50
+ },
51
+ byPage: () => {
52
+ return this.listPagingPage(options);
53
+ }
54
+ };
55
+ }
56
+
57
+ private async *listPagingPage(
58
+ options?: OperationsListOptionalParams
59
+ ): AsyncIterableIterator<Operation[]> {
60
+ let result = await this._list(options);
61
+ yield result.value || [];
62
+ let continuationToken = result.nextLink;
63
+ while (continuationToken) {
64
+ result = await this._listNext(continuationToken, options);
65
+ continuationToken = result.nextLink;
66
+ yield result.value || [];
67
+ }
68
+ }
69
+
70
+ private async *listPagingAll(
71
+ options?: OperationsListOptionalParams
72
+ ): AsyncIterableIterator<Operation> {
73
+ for await (const page of this.listPagingPage(options)) {
74
+ yield* page;
75
+ }
76
+ }
77
+
78
+ /**
79
+ * Lists available operations for the Microsoft.Batch provider
80
+ * @param options The options parameters.
81
+ */
82
+ private _list(
83
+ options?: OperationsListOptionalParams
84
+ ): Promise<OperationsListResponse> {
85
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
86
+ }
87
+
88
+ /**
89
+ * ListNext
90
+ * @param nextLink The nextLink from the previous successful call to the List method.
91
+ * @param options The options parameters.
92
+ */
93
+ private _listNext(
94
+ nextLink: string,
95
+ options?: OperationsListNextOptionalParams
96
+ ): Promise<OperationsListNextResponse> {
97
+ return this.client.sendOperationRequest(
98
+ { nextLink, options },
99
+ listNextOperationSpec
100
+ );
101
+ }
102
+ }
103
+ // Operation Specifications
104
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
105
+
106
+ const listOperationSpec: coreClient.OperationSpec = {
107
+ path: "/providers/Microsoft.Batch/operations",
108
+ httpMethod: "GET",
109
+ responses: {
110
+ 200: {
111
+ bodyMapper: Mappers.OperationListResult
112
+ },
113
+ default: {
114
+ bodyMapper: Mappers.CloudError
115
+ }
116
+ },
117
+ queryParameters: [Parameters.apiVersion],
118
+ urlParameters: [Parameters.$host],
119
+ headerParameters: [Parameters.accept],
120
+ serializer
121
+ };
122
+ const listNextOperationSpec: coreClient.OperationSpec = {
123
+ path: "{nextLink}",
124
+ httpMethod: "GET",
125
+ responses: {
126
+ 200: {
127
+ bodyMapper: Mappers.OperationListResult
128
+ },
129
+ default: {
130
+ bodyMapper: Mappers.CloudError
131
+ }
132
+ },
133
+ queryParameters: [Parameters.apiVersion],
134
+ urlParameters: [Parameters.$host, Parameters.nextLink],
135
+ headerParameters: [Parameters.accept],
136
+ serializer
137
+ };