@azure/arm-vmwarecloudsimple 1.1.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/README.md +69 -80
  4. package/dist/index.js +5683 -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/index.d.ts +5 -0
  9. package/dist-esm/src/index.d.ts.map +1 -0
  10. package/dist-esm/src/index.js +12 -0
  11. package/dist-esm/src/index.js.map +1 -0
  12. package/dist-esm/src/lroImpl.d.ts +16 -0
  13. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  14. package/dist-esm/src/lroImpl.js +29 -0
  15. package/dist-esm/src/lroImpl.js.map +1 -0
  16. package/dist-esm/src/models/index.d.ts +1328 -0
  17. package/dist-esm/src/models/index.d.ts.map +1 -0
  18. package/dist-esm/src/models/index.js +44 -0
  19. package/dist-esm/src/models/index.js.map +1 -0
  20. package/dist-esm/src/models/mappers.d.ts +59 -0
  21. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  22. package/{esm → dist-esm/src}/models/mappers.js +1185 -834
  23. package/dist-esm/src/models/mappers.js.map +1 -0
  24. package/dist-esm/src/models/parameters.d.ts +35 -0
  25. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  26. package/{esm → dist-esm/src}/models/parameters.js +157 -106
  27. package/dist-esm/src/models/parameters.js.map +1 -0
  28. package/dist-esm/src/operations/customizationPolicies.d.ts +46 -0
  29. package/dist-esm/src/operations/customizationPolicies.d.ts.map +1 -0
  30. package/dist-esm/src/operations/customizationPolicies.js +169 -0
  31. package/dist-esm/src/operations/customizationPolicies.js.map +1 -0
  32. package/dist-esm/src/operations/dedicatedCloudNodes.d.ts +92 -0
  33. package/dist-esm/src/operations/dedicatedCloudNodes.d.ts.map +1 -0
  34. package/dist-esm/src/operations/dedicatedCloudNodes.js +446 -0
  35. package/dist-esm/src/operations/dedicatedCloudNodes.js.map +1 -0
  36. package/dist-esm/src/operations/dedicatedCloudServices.d.ts +91 -0
  37. package/dist-esm/src/operations/dedicatedCloudServices.d.ts.map +1 -0
  38. package/dist-esm/src/operations/dedicatedCloudServices.js +431 -0
  39. package/dist-esm/src/operations/dedicatedCloudServices.js.map +1 -0
  40. package/{esm → dist-esm/src}/operations/index.d.ts +1 -0
  41. package/dist-esm/src/operations/index.d.ts.map +1 -0
  42. package/{esm → dist-esm/src}/operations/index.js +4 -5
  43. package/dist-esm/src/operations/index.js.map +1 -0
  44. package/dist-esm/src/operations/operations.d.ts +39 -0
  45. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  46. package/dist-esm/src/operations/operations.js +155 -0
  47. package/dist-esm/src/operations/operations.js.map +1 -0
  48. package/dist-esm/src/operations/privateClouds.d.ts +42 -0
  49. package/dist-esm/src/operations/privateClouds.d.ts.map +1 -0
  50. package/dist-esm/src/operations/privateClouds.js +162 -0
  51. package/dist-esm/src/operations/privateClouds.js.map +1 -0
  52. package/dist-esm/src/operations/resourcePools.d.ts +46 -0
  53. package/dist-esm/src/operations/resourcePools.d.ts.map +1 -0
  54. package/dist-esm/src/operations/resourcePools.js +169 -0
  55. package/dist-esm/src/operations/resourcePools.js.map +1 -0
  56. package/dist-esm/src/operations/skusAvailability.d.ts +35 -0
  57. package/dist-esm/src/operations/skusAvailability.d.ts.map +1 -0
  58. package/dist-esm/src/operations/skusAvailability.js +132 -0
  59. package/dist-esm/src/operations/skusAvailability.js.map +1 -0
  60. package/dist-esm/src/operations/usages.d.ts +35 -0
  61. package/dist-esm/src/operations/usages.d.ts.map +1 -0
  62. package/dist-esm/src/operations/usages.js +132 -0
  63. package/dist-esm/src/operations/usages.js.map +1 -0
  64. package/dist-esm/src/operations/virtualMachineTemplates.d.ts +49 -0
  65. package/dist-esm/src/operations/virtualMachineTemplates.d.ts.map +1 -0
  66. package/dist-esm/src/operations/virtualMachineTemplates.js +172 -0
  67. package/dist-esm/src/operations/virtualMachineTemplates.js.map +1 -0
  68. package/dist-esm/src/operations/virtualMachines.d.ts +135 -0
  69. package/dist-esm/src/operations/virtualMachines.d.ts.map +1 -0
  70. package/dist-esm/src/operations/virtualMachines.js +687 -0
  71. package/dist-esm/src/operations/virtualMachines.js.map +1 -0
  72. package/dist-esm/src/operations/virtualNetworks.d.ts +49 -0
  73. package/dist-esm/src/operations/virtualNetworks.d.ts.map +1 -0
  74. package/dist-esm/src/operations/virtualNetworks.js +172 -0
  75. package/dist-esm/src/operations/virtualNetworks.js.map +1 -0
  76. package/dist-esm/src/operationsInterfaces/customizationPolicies.d.ts +21 -0
  77. package/dist-esm/src/operationsInterfaces/customizationPolicies.d.ts.map +1 -0
  78. package/dist-esm/src/operationsInterfaces/customizationPolicies.js +9 -0
  79. package/dist-esm/src/operationsInterfaces/customizationPolicies.js.map +1 -0
  80. package/dist-esm/src/operationsInterfaces/dedicatedCloudNodes.d.ts +56 -0
  81. package/dist-esm/src/operationsInterfaces/dedicatedCloudNodes.d.ts.map +1 -0
  82. package/dist-esm/src/operationsInterfaces/dedicatedCloudNodes.js +9 -0
  83. package/dist-esm/src/operationsInterfaces/dedicatedCloudNodes.js.map +1 -0
  84. package/dist-esm/src/operationsInterfaces/dedicatedCloudServices.d.ts +55 -0
  85. package/dist-esm/src/operationsInterfaces/dedicatedCloudServices.d.ts.map +1 -0
  86. package/dist-esm/src/operationsInterfaces/dedicatedCloudServices.js +9 -0
  87. package/dist-esm/src/operationsInterfaces/dedicatedCloudServices.js.map +1 -0
  88. package/dist-esm/src/operationsInterfaces/index.d.ts +12 -0
  89. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  90. package/dist-esm/src/operationsInterfaces/index.js +19 -0
  91. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  92. package/dist-esm/src/operationsInterfaces/operations.d.ts +18 -0
  93. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  94. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  95. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  96. package/dist-esm/src/operationsInterfaces/privateClouds.d.ts +19 -0
  97. package/dist-esm/src/operationsInterfaces/privateClouds.d.ts.map +1 -0
  98. package/dist-esm/src/operationsInterfaces/privateClouds.js +9 -0
  99. package/dist-esm/src/operationsInterfaces/privateClouds.js.map +1 -0
  100. package/dist-esm/src/operationsInterfaces/resourcePools.d.ts +21 -0
  101. package/dist-esm/src/operationsInterfaces/resourcePools.d.ts.map +1 -0
  102. package/dist-esm/src/operationsInterfaces/resourcePools.js +9 -0
  103. package/dist-esm/src/operationsInterfaces/resourcePools.js.map +1 -0
  104. package/dist-esm/src/operationsInterfaces/skusAvailability.d.ts +12 -0
  105. package/dist-esm/src/operationsInterfaces/skusAvailability.d.ts.map +1 -0
  106. package/dist-esm/src/operationsInterfaces/skusAvailability.js +9 -0
  107. package/dist-esm/src/operationsInterfaces/skusAvailability.js.map +1 -0
  108. package/dist-esm/src/operationsInterfaces/usages.d.ts +12 -0
  109. package/dist-esm/src/operationsInterfaces/usages.d.ts.map +1 -0
  110. package/dist-esm/src/operationsInterfaces/usages.js +9 -0
  111. package/dist-esm/src/operationsInterfaces/usages.js.map +1 -0
  112. package/dist-esm/src/operationsInterfaces/virtualMachineTemplates.d.ts +22 -0
  113. package/dist-esm/src/operationsInterfaces/virtualMachineTemplates.d.ts.map +1 -0
  114. package/dist-esm/src/operationsInterfaces/virtualMachineTemplates.js +9 -0
  115. package/dist-esm/src/operationsInterfaces/virtualMachineTemplates.js.map +1 -0
  116. package/dist-esm/src/operationsInterfaces/virtualMachines.d.ts +99 -0
  117. package/dist-esm/src/operationsInterfaces/virtualMachines.d.ts.map +1 -0
  118. package/dist-esm/src/operationsInterfaces/virtualMachines.js +9 -0
  119. package/dist-esm/src/operationsInterfaces/virtualMachines.js.map +1 -0
  120. package/dist-esm/src/operationsInterfaces/virtualNetworks.d.ts +22 -0
  121. package/dist-esm/src/operationsInterfaces/virtualNetworks.d.ts.map +1 -0
  122. package/dist-esm/src/operationsInterfaces/virtualNetworks.js +9 -0
  123. package/dist-esm/src/operationsInterfaces/virtualNetworks.js.map +1 -0
  124. package/dist-esm/src/vMwareCloudSimple.d.ts +30 -0
  125. package/dist-esm/src/vMwareCloudSimple.d.ts.map +1 -0
  126. package/dist-esm/src/vMwareCloudSimple.js +66 -0
  127. package/dist-esm/src/vMwareCloudSimple.js.map +1 -0
  128. package/dist-esm/test/sampleTest.d.ts +2 -0
  129. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  130. package/dist-esm/test/sampleTest.js +40 -0
  131. package/dist-esm/test/sampleTest.js.map +1 -0
  132. package/package.json +70 -32
  133. package/review/arm-vmwarecloudsimple.api.md +1140 -0
  134. package/rollup.config.js +181 -30
  135. package/src/index.ts +12 -0
  136. package/src/lroImpl.ts +34 -0
  137. package/src/models/index.ts +1155 -1956
  138. package/src/models/mappers.ts +1229 -846
  139. package/src/models/parameters.ts +200 -107
  140. package/src/operations/customizationPolicies.ts +217 -0
  141. package/src/operations/dedicatedCloudNodes.ts +391 -317
  142. package/src/operations/dedicatedCloudServices.ts +372 -319
  143. package/src/operations/index.ts +4 -5
  144. package/src/operations/operations.ts +117 -125
  145. package/src/operations/privateClouds.ts +131 -123
  146. package/src/operations/resourcePools.ts +145 -129
  147. package/src/operations/skusAvailability.ts +109 -85
  148. package/src/operations/usages.ts +109 -85
  149. package/src/operations/virtualMachineTemplates.ts +162 -132
  150. package/src/operations/virtualMachines.ts +705 -403
  151. package/src/operations/virtualNetworks.ts +163 -136
  152. package/src/operationsInterfaces/customizationPolicies.ts +44 -0
  153. package/src/operationsInterfaces/dedicatedCloudNodes.ts +110 -0
  154. package/src/operationsInterfaces/dedicatedCloudServices.ts +103 -0
  155. package/src/operationsInterfaces/index.ts +19 -0
  156. package/src/operationsInterfaces/operations.ts +38 -0
  157. package/src/operationsInterfaces/privateClouds.ts +40 -0
  158. package/src/operationsInterfaces/resourcePools.ts +44 -0
  159. package/src/operationsInterfaces/skusAvailability.ts +24 -0
  160. package/src/operationsInterfaces/usages.ts +24 -0
  161. package/src/operationsInterfaces/virtualMachineTemplates.ts +46 -0
  162. package/src/operationsInterfaces/virtualMachines.ts +191 -0
  163. package/src/operationsInterfaces/virtualNetworks.ts +46 -0
  164. package/src/vMwareCloudSimple.ts +126 -0
  165. package/tsconfig.json +3 -3
  166. package/types/arm-vmwarecloudsimple.d.ts +1861 -0
  167. package/types/tsdoc-metadata.json +11 -0
  168. package/dist/arm-vmwarecloudsimple.js +0 -4540
  169. package/dist/arm-vmwarecloudsimple.js.map +0 -1
  170. package/dist/arm-vmwarecloudsimple.min.js +0 -1
  171. package/dist/arm-vmwarecloudsimple.min.js.map +0 -1
  172. package/esm/models/dedicatedCloudNodesMappers.d.ts +0 -2
  173. package/esm/models/dedicatedCloudNodesMappers.d.ts.map +0 -1
  174. package/esm/models/dedicatedCloudNodesMappers.js +0 -9
  175. package/esm/models/dedicatedCloudNodesMappers.js.map +0 -1
  176. package/esm/models/dedicatedCloudServicesMappers.d.ts +0 -2
  177. package/esm/models/dedicatedCloudServicesMappers.d.ts.map +0 -1
  178. package/esm/models/dedicatedCloudServicesMappers.js +0 -9
  179. package/esm/models/dedicatedCloudServicesMappers.js.map +0 -1
  180. package/esm/models/index.d.ts +0 -2190
  181. package/esm/models/index.d.ts.map +0 -1
  182. package/esm/models/index.js +0 -8
  183. package/esm/models/index.js.map +0 -1
  184. package/esm/models/mappers.d.ts +0 -46
  185. package/esm/models/mappers.d.ts.map +0 -1
  186. package/esm/models/mappers.js.map +0 -1
  187. package/esm/models/operationsMappers.d.ts +0 -2
  188. package/esm/models/operationsMappers.d.ts.map +0 -1
  189. package/esm/models/operationsMappers.js +0 -9
  190. package/esm/models/operationsMappers.js.map +0 -1
  191. package/esm/models/parameters.d.ts +0 -24
  192. package/esm/models/parameters.d.ts.map +0 -1
  193. package/esm/models/parameters.js.map +0 -1
  194. package/esm/models/privateCloudsMappers.d.ts +0 -2
  195. package/esm/models/privateCloudsMappers.d.ts.map +0 -1
  196. package/esm/models/privateCloudsMappers.js +0 -9
  197. package/esm/models/privateCloudsMappers.js.map +0 -1
  198. package/esm/models/resourcePoolsMappers.d.ts +0 -2
  199. package/esm/models/resourcePoolsMappers.d.ts.map +0 -1
  200. package/esm/models/resourcePoolsMappers.js +0 -9
  201. package/esm/models/resourcePoolsMappers.js.map +0 -1
  202. package/esm/models/skusAvailabilityMappers.d.ts +0 -2
  203. package/esm/models/skusAvailabilityMappers.d.ts.map +0 -1
  204. package/esm/models/skusAvailabilityMappers.js +0 -9
  205. package/esm/models/skusAvailabilityMappers.js.map +0 -1
  206. package/esm/models/usagesMappers.d.ts +0 -2
  207. package/esm/models/usagesMappers.d.ts.map +0 -1
  208. package/esm/models/usagesMappers.js +0 -9
  209. package/esm/models/usagesMappers.js.map +0 -1
  210. package/esm/models/virtualMachineTemplatesMappers.d.ts +0 -2
  211. package/esm/models/virtualMachineTemplatesMappers.d.ts.map +0 -1
  212. package/esm/models/virtualMachineTemplatesMappers.js +0 -9
  213. package/esm/models/virtualMachineTemplatesMappers.js.map +0 -1
  214. package/esm/models/virtualMachinesMappers.d.ts +0 -2
  215. package/esm/models/virtualMachinesMappers.d.ts.map +0 -1
  216. package/esm/models/virtualMachinesMappers.js +0 -9
  217. package/esm/models/virtualMachinesMappers.js.map +0 -1
  218. package/esm/models/virtualNetworksMappers.d.ts +0 -2
  219. package/esm/models/virtualNetworksMappers.d.ts.map +0 -1
  220. package/esm/models/virtualNetworksMappers.js +0 -9
  221. package/esm/models/virtualNetworksMappers.js.map +0 -1
  222. package/esm/operations/dedicatedCloudNodes.d.ts +0 -173
  223. package/esm/operations/dedicatedCloudNodes.d.ts.map +0 -1
  224. package/esm/operations/dedicatedCloudNodes.js +0 -304
  225. package/esm/operations/dedicatedCloudNodes.js.map +0 -1
  226. package/esm/operations/dedicatedCloudServices.d.ts +0 -174
  227. package/esm/operations/dedicatedCloudServices.d.ts.map +0 -1
  228. package/esm/operations/dedicatedCloudServices.js +0 -300
  229. package/esm/operations/dedicatedCloudServices.js.map +0 -1
  230. package/esm/operations/index.d.ts.map +0 -1
  231. package/esm/operations/index.js.map +0 -1
  232. package/esm/operations/operations.d.ts +0 -70
  233. package/esm/operations/operations.d.ts.map +0 -1
  234. package/esm/operations/operations.js +0 -116
  235. package/esm/operations/operations.js.map +0 -1
  236. package/esm/operations/privateClouds.d.ts +0 -73
  237. package/esm/operations/privateClouds.d.ts.map +0 -1
  238. package/esm/operations/privateClouds.js +0 -113
  239. package/esm/operations/privateClouds.js.map +0 -1
  240. package/esm/operations/resourcePools.d.ts +0 -79
  241. package/esm/operations/resourcePools.d.ts.map +0 -1
  242. package/esm/operations/resourcePools.js +0 -117
  243. package/esm/operations/resourcePools.js.map +0 -1
  244. package/esm/operations/skusAvailability.d.ts +0 -51
  245. package/esm/operations/skusAvailability.d.ts.map +0 -1
  246. package/esm/operations/skusAvailability.js +0 -83
  247. package/esm/operations/skusAvailability.js.map +0 -1
  248. package/esm/operations/usages.d.ts +0 -51
  249. package/esm/operations/usages.d.ts.map +0 -1
  250. package/esm/operations/usages.js +0 -83
  251. package/esm/operations/usages.js.map +0 -1
  252. package/esm/operations/virtualMachineTemplates.d.ts +0 -82
  253. package/esm/operations/virtualMachineTemplates.d.ts.map +0 -1
  254. package/esm/operations/virtualMachineTemplates.js +0 -119
  255. package/esm/operations/virtualMachineTemplates.js.map +0 -1
  256. package/esm/operations/virtualMachines.d.ts +0 -201
  257. package/esm/operations/virtualMachines.d.ts.map +0 -1
  258. package/esm/operations/virtualMachines.js +0 -472
  259. package/esm/operations/virtualMachines.js.map +0 -1
  260. package/esm/operations/virtualNetworks.d.ts +0 -85
  261. package/esm/operations/virtualNetworks.d.ts.map +0 -1
  262. package/esm/operations/virtualNetworks.js +0 -119
  263. package/esm/operations/virtualNetworks.js.map +0 -1
  264. package/esm/vMwareCloudSimpleClient.d.ts +0 -34
  265. package/esm/vMwareCloudSimpleClient.d.ts.map +0 -1
  266. package/esm/vMwareCloudSimpleClient.js +0 -48
  267. package/esm/vMwareCloudSimpleClient.js.map +0 -1
  268. package/esm/vMwareCloudSimpleClientContext.d.ts +0 -24
  269. package/esm/vMwareCloudSimpleClientContext.d.ts.map +0 -1
  270. package/esm/vMwareCloudSimpleClientContext.js +0 -66
  271. package/esm/vMwareCloudSimpleClientContext.js.map +0 -1
  272. package/src/models/dedicatedCloudNodesMappers.ts +0 -26
  273. package/src/models/dedicatedCloudServicesMappers.ts +0 -25
  274. package/src/models/operationsMappers.ts +0 -20
  275. package/src/models/privateCloudsMappers.ts +0 -20
  276. package/src/models/resourcePoolsMappers.ts +0 -14
  277. package/src/models/skusAvailabilityMappers.ts +0 -14
  278. package/src/models/usagesMappers.ts +0 -15
  279. package/src/models/virtualMachineTemplatesMappers.ts +0 -18
  280. package/src/models/virtualMachinesMappers.ts +0 -29
  281. package/src/models/virtualNetworksMappers.ts +0 -14
  282. package/src/vMwareCloudSimpleClient.ts +0 -67
  283. package/src/vMwareCloudSimpleClientContext.ts +0 -74
@@ -1,11 +1,9 @@
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
9
  export * from "./operations";
@@ -13,6 +11,7 @@ export * from "./dedicatedCloudNodes";
13
11
  export * from "./dedicatedCloudServices";
14
12
  export * from "./skusAvailability";
15
13
  export * from "./privateClouds";
14
+ export * from "./customizationPolicies";
16
15
  export * from "./resourcePools";
17
16
  export * from "./virtualMachineTemplates";
18
17
  export * from "./virtualNetworks";
@@ -1,191 +1,183 @@
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 Models from "../models";
13
- import * as Mappers from "../models/operationsMappers";
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";
14
13
  import * as Parameters from "../models/parameters";
15
- import { VMwareCloudSimpleClientContext } from "../vMwareCloudSimpleClientContext";
14
+ import { VMwareCloudSimple } from "../vMwareCloudSimple";
15
+ import {
16
+ AvailableOperation,
17
+ OperationsListNextOptionalParams,
18
+ OperationsListOptionalParams,
19
+ OperationsListResponse,
20
+ OperationsGetOptionalParams,
21
+ OperationsGetResponse,
22
+ OperationsListNextResponse
23
+ } from "../models";
16
24
 
17
- /** Class representing a Operations. */
18
- export class Operations {
19
- private readonly client: VMwareCloudSimpleClientContext;
25
+ /// <reference lib="esnext.asynciterable" />
26
+ /** Class containing Operations operations. */
27
+ export class OperationsImpl implements Operations {
28
+ private readonly client: VMwareCloudSimple;
20
29
 
21
30
  /**
22
- * Create a Operations.
23
- * @param {VMwareCloudSimpleClientContext} client Reference to the service client.
31
+ * Initialize a new instance of the class Operations class.
32
+ * @param client Reference to the service client
24
33
  */
25
- constructor(client: VMwareCloudSimpleClientContext) {
34
+ constructor(client: VMwareCloudSimple) {
26
35
  this.client = client;
27
36
  }
28
37
 
29
38
  /**
30
39
  * Return list of operations
31
- * @summary Implements list of available operations
32
- * @param [options] The optional parameters
33
- * @returns Promise<Models.OperationsListResponse>
40
+ * @param options The options parameters.
34
41
  */
35
- list(options?: msRest.RequestOptionsBase): Promise<Models.OperationsListResponse>;
36
- /**
37
- * @param callback The callback
38
- */
39
- list(callback: msRest.ServiceCallback<Models.AvailableOperationsListResponse>): void;
40
- /**
41
- * @param options The optional parameters
42
- * @param callback The callback
43
- */
44
- list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.AvailableOperationsListResponse>): void;
45
- list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.AvailableOperationsListResponse>, callback?: msRest.ServiceCallback<Models.AvailableOperationsListResponse>): Promise<Models.OperationsListResponse> {
46
- return this.client.sendOperationRequest(
47
- {
48
- options
42
+ public list(
43
+ options?: OperationsListOptionalParams
44
+ ): PagedAsyncIterableIterator<AvailableOperation> {
45
+ const iter = this.listPagingAll(options);
46
+ return {
47
+ next() {
48
+ return iter.next();
49
+ },
50
+ [Symbol.asyncIterator]() {
51
+ return this;
49
52
  },
50
- listOperationSpec,
51
- callback) as Promise<Models.OperationsListResponse>;
53
+ byPage: () => {
54
+ return this.listPagingPage(options);
55
+ }
56
+ };
57
+ }
58
+
59
+ private async *listPagingPage(
60
+ options?: OperationsListOptionalParams
61
+ ): AsyncIterableIterator<AvailableOperation[]> {
62
+ let result = await this._list(options);
63
+ yield result.value || [];
64
+ let continuationToken = result.nextLink;
65
+ while (continuationToken) {
66
+ result = await this._listNext(continuationToken, options);
67
+ continuationToken = result.nextLink;
68
+ yield result.value || [];
69
+ }
70
+ }
71
+
72
+ private async *listPagingAll(
73
+ options?: OperationsListOptionalParams
74
+ ): AsyncIterableIterator<AvailableOperation> {
75
+ for await (const page of this.listPagingPage(options)) {
76
+ yield* page;
77
+ }
52
78
  }
53
79
 
54
80
  /**
55
- * Return an async operation
56
- * @summary Implements get of async operation
57
- * @param regionId The region Id (westus, eastus)
58
- * @param operationId operation id
59
- * @param [options] The optional parameters
60
- * @returns Promise<Models.OperationsGetResponse>
61
- */
62
- get(regionId: string, operationId: string, options?: msRest.RequestOptionsBase): Promise<Models.OperationsGetResponse>;
63
- /**
64
- * @param regionId The region Id (westus, eastus)
65
- * @param operationId operation id
66
- * @param callback The callback
81
+ * Return list of operations
82
+ * @param options The options parameters.
67
83
  */
68
- get(regionId: string, operationId: string, callback: msRest.ServiceCallback<Models.OperationResource>): void;
84
+ private _list(
85
+ options?: OperationsListOptionalParams
86
+ ): Promise<OperationsListResponse> {
87
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
88
+ }
89
+
69
90
  /**
91
+ * Return an async operation
70
92
  * @param regionId The region Id (westus, eastus)
71
93
  * @param operationId operation id
72
- * @param options The optional parameters
73
- * @param callback The callback
94
+ * @param options The options parameters.
74
95
  */
75
- get(regionId: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OperationResource>): void;
76
- get(regionId: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OperationResource>, callback?: msRest.ServiceCallback<Models.OperationResource>): Promise<Models.OperationsGetResponse> {
96
+ get(
97
+ regionId: string,
98
+ operationId: string,
99
+ options?: OperationsGetOptionalParams
100
+ ): Promise<OperationsGetResponse> {
77
101
  return this.client.sendOperationRequest(
78
- {
79
- regionId,
80
- operationId,
81
- options
82
- },
83
- getOperationSpec,
84
- callback) as Promise<Models.OperationsGetResponse>;
102
+ { regionId, operationId, options },
103
+ getOperationSpec
104
+ );
85
105
  }
86
106
 
87
107
  /**
88
- * Return list of operations
89
- * @summary Implements list of available operations
90
- * @param nextPageLink The NextLink from the previous successful call to List operation.
91
- * @param [options] The optional parameters
92
- * @returns Promise<Models.OperationsListNextResponse>
93
- */
94
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.OperationsListNextResponse>;
95
- /**
96
- * @param nextPageLink The NextLink from the previous successful call to List operation.
97
- * @param callback The callback
98
- */
99
- listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.AvailableOperationsListResponse>): void;
100
- /**
101
- * @param nextPageLink The NextLink from the previous successful call to List operation.
102
- * @param options The optional parameters
103
- * @param callback The callback
108
+ * ListNext
109
+ * @param nextLink The nextLink from the previous successful call to the List method.
110
+ * @param options The options parameters.
104
111
  */
105
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.AvailableOperationsListResponse>): void;
106
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.AvailableOperationsListResponse>, callback?: msRest.ServiceCallback<Models.AvailableOperationsListResponse>): Promise<Models.OperationsListNextResponse> {
112
+ private _listNext(
113
+ nextLink: string,
114
+ options?: OperationsListNextOptionalParams
115
+ ): Promise<OperationsListNextResponse> {
107
116
  return this.client.sendOperationRequest(
108
- {
109
- nextPageLink,
110
- options
111
- },
112
- listNextOperationSpec,
113
- callback) as Promise<Models.OperationsListNextResponse>;
117
+ { nextLink, options },
118
+ listNextOperationSpec
119
+ );
114
120
  }
115
121
  }
116
-
117
122
  // Operation Specifications
118
- const serializer = new msRest.Serializer(Mappers);
119
- const listOperationSpec: msRest.OperationSpec = {
123
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
124
+
125
+ const listOperationSpec: coreClient.OperationSpec = {
126
+ path: "/providers/Microsoft.VMwareCloudSimple/operations",
120
127
  httpMethod: "GET",
121
- path: "providers/Microsoft.VMwareCloudSimple/operations",
122
- queryParameters: [
123
- Parameters.apiVersion
124
- ],
125
- headerParameters: [
126
- Parameters.acceptLanguage
127
- ],
128
128
  responses: {
129
129
  200: {
130
130
  bodyMapper: Mappers.AvailableOperationsListResponse
131
131
  },
132
132
  default: {
133
- bodyMapper: Mappers.CSRPError
133
+ bodyMapper: Mappers.CsrpError
134
134
  }
135
135
  },
136
+ queryParameters: [Parameters.apiVersion],
137
+ urlParameters: [Parameters.$host],
138
+ headerParameters: [Parameters.accept],
136
139
  serializer
137
140
  };
138
-
139
- const getOperationSpec: msRest.OperationSpec = {
141
+ const getOperationSpec: coreClient.OperationSpec = {
142
+ path:
143
+ "/subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/operationResults/{operationId}",
140
144
  httpMethod: "GET",
141
- path: "subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/operationResults/{operationId}",
142
- urlParameters: [
143
- Parameters.subscriptionId,
144
- Parameters.regionId,
145
- Parameters.operationId
146
- ],
147
- queryParameters: [
148
- Parameters.apiVersion
149
- ],
150
- headerParameters: [
151
- Parameters.referer,
152
- Parameters.acceptLanguage
153
- ],
154
145
  responses: {
155
146
  200: {
156
- bodyMapper: Mappers.OperationResource,
157
- headersMapper: Mappers.OperationsGetHeaders
147
+ bodyMapper: Mappers.OperationResource
158
148
  },
159
149
  202: {
160
150
  headersMapper: Mappers.OperationsGetHeaders
161
151
  },
162
- 204: {
163
- headersMapper: Mappers.OperationsGetHeaders
164
- },
152
+ 204: {},
165
153
  default: {
166
- bodyMapper: Mappers.CSRPError
154
+ bodyMapper: Mappers.CsrpError,
155
+ headersMapper: Mappers.OperationsGetExceptionHeaders
167
156
  }
168
157
  },
158
+ queryParameters: [Parameters.apiVersion],
159
+ urlParameters: [
160
+ Parameters.$host,
161
+ Parameters.subscriptionId,
162
+ Parameters.regionId,
163
+ Parameters.operationId
164
+ ],
165
+ headerParameters: [Parameters.accept, Parameters.referer],
169
166
  serializer
170
167
  };
171
-
172
- const listNextOperationSpec: msRest.OperationSpec = {
173
- httpMethod: "GET",
174
- baseUrl: "https://management.azure.com",
168
+ const listNextOperationSpec: coreClient.OperationSpec = {
175
169
  path: "{nextLink}",
176
- urlParameters: [
177
- Parameters.nextPageLink
178
- ],
179
- headerParameters: [
180
- Parameters.acceptLanguage
181
- ],
170
+ httpMethod: "GET",
182
171
  responses: {
183
172
  200: {
184
173
  bodyMapper: Mappers.AvailableOperationsListResponse
185
174
  },
186
175
  default: {
187
- bodyMapper: Mappers.CSRPError
176
+ bodyMapper: Mappers.CsrpError
188
177
  }
189
178
  },
179
+ queryParameters: [Parameters.apiVersion],
180
+ urlParameters: [Parameters.$host, Parameters.nextLink],
181
+ headerParameters: [Parameters.accept],
190
182
  serializer
191
183
  };
@@ -1,191 +1,199 @@
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 Models from "../models";
13
- import * as Mappers from "../models/privateCloudsMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { PrivateClouds } 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
- import { VMwareCloudSimpleClientContext } from "../vMwareCloudSimpleClientContext";
14
+ import { VMwareCloudSimple } from "../vMwareCloudSimple";
15
+ import {
16
+ PrivateCloud,
17
+ PrivateCloudsListNextOptionalParams,
18
+ PrivateCloudsListOptionalParams,
19
+ PrivateCloudsListResponse,
20
+ PrivateCloudsGetOptionalParams,
21
+ PrivateCloudsGetResponse,
22
+ PrivateCloudsListNextResponse
23
+ } from "../models";
16
24
 
17
- /** Class representing a PrivateClouds. */
18
- export class PrivateClouds {
19
- private readonly client: VMwareCloudSimpleClientContext;
25
+ /// <reference lib="esnext.asynciterable" />
26
+ /** Class containing PrivateClouds operations. */
27
+ export class PrivateCloudsImpl implements PrivateClouds {
28
+ private readonly client: VMwareCloudSimple;
20
29
 
21
30
  /**
22
- * Create a PrivateClouds.
23
- * @param {VMwareCloudSimpleClientContext} client Reference to the service client.
31
+ * Initialize a new instance of the class PrivateClouds class.
32
+ * @param client Reference to the service client
24
33
  */
25
- constructor(client: VMwareCloudSimpleClientContext) {
34
+ constructor(client: VMwareCloudSimple) {
26
35
  this.client = client;
27
36
  }
28
37
 
29
38
  /**
30
39
  * Returns list of private clouds in particular region
31
- * @summary Implements private cloud list GET method
32
40
  * @param regionId The region Id (westus, eastus)
33
- * @param [options] The optional parameters
34
- * @returns Promise<Models.PrivateCloudsListResponse>
41
+ * @param options The options parameters.
35
42
  */
36
- list(regionId: string, options?: msRest.RequestOptionsBase): Promise<Models.PrivateCloudsListResponse>;
37
- /**
38
- * @param regionId The region Id (westus, eastus)
39
- * @param callback The callback
40
- */
41
- list(regionId: string, callback: msRest.ServiceCallback<Models.PrivateCloudList>): void;
43
+ public list(
44
+ regionId: string,
45
+ options?: PrivateCloudsListOptionalParams
46
+ ): PagedAsyncIterableIterator<PrivateCloud> {
47
+ const iter = this.listPagingAll(regionId, options);
48
+ return {
49
+ next() {
50
+ return iter.next();
51
+ },
52
+ [Symbol.asyncIterator]() {
53
+ return this;
54
+ },
55
+ byPage: () => {
56
+ return this.listPagingPage(regionId, options);
57
+ }
58
+ };
59
+ }
60
+
61
+ private async *listPagingPage(
62
+ regionId: string,
63
+ options?: PrivateCloudsListOptionalParams
64
+ ): AsyncIterableIterator<PrivateCloud[]> {
65
+ let result = await this._list(regionId, options);
66
+ yield result.value || [];
67
+ let continuationToken = result.nextLink;
68
+ while (continuationToken) {
69
+ result = await this._listNext(regionId, continuationToken, options);
70
+ continuationToken = result.nextLink;
71
+ yield result.value || [];
72
+ }
73
+ }
74
+
75
+ private async *listPagingAll(
76
+ regionId: string,
77
+ options?: PrivateCloudsListOptionalParams
78
+ ): AsyncIterableIterator<PrivateCloud> {
79
+ for await (const page of this.listPagingPage(regionId, options)) {
80
+ yield* page;
81
+ }
82
+ }
83
+
42
84
  /**
85
+ * Returns list of private clouds in particular region
43
86
  * @param regionId The region Id (westus, eastus)
44
- * @param options The optional parameters
45
- * @param callback The callback
87
+ * @param options The options parameters.
46
88
  */
47
- list(regionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PrivateCloudList>): void;
48
- list(regionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PrivateCloudList>, callback?: msRest.ServiceCallback<Models.PrivateCloudList>): Promise<Models.PrivateCloudsListResponse> {
89
+ private _list(
90
+ regionId: string,
91
+ options?: PrivateCloudsListOptionalParams
92
+ ): Promise<PrivateCloudsListResponse> {
49
93
  return this.client.sendOperationRequest(
50
- {
51
- regionId,
52
- options
53
- },
54
- listOperationSpec,
55
- callback) as Promise<Models.PrivateCloudsListResponse>;
94
+ { regionId, options },
95
+ listOperationSpec
96
+ );
56
97
  }
57
98
 
58
99
  /**
59
100
  * Returns private cloud by its name
60
- * @summary Implements private cloud GET method
61
101
  * @param pcName The private cloud name
62
102
  * @param regionId The region Id (westus, eastus)
63
- * @param [options] The optional parameters
64
- * @returns Promise<Models.PrivateCloudsGetResponse>
103
+ * @param options The options parameters.
65
104
  */
66
- get(pcName: string, regionId: string, options?: msRest.RequestOptionsBase): Promise<Models.PrivateCloudsGetResponse>;
67
- /**
68
- * @param pcName The private cloud name
69
- * @param regionId The region Id (westus, eastus)
70
- * @param callback The callback
71
- */
72
- get(pcName: string, regionId: string, callback: msRest.ServiceCallback<Models.PrivateCloud>): void;
73
- /**
74
- * @param pcName The private cloud name
75
- * @param regionId The region Id (westus, eastus)
76
- * @param options The optional parameters
77
- * @param callback The callback
78
- */
79
- get(pcName: string, regionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PrivateCloud>): void;
80
- get(pcName: string, regionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PrivateCloud>, callback?: msRest.ServiceCallback<Models.PrivateCloud>): Promise<Models.PrivateCloudsGetResponse> {
105
+ get(
106
+ pcName: string,
107
+ regionId: string,
108
+ options?: PrivateCloudsGetOptionalParams
109
+ ): Promise<PrivateCloudsGetResponse> {
81
110
  return this.client.sendOperationRequest(
82
- {
83
- pcName,
84
- regionId,
85
- options
86
- },
87
- getOperationSpec,
88
- callback) as Promise<Models.PrivateCloudsGetResponse>;
111
+ { pcName, regionId, options },
112
+ getOperationSpec
113
+ );
89
114
  }
90
115
 
91
116
  /**
92
- * Returns list of private clouds in particular region
93
- * @summary Implements private cloud list GET method
94
- * @param nextPageLink The NextLink from the previous successful call to List operation.
95
- * @param [options] The optional parameters
96
- * @returns Promise<Models.PrivateCloudsListNextResponse>
97
- */
98
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.PrivateCloudsListNextResponse>;
99
- /**
100
- * @param nextPageLink The NextLink from the previous successful call to List operation.
101
- * @param callback The callback
102
- */
103
- listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.PrivateCloudList>): void;
104
- /**
105
- * @param nextPageLink The NextLink from the previous successful call to List operation.
106
- * @param options The optional parameters
107
- * @param callback The callback
117
+ * ListNext
118
+ * @param regionId The region Id (westus, eastus)
119
+ * @param nextLink The nextLink from the previous successful call to the List method.
120
+ * @param options The options parameters.
108
121
  */
109
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PrivateCloudList>): void;
110
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PrivateCloudList>, callback?: msRest.ServiceCallback<Models.PrivateCloudList>): Promise<Models.PrivateCloudsListNextResponse> {
122
+ private _listNext(
123
+ regionId: string,
124
+ nextLink: string,
125
+ options?: PrivateCloudsListNextOptionalParams
126
+ ): Promise<PrivateCloudsListNextResponse> {
111
127
  return this.client.sendOperationRequest(
112
- {
113
- nextPageLink,
114
- options
115
- },
116
- listNextOperationSpec,
117
- callback) as Promise<Models.PrivateCloudsListNextResponse>;
128
+ { regionId, nextLink, options },
129
+ listNextOperationSpec
130
+ );
118
131
  }
119
132
  }
120
-
121
133
  // Operation Specifications
122
- const serializer = new msRest.Serializer(Mappers);
123
- const listOperationSpec: msRest.OperationSpec = {
134
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
135
+
136
+ const listOperationSpec: coreClient.OperationSpec = {
137
+ path:
138
+ "/subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds",
124
139
  httpMethod: "GET",
125
- path: "subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds",
126
- urlParameters: [
127
- Parameters.subscriptionId,
128
- Parameters.regionId
129
- ],
130
- queryParameters: [
131
- Parameters.apiVersion
132
- ],
133
- headerParameters: [
134
- Parameters.acceptLanguage
135
- ],
136
140
  responses: {
137
141
  200: {
138
142
  bodyMapper: Mappers.PrivateCloudList
139
143
  },
140
144
  default: {
141
- bodyMapper: Mappers.CSRPError
145
+ bodyMapper: Mappers.CsrpError
142
146
  }
143
147
  },
144
- serializer
145
- };
146
-
147
- const getOperationSpec: msRest.OperationSpec = {
148
- httpMethod: "GET",
149
- path: "subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}",
148
+ queryParameters: [Parameters.apiVersion],
150
149
  urlParameters: [
150
+ Parameters.$host,
151
151
  Parameters.subscriptionId,
152
- Parameters.pcName,
153
152
  Parameters.regionId
154
153
  ],
155
- queryParameters: [
156
- Parameters.apiVersion
157
- ],
158
- headerParameters: [
159
- Parameters.acceptLanguage
160
- ],
154
+ headerParameters: [Parameters.accept],
155
+ serializer
156
+ };
157
+ const getOperationSpec: coreClient.OperationSpec = {
158
+ path:
159
+ "/subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}",
160
+ httpMethod: "GET",
161
161
  responses: {
162
162
  200: {
163
163
  bodyMapper: Mappers.PrivateCloud
164
164
  },
165
165
  default: {
166
- bodyMapper: Mappers.CSRPError
166
+ bodyMapper: Mappers.CsrpError
167
167
  }
168
168
  },
169
+ queryParameters: [Parameters.apiVersion],
170
+ urlParameters: [
171
+ Parameters.$host,
172
+ Parameters.subscriptionId,
173
+ Parameters.regionId,
174
+ Parameters.pcName
175
+ ],
176
+ headerParameters: [Parameters.accept],
169
177
  serializer
170
178
  };
171
-
172
- const listNextOperationSpec: msRest.OperationSpec = {
173
- httpMethod: "GET",
174
- baseUrl: "https://management.azure.com",
179
+ const listNextOperationSpec: coreClient.OperationSpec = {
175
180
  path: "{nextLink}",
176
- urlParameters: [
177
- Parameters.nextPageLink
178
- ],
179
- headerParameters: [
180
- Parameters.acceptLanguage
181
- ],
181
+ httpMethod: "GET",
182
182
  responses: {
183
183
  200: {
184
184
  bodyMapper: Mappers.PrivateCloudList
185
185
  },
186
186
  default: {
187
- bodyMapper: Mappers.CSRPError
187
+ bodyMapper: Mappers.CsrpError
188
188
  }
189
189
  },
190
+ queryParameters: [Parameters.apiVersion],
191
+ urlParameters: [
192
+ Parameters.$host,
193
+ Parameters.subscriptionId,
194
+ Parameters.regionId,
195
+ Parameters.nextLink
196
+ ],
197
+ headerParameters: [Parameters.accept],
190
198
  serializer
191
199
  };