@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,443 +1,729 @@
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/virtualMachinesMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { VirtualMachines } 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
- import { VMwareCloudSimpleClientContext } from "../vMwareCloudSimpleClientContext";
14
+ import { VMwareCloudSimple } from "../vMwareCloudSimple";
15
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
+ import { LroImpl } from "../lroImpl";
17
+ import {
18
+ VirtualMachine,
19
+ VirtualMachinesListBySubscriptionNextOptionalParams,
20
+ VirtualMachinesListBySubscriptionOptionalParams,
21
+ VirtualMachinesListByResourceGroupNextOptionalParams,
22
+ VirtualMachinesListByResourceGroupOptionalParams,
23
+ VirtualMachinesListBySubscriptionResponse,
24
+ VirtualMachinesListByResourceGroupResponse,
25
+ VirtualMachinesGetOptionalParams,
26
+ VirtualMachinesGetResponse,
27
+ VirtualMachinesCreateOrUpdateOptionalParams,
28
+ VirtualMachinesCreateOrUpdateResponse,
29
+ VirtualMachinesDeleteOptionalParams,
30
+ VirtualMachinesDeleteResponse,
31
+ PatchPayload,
32
+ VirtualMachinesUpdateOptionalParams,
33
+ VirtualMachinesUpdateResponse,
34
+ VirtualMachinesStartOptionalParams,
35
+ VirtualMachinesStopOptionalParams,
36
+ VirtualMachinesListBySubscriptionNextResponse,
37
+ VirtualMachinesListByResourceGroupNextResponse
38
+ } from "../models";
17
39
 
18
- /** Class representing a VirtualMachines. */
19
- export class VirtualMachines {
20
- private readonly client: VMwareCloudSimpleClientContext;
40
+ /// <reference lib="esnext.asynciterable" />
41
+ /** Class containing VirtualMachines operations. */
42
+ export class VirtualMachinesImpl implements VirtualMachines {
43
+ private readonly client: VMwareCloudSimple;
21
44
 
22
45
  /**
23
- * Create a VirtualMachines.
24
- * @param {VMwareCloudSimpleClientContext} client Reference to the service client.
46
+ * Initialize a new instance of the class VirtualMachines class.
47
+ * @param client Reference to the service client
25
48
  */
26
- constructor(client: VMwareCloudSimpleClientContext) {
49
+ constructor(client: VMwareCloudSimple) {
27
50
  this.client = client;
28
51
  }
29
52
 
30
53
  /**
31
54
  * Returns list virtual machine within subscription
32
- * @summary Implements list virtual machine within subscription method
33
- * @param [options] The optional parameters
34
- * @returns Promise<Models.VirtualMachinesListBySubscriptionResponse>
55
+ * @param options The options parameters.
35
56
  */
36
- listBySubscription(options?: Models.VirtualMachinesListBySubscriptionOptionalParams): Promise<Models.VirtualMachinesListBySubscriptionResponse>;
37
- /**
38
- * @param callback The callback
39
- */
40
- listBySubscription(callback: msRest.ServiceCallback<Models.VirtualMachineListResponse>): void;
41
- /**
42
- * @param options The optional parameters
43
- * @param callback The callback
44
- */
45
- listBySubscription(options: Models.VirtualMachinesListBySubscriptionOptionalParams, callback: msRest.ServiceCallback<Models.VirtualMachineListResponse>): void;
46
- listBySubscription(options?: Models.VirtualMachinesListBySubscriptionOptionalParams | msRest.ServiceCallback<Models.VirtualMachineListResponse>, callback?: msRest.ServiceCallback<Models.VirtualMachineListResponse>): Promise<Models.VirtualMachinesListBySubscriptionResponse> {
47
- return this.client.sendOperationRequest(
48
- {
49
- options
57
+ public listBySubscription(
58
+ options?: VirtualMachinesListBySubscriptionOptionalParams
59
+ ): PagedAsyncIterableIterator<VirtualMachine> {
60
+ const iter = this.listBySubscriptionPagingAll(options);
61
+ return {
62
+ next() {
63
+ return iter.next();
64
+ },
65
+ [Symbol.asyncIterator]() {
66
+ return this;
50
67
  },
51
- listBySubscriptionOperationSpec,
52
- callback) as Promise<Models.VirtualMachinesListBySubscriptionResponse>;
68
+ byPage: () => {
69
+ return this.listBySubscriptionPagingPage(options);
70
+ }
71
+ };
72
+ }
73
+
74
+ private async *listBySubscriptionPagingPage(
75
+ options?: VirtualMachinesListBySubscriptionOptionalParams
76
+ ): AsyncIterableIterator<VirtualMachine[]> {
77
+ let result = await this._listBySubscription(options);
78
+ yield result.value || [];
79
+ let continuationToken = result.nextLink;
80
+ while (continuationToken) {
81
+ result = await this._listBySubscriptionNext(continuationToken, options);
82
+ continuationToken = result.nextLink;
83
+ yield result.value || [];
84
+ }
85
+ }
86
+
87
+ private async *listBySubscriptionPagingAll(
88
+ options?: VirtualMachinesListBySubscriptionOptionalParams
89
+ ): AsyncIterableIterator<VirtualMachine> {
90
+ for await (const page of this.listBySubscriptionPagingPage(options)) {
91
+ yield* page;
92
+ }
53
93
  }
54
94
 
55
95
  /**
56
96
  * Returns list of virtual machine within resource group
57
- * @summary Implements list virtual machine within RG method
58
97
  * @param resourceGroupName The name of the resource group
59
- * @param [options] The optional parameters
60
- * @returns Promise<Models.VirtualMachinesListByResourceGroupResponse>
98
+ * @param options The options parameters.
61
99
  */
62
- listByResourceGroup(resourceGroupName: string, options?: Models.VirtualMachinesListByResourceGroupOptionalParams): Promise<Models.VirtualMachinesListByResourceGroupResponse>;
63
- /**
64
- * @param resourceGroupName The name of the resource group
65
- * @param callback The callback
66
- */
67
- listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback<Models.VirtualMachineListResponse>): void;
68
- /**
69
- * @param resourceGroupName The name of the resource group
70
- * @param options The optional parameters
71
- * @param callback The callback
72
- */
73
- listByResourceGroup(resourceGroupName: string, options: Models.VirtualMachinesListByResourceGroupOptionalParams, callback: msRest.ServiceCallback<Models.VirtualMachineListResponse>): void;
74
- listByResourceGroup(resourceGroupName: string, options?: Models.VirtualMachinesListByResourceGroupOptionalParams | msRest.ServiceCallback<Models.VirtualMachineListResponse>, callback?: msRest.ServiceCallback<Models.VirtualMachineListResponse>): Promise<Models.VirtualMachinesListByResourceGroupResponse> {
75
- return this.client.sendOperationRequest(
76
- {
100
+ public listByResourceGroup(
101
+ resourceGroupName: string,
102
+ options?: VirtualMachinesListByResourceGroupOptionalParams
103
+ ): PagedAsyncIterableIterator<VirtualMachine> {
104
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
105
+ return {
106
+ next() {
107
+ return iter.next();
108
+ },
109
+ [Symbol.asyncIterator]() {
110
+ return this;
111
+ },
112
+ byPage: () => {
113
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
114
+ }
115
+ };
116
+ }
117
+
118
+ private async *listByResourceGroupPagingPage(
119
+ resourceGroupName: string,
120
+ options?: VirtualMachinesListByResourceGroupOptionalParams
121
+ ): AsyncIterableIterator<VirtualMachine[]> {
122
+ let result = await this._listByResourceGroup(resourceGroupName, options);
123
+ yield result.value || [];
124
+ let continuationToken = result.nextLink;
125
+ while (continuationToken) {
126
+ result = await this._listByResourceGroupNext(
77
127
  resourceGroupName,
128
+ continuationToken,
78
129
  options
79
- },
80
- listByResourceGroupOperationSpec,
81
- callback) as Promise<Models.VirtualMachinesListByResourceGroupResponse>;
130
+ );
131
+ continuationToken = result.nextLink;
132
+ yield result.value || [];
133
+ }
134
+ }
135
+
136
+ private async *listByResourceGroupPagingAll(
137
+ resourceGroupName: string,
138
+ options?: VirtualMachinesListByResourceGroupOptionalParams
139
+ ): AsyncIterableIterator<VirtualMachine> {
140
+ for await (const page of this.listByResourceGroupPagingPage(
141
+ resourceGroupName,
142
+ options
143
+ )) {
144
+ yield* page;
145
+ }
82
146
  }
83
147
 
84
148
  /**
85
- * Get virtual machine
86
- * @summary Implements virtual machine GET method
87
- * @param resourceGroupName The name of the resource group
88
- * @param virtualMachineName virtual machine name
89
- * @param [options] The optional parameters
90
- * @returns Promise<Models.VirtualMachinesGetResponse>
149
+ * Returns list virtual machine within subscription
150
+ * @param options The options parameters.
91
151
  */
92
- get(resourceGroupName: string, virtualMachineName: string, options?: msRest.RequestOptionsBase): Promise<Models.VirtualMachinesGetResponse>;
152
+ private _listBySubscription(
153
+ options?: VirtualMachinesListBySubscriptionOptionalParams
154
+ ): Promise<VirtualMachinesListBySubscriptionResponse> {
155
+ return this.client.sendOperationRequest(
156
+ { options },
157
+ listBySubscriptionOperationSpec
158
+ );
159
+ }
160
+
93
161
  /**
162
+ * Returns list of virtual machine within resource group
94
163
  * @param resourceGroupName The name of the resource group
95
- * @param virtualMachineName virtual machine name
96
- * @param callback The callback
164
+ * @param options The options parameters.
97
165
  */
98
- get(resourceGroupName: string, virtualMachineName: string, callback: msRest.ServiceCallback<Models.VirtualMachine>): void;
166
+ private _listByResourceGroup(
167
+ resourceGroupName: string,
168
+ options?: VirtualMachinesListByResourceGroupOptionalParams
169
+ ): Promise<VirtualMachinesListByResourceGroupResponse> {
170
+ return this.client.sendOperationRequest(
171
+ { resourceGroupName, options },
172
+ listByResourceGroupOperationSpec
173
+ );
174
+ }
175
+
99
176
  /**
177
+ * Get virtual machine
100
178
  * @param resourceGroupName The name of the resource group
101
179
  * @param virtualMachineName virtual machine name
102
- * @param options The optional parameters
103
- * @param callback The callback
180
+ * @param options The options parameters.
104
181
  */
105
- get(resourceGroupName: string, virtualMachineName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.VirtualMachine>): void;
106
- get(resourceGroupName: string, virtualMachineName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.VirtualMachine>, callback?: msRest.ServiceCallback<Models.VirtualMachine>): Promise<Models.VirtualMachinesGetResponse> {
182
+ get(
183
+ resourceGroupName: string,
184
+ virtualMachineName: string,
185
+ options?: VirtualMachinesGetOptionalParams
186
+ ): Promise<VirtualMachinesGetResponse> {
107
187
  return this.client.sendOperationRequest(
108
- {
109
- resourceGroupName,
110
- virtualMachineName,
111
- options
112
- },
113
- getOperationSpec,
114
- callback) as Promise<Models.VirtualMachinesGetResponse>;
188
+ { resourceGroupName, virtualMachineName, options },
189
+ getOperationSpec
190
+ );
115
191
  }
116
192
 
117
193
  /**
118
194
  * Create Or Update Virtual Machine
119
- * @summary Implements virtual machine PUT method
120
195
  * @param resourceGroupName The name of the resource group
121
196
  * @param virtualMachineName virtual machine name
122
197
  * @param virtualMachineRequest Create or Update Virtual Machine request
123
- * @param [options] The optional parameters
124
- * @returns Promise<Models.VirtualMachinesCreateOrUpdateResponse>
198
+ * @param options The options parameters.
125
199
  */
126
- createOrUpdate(resourceGroupName: string, virtualMachineName: string, virtualMachineRequest: Models.VirtualMachine, options?: msRest.RequestOptionsBase): Promise<Models.VirtualMachinesCreateOrUpdateResponse> {
127
- return this.beginCreateOrUpdate(resourceGroupName,virtualMachineName,virtualMachineRequest,options)
128
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.VirtualMachinesCreateOrUpdateResponse>;
200
+ async beginCreateOrUpdate(
201
+ resourceGroupName: string,
202
+ virtualMachineName: string,
203
+ virtualMachineRequest: VirtualMachine,
204
+ options?: VirtualMachinesCreateOrUpdateOptionalParams
205
+ ): Promise<
206
+ PollerLike<
207
+ PollOperationState<VirtualMachinesCreateOrUpdateResponse>,
208
+ VirtualMachinesCreateOrUpdateResponse
209
+ >
210
+ > {
211
+ const directSendOperation = async (
212
+ args: coreClient.OperationArguments,
213
+ spec: coreClient.OperationSpec
214
+ ): Promise<VirtualMachinesCreateOrUpdateResponse> => {
215
+ return this.client.sendOperationRequest(args, spec);
216
+ };
217
+ const sendOperation = async (
218
+ args: coreClient.OperationArguments,
219
+ spec: coreClient.OperationSpec
220
+ ) => {
221
+ let currentRawResponse:
222
+ | coreClient.FullOperationResponse
223
+ | undefined = undefined;
224
+ const providedCallback = args.options?.onResponse;
225
+ const callback: coreClient.RawResponseCallback = (
226
+ rawResponse: coreClient.FullOperationResponse,
227
+ flatResponse: unknown
228
+ ) => {
229
+ currentRawResponse = rawResponse;
230
+ providedCallback?.(rawResponse, flatResponse);
231
+ };
232
+ const updatedArgs = {
233
+ ...args,
234
+ options: {
235
+ ...args.options,
236
+ onResponse: callback
237
+ }
238
+ };
239
+ const flatResponse = await directSendOperation(updatedArgs, spec);
240
+ return {
241
+ flatResponse,
242
+ rawResponse: {
243
+ statusCode: currentRawResponse!.status,
244
+ body: currentRawResponse!.parsedBody,
245
+ headers: currentRawResponse!.headers.toJSON()
246
+ }
247
+ };
248
+ };
249
+
250
+ const lro = new LroImpl(
251
+ sendOperation,
252
+ { resourceGroupName, virtualMachineName, virtualMachineRequest, options },
253
+ createOrUpdateOperationSpec
254
+ );
255
+ return new LroEngine(lro, {
256
+ resumeFrom: options?.resumeFrom,
257
+ intervalInMs: options?.updateIntervalInMs
258
+ });
129
259
  }
130
260
 
131
261
  /**
132
- * Delete virtual machine
133
- * @summary Implements virtual machine DELETE method
262
+ * Create Or Update Virtual Machine
134
263
  * @param resourceGroupName The name of the resource group
135
264
  * @param virtualMachineName virtual machine name
136
- * @param [options] The optional parameters
137
- * @returns Promise<Models.VirtualMachinesDeleteResponse>
265
+ * @param virtualMachineRequest Create or Update Virtual Machine request
266
+ * @param options The options parameters.
138
267
  */
139
- deleteMethod(resourceGroupName: string, virtualMachineName: string, options?: msRest.RequestOptionsBase): Promise<Models.VirtualMachinesDeleteResponse> {
140
- return this.beginDeleteMethod(resourceGroupName,virtualMachineName,options)
141
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.VirtualMachinesDeleteResponse>;
268
+ async beginCreateOrUpdateAndWait(
269
+ resourceGroupName: string,
270
+ virtualMachineName: string,
271
+ virtualMachineRequest: VirtualMachine,
272
+ options?: VirtualMachinesCreateOrUpdateOptionalParams
273
+ ): Promise<VirtualMachinesCreateOrUpdateResponse> {
274
+ const poller = await this.beginCreateOrUpdate(
275
+ resourceGroupName,
276
+ virtualMachineName,
277
+ virtualMachineRequest,
278
+ options
279
+ );
280
+ return poller.pollUntilDone();
142
281
  }
143
282
 
144
283
  /**
145
- * Patch virtual machine properties
146
- * @summary Implements virtual machine PATCH method
284
+ * Delete virtual machine
147
285
  * @param resourceGroupName The name of the resource group
148
286
  * @param virtualMachineName virtual machine name
149
- * @param [options] The optional parameters
150
- * @returns Promise<Models.VirtualMachinesUpdateResponse>
287
+ * @param options The options parameters.
151
288
  */
152
- update(resourceGroupName: string, virtualMachineName: string, options?: Models.VirtualMachinesUpdateOptionalParams): Promise<Models.VirtualMachinesUpdateResponse> {
153
- return this.beginUpdate(resourceGroupName,virtualMachineName,options)
154
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.VirtualMachinesUpdateResponse>;
289
+ async beginDelete(
290
+ resourceGroupName: string,
291
+ virtualMachineName: string,
292
+ options?: VirtualMachinesDeleteOptionalParams
293
+ ): Promise<
294
+ PollerLike<
295
+ PollOperationState<VirtualMachinesDeleteResponse>,
296
+ VirtualMachinesDeleteResponse
297
+ >
298
+ > {
299
+ const directSendOperation = async (
300
+ args: coreClient.OperationArguments,
301
+ spec: coreClient.OperationSpec
302
+ ): Promise<VirtualMachinesDeleteResponse> => {
303
+ return this.client.sendOperationRequest(args, spec);
304
+ };
305
+ const sendOperation = async (
306
+ args: coreClient.OperationArguments,
307
+ spec: coreClient.OperationSpec
308
+ ) => {
309
+ let currentRawResponse:
310
+ | coreClient.FullOperationResponse
311
+ | undefined = undefined;
312
+ const providedCallback = args.options?.onResponse;
313
+ const callback: coreClient.RawResponseCallback = (
314
+ rawResponse: coreClient.FullOperationResponse,
315
+ flatResponse: unknown
316
+ ) => {
317
+ currentRawResponse = rawResponse;
318
+ providedCallback?.(rawResponse, flatResponse);
319
+ };
320
+ const updatedArgs = {
321
+ ...args,
322
+ options: {
323
+ ...args.options,
324
+ onResponse: callback
325
+ }
326
+ };
327
+ const flatResponse = await directSendOperation(updatedArgs, spec);
328
+ return {
329
+ flatResponse,
330
+ rawResponse: {
331
+ statusCode: currentRawResponse!.status,
332
+ body: currentRawResponse!.parsedBody,
333
+ headers: currentRawResponse!.headers.toJSON()
334
+ }
335
+ };
336
+ };
337
+
338
+ const lro = new LroImpl(
339
+ sendOperation,
340
+ { resourceGroupName, virtualMachineName, options },
341
+ deleteOperationSpec
342
+ );
343
+ return new LroEngine(lro, {
344
+ resumeFrom: options?.resumeFrom,
345
+ intervalInMs: options?.updateIntervalInMs
346
+ });
155
347
  }
156
348
 
157
349
  /**
158
- * Power on virtual machine
159
- * @summary Implements a start method for a virtual machine
350
+ * Delete virtual machine
160
351
  * @param resourceGroupName The name of the resource group
161
352
  * @param virtualMachineName virtual machine name
162
- * @param [options] The optional parameters
163
- * @returns Promise<Models.VirtualMachinesStartResponse>
353
+ * @param options The options parameters.
164
354
  */
165
- start(resourceGroupName: string, virtualMachineName: string, options?: msRest.RequestOptionsBase): Promise<Models.VirtualMachinesStartResponse> {
166
- return this.beginStart(resourceGroupName,virtualMachineName,options)
167
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.VirtualMachinesStartResponse>;
355
+ async beginDeleteAndWait(
356
+ resourceGroupName: string,
357
+ virtualMachineName: string,
358
+ options?: VirtualMachinesDeleteOptionalParams
359
+ ): Promise<VirtualMachinesDeleteResponse> {
360
+ const poller = await this.beginDelete(
361
+ resourceGroupName,
362
+ virtualMachineName,
363
+ options
364
+ );
365
+ return poller.pollUntilDone();
168
366
  }
169
367
 
170
368
  /**
171
- * Power off virtual machine, options: shutdown, poweroff, and suspend
172
- * @summary Implements shutdown, poweroff, and suspend method for a virtual machine
369
+ * Patch virtual machine properties
173
370
  * @param resourceGroupName The name of the resource group
174
371
  * @param virtualMachineName virtual machine name
175
- * @param [options] The optional parameters
176
- * @returns Promise<Models.VirtualMachinesStopResponse>
372
+ * @param virtualMachineRequest Patch virtual machine request
373
+ * @param options The options parameters.
177
374
  */
178
- stop(resourceGroupName: string, virtualMachineName: string, options?: Models.VirtualMachinesStopOptionalParams): Promise<Models.VirtualMachinesStopResponse> {
179
- return this.beginStop(resourceGroupName,virtualMachineName,options)
180
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.VirtualMachinesStopResponse>;
375
+ async beginUpdate(
376
+ resourceGroupName: string,
377
+ virtualMachineName: string,
378
+ virtualMachineRequest: PatchPayload,
379
+ options?: VirtualMachinesUpdateOptionalParams
380
+ ): Promise<
381
+ PollerLike<
382
+ PollOperationState<VirtualMachinesUpdateResponse>,
383
+ VirtualMachinesUpdateResponse
384
+ >
385
+ > {
386
+ const directSendOperation = async (
387
+ args: coreClient.OperationArguments,
388
+ spec: coreClient.OperationSpec
389
+ ): Promise<VirtualMachinesUpdateResponse> => {
390
+ return this.client.sendOperationRequest(args, spec);
391
+ };
392
+ const sendOperation = async (
393
+ args: coreClient.OperationArguments,
394
+ spec: coreClient.OperationSpec
395
+ ) => {
396
+ let currentRawResponse:
397
+ | coreClient.FullOperationResponse
398
+ | undefined = undefined;
399
+ const providedCallback = args.options?.onResponse;
400
+ const callback: coreClient.RawResponseCallback = (
401
+ rawResponse: coreClient.FullOperationResponse,
402
+ flatResponse: unknown
403
+ ) => {
404
+ currentRawResponse = rawResponse;
405
+ providedCallback?.(rawResponse, flatResponse);
406
+ };
407
+ const updatedArgs = {
408
+ ...args,
409
+ options: {
410
+ ...args.options,
411
+ onResponse: callback
412
+ }
413
+ };
414
+ const flatResponse = await directSendOperation(updatedArgs, spec);
415
+ return {
416
+ flatResponse,
417
+ rawResponse: {
418
+ statusCode: currentRawResponse!.status,
419
+ body: currentRawResponse!.parsedBody,
420
+ headers: currentRawResponse!.headers.toJSON()
421
+ }
422
+ };
423
+ };
424
+
425
+ const lro = new LroImpl(
426
+ sendOperation,
427
+ { resourceGroupName, virtualMachineName, virtualMachineRequest, options },
428
+ updateOperationSpec
429
+ );
430
+ return new LroEngine(lro, {
431
+ resumeFrom: options?.resumeFrom,
432
+ intervalInMs: options?.updateIntervalInMs
433
+ });
181
434
  }
182
435
 
183
436
  /**
184
- * Create Or Update Virtual Machine
185
- * @summary Implements virtual machine PUT method
437
+ * Patch virtual machine properties
186
438
  * @param resourceGroupName The name of the resource group
187
439
  * @param virtualMachineName virtual machine name
188
- * @param virtualMachineRequest Create or Update Virtual Machine request
189
- * @param [options] The optional parameters
190
- * @returns Promise<msRestAzure.LROPoller>
440
+ * @param virtualMachineRequest Patch virtual machine request
441
+ * @param options The options parameters.
191
442
  */
192
- beginCreateOrUpdate(resourceGroupName: string, virtualMachineName: string, virtualMachineRequest: Models.VirtualMachine, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
193
- return this.client.sendLRORequest(
194
- {
195
- resourceGroupName,
196
- virtualMachineName,
197
- virtualMachineRequest,
198
- options
199
- },
200
- beginCreateOrUpdateOperationSpec,
201
- options);
443
+ async beginUpdateAndWait(
444
+ resourceGroupName: string,
445
+ virtualMachineName: string,
446
+ virtualMachineRequest: PatchPayload,
447
+ options?: VirtualMachinesUpdateOptionalParams
448
+ ): Promise<VirtualMachinesUpdateResponse> {
449
+ const poller = await this.beginUpdate(
450
+ resourceGroupName,
451
+ virtualMachineName,
452
+ virtualMachineRequest,
453
+ options
454
+ );
455
+ return poller.pollUntilDone();
202
456
  }
203
457
 
204
458
  /**
205
- * Delete virtual machine
206
- * @summary Implements virtual machine DELETE method
459
+ * Power on virtual machine
207
460
  * @param resourceGroupName The name of the resource group
208
461
  * @param virtualMachineName virtual machine name
209
- * @param [options] The optional parameters
210
- * @returns Promise<msRestAzure.LROPoller>
462
+ * @param options The options parameters.
211
463
  */
212
- beginDeleteMethod(resourceGroupName: string, virtualMachineName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
213
- return this.client.sendLRORequest(
214
- {
215
- resourceGroupName,
216
- virtualMachineName,
217
- options
218
- },
219
- beginDeleteMethodOperationSpec,
220
- options);
464
+ async beginStart(
465
+ resourceGroupName: string,
466
+ virtualMachineName: string,
467
+ options?: VirtualMachinesStartOptionalParams
468
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
469
+ const directSendOperation = async (
470
+ args: coreClient.OperationArguments,
471
+ spec: coreClient.OperationSpec
472
+ ): Promise<void> => {
473
+ return this.client.sendOperationRequest(args, spec);
474
+ };
475
+ const sendOperation = async (
476
+ args: coreClient.OperationArguments,
477
+ spec: coreClient.OperationSpec
478
+ ) => {
479
+ let currentRawResponse:
480
+ | coreClient.FullOperationResponse
481
+ | undefined = undefined;
482
+ const providedCallback = args.options?.onResponse;
483
+ const callback: coreClient.RawResponseCallback = (
484
+ rawResponse: coreClient.FullOperationResponse,
485
+ flatResponse: unknown
486
+ ) => {
487
+ currentRawResponse = rawResponse;
488
+ providedCallback?.(rawResponse, flatResponse);
489
+ };
490
+ const updatedArgs = {
491
+ ...args,
492
+ options: {
493
+ ...args.options,
494
+ onResponse: callback
495
+ }
496
+ };
497
+ const flatResponse = await directSendOperation(updatedArgs, spec);
498
+ return {
499
+ flatResponse,
500
+ rawResponse: {
501
+ statusCode: currentRawResponse!.status,
502
+ body: currentRawResponse!.parsedBody,
503
+ headers: currentRawResponse!.headers.toJSON()
504
+ }
505
+ };
506
+ };
507
+
508
+ const lro = new LroImpl(
509
+ sendOperation,
510
+ { resourceGroupName, virtualMachineName, options },
511
+ startOperationSpec
512
+ );
513
+ return new LroEngine(lro, {
514
+ resumeFrom: options?.resumeFrom,
515
+ intervalInMs: options?.updateIntervalInMs
516
+ });
221
517
  }
222
518
 
223
519
  /**
224
- * Patch virtual machine properties
225
- * @summary Implements virtual machine PATCH method
520
+ * Power on virtual machine
226
521
  * @param resourceGroupName The name of the resource group
227
522
  * @param virtualMachineName virtual machine name
228
- * @param [options] The optional parameters
229
- * @returns Promise<msRestAzure.LROPoller>
523
+ * @param options The options parameters.
230
524
  */
231
- beginUpdate(resourceGroupName: string, virtualMachineName: string, options?: Models.VirtualMachinesBeginUpdateOptionalParams): Promise<msRestAzure.LROPoller> {
232
- return this.client.sendLRORequest(
233
- {
234
- resourceGroupName,
235
- virtualMachineName,
236
- options
237
- },
238
- beginUpdateOperationSpec,
239
- options);
525
+ async beginStartAndWait(
526
+ resourceGroupName: string,
527
+ virtualMachineName: string,
528
+ options?: VirtualMachinesStartOptionalParams
529
+ ): Promise<void> {
530
+ const poller = await this.beginStart(
531
+ resourceGroupName,
532
+ virtualMachineName,
533
+ options
534
+ );
535
+ return poller.pollUntilDone();
240
536
  }
241
537
 
242
538
  /**
243
- * Power on virtual machine
244
- * @summary Implements a start method for a virtual machine
539
+ * Power off virtual machine, options: shutdown, poweroff, and suspend
245
540
  * @param resourceGroupName The name of the resource group
246
541
  * @param virtualMachineName virtual machine name
247
- * @param [options] The optional parameters
248
- * @returns Promise<msRestAzure.LROPoller>
542
+ * @param options The options parameters.
249
543
  */
250
- beginStart(resourceGroupName: string, virtualMachineName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
251
- return this.client.sendLRORequest(
252
- {
253
- resourceGroupName,
254
- virtualMachineName,
255
- options
256
- },
257
- beginStartOperationSpec,
258
- options);
544
+ async beginStop(
545
+ resourceGroupName: string,
546
+ virtualMachineName: string,
547
+ options?: VirtualMachinesStopOptionalParams
548
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
549
+ const directSendOperation = async (
550
+ args: coreClient.OperationArguments,
551
+ spec: coreClient.OperationSpec
552
+ ): Promise<void> => {
553
+ return this.client.sendOperationRequest(args, spec);
554
+ };
555
+ const sendOperation = async (
556
+ args: coreClient.OperationArguments,
557
+ spec: coreClient.OperationSpec
558
+ ) => {
559
+ let currentRawResponse:
560
+ | coreClient.FullOperationResponse
561
+ | undefined = undefined;
562
+ const providedCallback = args.options?.onResponse;
563
+ const callback: coreClient.RawResponseCallback = (
564
+ rawResponse: coreClient.FullOperationResponse,
565
+ flatResponse: unknown
566
+ ) => {
567
+ currentRawResponse = rawResponse;
568
+ providedCallback?.(rawResponse, flatResponse);
569
+ };
570
+ const updatedArgs = {
571
+ ...args,
572
+ options: {
573
+ ...args.options,
574
+ onResponse: callback
575
+ }
576
+ };
577
+ const flatResponse = await directSendOperation(updatedArgs, spec);
578
+ return {
579
+ flatResponse,
580
+ rawResponse: {
581
+ statusCode: currentRawResponse!.status,
582
+ body: currentRawResponse!.parsedBody,
583
+ headers: currentRawResponse!.headers.toJSON()
584
+ }
585
+ };
586
+ };
587
+
588
+ const lro = new LroImpl(
589
+ sendOperation,
590
+ { resourceGroupName, virtualMachineName, options },
591
+ stopOperationSpec
592
+ );
593
+ return new LroEngine(lro, {
594
+ resumeFrom: options?.resumeFrom,
595
+ intervalInMs: options?.updateIntervalInMs
596
+ });
259
597
  }
260
598
 
261
599
  /**
262
600
  * Power off virtual machine, options: shutdown, poweroff, and suspend
263
- * @summary Implements shutdown, poweroff, and suspend method for a virtual machine
264
601
  * @param resourceGroupName The name of the resource group
265
602
  * @param virtualMachineName virtual machine name
266
- * @param [options] The optional parameters
267
- * @returns Promise<msRestAzure.LROPoller>
603
+ * @param options The options parameters.
268
604
  */
269
- beginStop(resourceGroupName: string, virtualMachineName: string, options?: Models.VirtualMachinesBeginStopOptionalParams): Promise<msRestAzure.LROPoller> {
270
- return this.client.sendLRORequest(
271
- {
272
- resourceGroupName,
273
- virtualMachineName,
274
- options
275
- },
276
- beginStopOperationSpec,
277
- options);
605
+ async beginStopAndWait(
606
+ resourceGroupName: string,
607
+ virtualMachineName: string,
608
+ options?: VirtualMachinesStopOptionalParams
609
+ ): Promise<void> {
610
+ const poller = await this.beginStop(
611
+ resourceGroupName,
612
+ virtualMachineName,
613
+ options
614
+ );
615
+ return poller.pollUntilDone();
278
616
  }
279
617
 
280
618
  /**
281
- * Returns list virtual machine within subscription
282
- * @summary Implements list virtual machine within subscription method
283
- * @param nextPageLink The NextLink from the previous successful call to List operation.
284
- * @param [options] The optional parameters
285
- * @returns Promise<Models.VirtualMachinesListBySubscriptionNextResponse>
286
- */
287
- listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.VirtualMachinesListBySubscriptionNextResponse>;
288
- /**
289
- * @param nextPageLink The NextLink from the previous successful call to List operation.
290
- * @param callback The callback
619
+ * ListBySubscriptionNext
620
+ * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
621
+ * @param options The options parameters.
291
622
  */
292
- listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.VirtualMachineListResponse>): void;
293
- /**
294
- * @param nextPageLink The NextLink from the previous successful call to List operation.
295
- * @param options The optional parameters
296
- * @param callback The callback
297
- */
298
- listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.VirtualMachineListResponse>): void;
299
- listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.VirtualMachineListResponse>, callback?: msRest.ServiceCallback<Models.VirtualMachineListResponse>): Promise<Models.VirtualMachinesListBySubscriptionNextResponse> {
623
+ private _listBySubscriptionNext(
624
+ nextLink: string,
625
+ options?: VirtualMachinesListBySubscriptionNextOptionalParams
626
+ ): Promise<VirtualMachinesListBySubscriptionNextResponse> {
300
627
  return this.client.sendOperationRequest(
301
- {
302
- nextPageLink,
303
- options
304
- },
305
- listBySubscriptionNextOperationSpec,
306
- callback) as Promise<Models.VirtualMachinesListBySubscriptionNextResponse>;
628
+ { nextLink, options },
629
+ listBySubscriptionNextOperationSpec
630
+ );
307
631
  }
308
632
 
309
633
  /**
310
- * Returns list of virtual machine within resource group
311
- * @summary Implements list virtual machine within RG method
312
- * @param nextPageLink The NextLink from the previous successful call to List operation.
313
- * @param [options] The optional parameters
314
- * @returns Promise<Models.VirtualMachinesListByResourceGroupNextResponse>
315
- */
316
- listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.VirtualMachinesListByResourceGroupNextResponse>;
317
- /**
318
- * @param nextPageLink The NextLink from the previous successful call to List operation.
319
- * @param callback The callback
320
- */
321
- listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.VirtualMachineListResponse>): void;
322
- /**
323
- * @param nextPageLink The NextLink from the previous successful call to List operation.
324
- * @param options The optional parameters
325
- * @param callback The callback
634
+ * ListByResourceGroupNext
635
+ * @param resourceGroupName The name of the resource group
636
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
637
+ * @param options The options parameters.
326
638
  */
327
- listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.VirtualMachineListResponse>): void;
328
- listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.VirtualMachineListResponse>, callback?: msRest.ServiceCallback<Models.VirtualMachineListResponse>): Promise<Models.VirtualMachinesListByResourceGroupNextResponse> {
639
+ private _listByResourceGroupNext(
640
+ resourceGroupName: string,
641
+ nextLink: string,
642
+ options?: VirtualMachinesListByResourceGroupNextOptionalParams
643
+ ): Promise<VirtualMachinesListByResourceGroupNextResponse> {
329
644
  return this.client.sendOperationRequest(
330
- {
331
- nextPageLink,
332
- options
333
- },
334
- listByResourceGroupNextOperationSpec,
335
- callback) as Promise<Models.VirtualMachinesListByResourceGroupNextResponse>;
645
+ { resourceGroupName, nextLink, options },
646
+ listByResourceGroupNextOperationSpec
647
+ );
336
648
  }
337
649
  }
338
-
339
650
  // Operation Specifications
340
- const serializer = new msRest.Serializer(Mappers);
341
- const listBySubscriptionOperationSpec: msRest.OperationSpec = {
651
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
652
+
653
+ const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
654
+ path:
655
+ "/subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/virtualMachines",
342
656
  httpMethod: "GET",
343
- path: "subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/virtualMachines",
344
- urlParameters: [
345
- Parameters.subscriptionId
346
- ],
347
- queryParameters: [
348
- Parameters.apiVersion,
349
- Parameters.filter,
350
- Parameters.top,
351
- Parameters.skipToken
352
- ],
353
- headerParameters: [
354
- Parameters.acceptLanguage
355
- ],
356
657
  responses: {
357
658
  200: {
358
659
  bodyMapper: Mappers.VirtualMachineListResponse
359
660
  },
360
661
  default: {
361
- bodyMapper: Mappers.CSRPError
662
+ bodyMapper: Mappers.CsrpError
362
663
  }
363
664
  },
364
- serializer
365
- };
366
-
367
- const listByResourceGroupOperationSpec: msRest.OperationSpec = {
368
- httpMethod: "GET",
369
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/virtualMachines",
370
- urlParameters: [
371
- Parameters.subscriptionId,
372
- Parameters.resourceGroupName
373
- ],
374
665
  queryParameters: [
375
666
  Parameters.apiVersion,
376
667
  Parameters.filter,
377
668
  Parameters.top,
378
669
  Parameters.skipToken
379
670
  ],
380
- headerParameters: [
381
- Parameters.acceptLanguage
382
- ],
671
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
672
+ headerParameters: [Parameters.accept],
673
+ serializer
674
+ };
675
+ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
676
+ path:
677
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/virtualMachines",
678
+ httpMethod: "GET",
383
679
  responses: {
384
680
  200: {
385
681
  bodyMapper: Mappers.VirtualMachineListResponse
386
682
  },
387
683
  default: {
388
- bodyMapper: Mappers.CSRPError
684
+ bodyMapper: Mappers.CsrpError
389
685
  }
390
686
  },
391
- serializer
392
- };
393
-
394
- const getOperationSpec: msRest.OperationSpec = {
395
- httpMethod: "GET",
396
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/virtualMachines/{virtualMachineName}",
397
- urlParameters: [
398
- Parameters.subscriptionId,
399
- Parameters.resourceGroupName,
400
- Parameters.virtualMachineName0
401
- ],
402
687
  queryParameters: [
403
- Parameters.apiVersion
688
+ Parameters.apiVersion,
689
+ Parameters.filter,
690
+ Parameters.top,
691
+ Parameters.skipToken
404
692
  ],
405
- headerParameters: [
406
- Parameters.acceptLanguage
693
+ urlParameters: [
694
+ Parameters.$host,
695
+ Parameters.subscriptionId,
696
+ Parameters.resourceGroupName
407
697
  ],
698
+ headerParameters: [Parameters.accept],
699
+ serializer
700
+ };
701
+ const getOperationSpec: coreClient.OperationSpec = {
702
+ path:
703
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/virtualMachines/{virtualMachineName}",
704
+ httpMethod: "GET",
408
705
  responses: {
409
706
  200: {
410
707
  bodyMapper: Mappers.VirtualMachine
411
708
  },
412
709
  default: {
413
- bodyMapper: Mappers.CSRPError
710
+ bodyMapper: Mappers.CsrpError
414
711
  }
415
712
  },
416
- serializer
417
- };
418
-
419
- const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
420
- httpMethod: "PUT",
421
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/virtualMachines/{virtualMachineName}",
713
+ queryParameters: [Parameters.apiVersion],
422
714
  urlParameters: [
715
+ Parameters.$host,
423
716
  Parameters.subscriptionId,
424
717
  Parameters.resourceGroupName,
425
- Parameters.virtualMachineName1
426
- ],
427
- queryParameters: [
428
- Parameters.apiVersion
718
+ Parameters.virtualMachineName
429
719
  ],
430
- headerParameters: [
431
- Parameters.referer,
432
- Parameters.acceptLanguage
433
- ],
434
- requestBody: {
435
- parameterPath: "virtualMachineRequest",
436
- mapper: {
437
- ...Mappers.VirtualMachine,
438
- required: true
439
- }
440
- },
720
+ headerParameters: [Parameters.accept],
721
+ serializer
722
+ };
723
+ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
724
+ path:
725
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/virtualMachines/{virtualMachineName}",
726
+ httpMethod: "PUT",
441
727
  responses: {
442
728
  200: {
443
729
  bodyMapper: Mappers.VirtualMachine,
@@ -447,29 +733,45 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
447
733
  bodyMapper: Mappers.VirtualMachine,
448
734
  headersMapper: Mappers.VirtualMachinesCreateOrUpdateHeaders
449
735
  },
736
+ 202: {
737
+ bodyMapper: Mappers.VirtualMachine,
738
+ headersMapper: Mappers.VirtualMachinesCreateOrUpdateHeaders
739
+ },
740
+ 204: {
741
+ bodyMapper: Mappers.VirtualMachine,
742
+ headersMapper: Mappers.VirtualMachinesCreateOrUpdateHeaders
743
+ },
450
744
  default: {
451
- bodyMapper: Mappers.CSRPError
745
+ bodyMapper: Mappers.CsrpError
452
746
  }
453
747
  },
454
- serializer
455
- };
456
-
457
- const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
458
- httpMethod: "DELETE",
459
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/virtualMachines/{virtualMachineName}",
748
+ requestBody: Parameters.virtualMachineRequest,
749
+ queryParameters: [Parameters.apiVersion],
460
750
  urlParameters: [
751
+ Parameters.$host,
461
752
  Parameters.subscriptionId,
462
753
  Parameters.resourceGroupName,
463
- Parameters.virtualMachineName0
464
- ],
465
- queryParameters: [
466
- Parameters.apiVersion
754
+ Parameters.virtualMachineName1
467
755
  ],
468
756
  headerParameters: [
757
+ Parameters.accept,
469
758
  Parameters.referer,
470
- Parameters.acceptLanguage
759
+ Parameters.contentType
471
760
  ],
761
+ mediaType: "json",
762
+ serializer
763
+ };
764
+ const deleteOperationSpec: coreClient.OperationSpec = {
765
+ path:
766
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/virtualMachines/{virtualMachineName}",
767
+ httpMethod: "DELETE",
472
768
  responses: {
769
+ 200: {
770
+ headersMapper: Mappers.VirtualMachinesDeleteHeaders
771
+ },
772
+ 201: {
773
+ headersMapper: Mappers.VirtualMachinesDeleteHeaders
774
+ },
473
775
  202: {
474
776
  headersMapper: Mappers.VirtualMachinesDeleteHeaders
475
777
  },
@@ -477,155 +779,155 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
477
779
  headersMapper: Mappers.VirtualMachinesDeleteHeaders
478
780
  },
479
781
  default: {
480
- bodyMapper: Mappers.CSRPError
782
+ bodyMapper: Mappers.CsrpError,
783
+ headersMapper: Mappers.VirtualMachinesDeleteExceptionHeaders
481
784
  }
482
785
  },
483
- serializer
484
- };
485
-
486
- const beginUpdateOperationSpec: msRest.OperationSpec = {
487
- httpMethod: "PATCH",
488
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/virtualMachines/{virtualMachineName}",
786
+ queryParameters: [Parameters.apiVersion],
489
787
  urlParameters: [
788
+ Parameters.$host,
490
789
  Parameters.subscriptionId,
491
790
  Parameters.resourceGroupName,
492
- Parameters.virtualMachineName0
493
- ],
494
- queryParameters: [
495
- Parameters.apiVersion
496
- ],
497
- headerParameters: [
498
- Parameters.acceptLanguage
791
+ Parameters.virtualMachineName
499
792
  ],
500
- requestBody: {
501
- parameterPath: {
502
- tags: [
503
- "options",
504
- "tags"
505
- ]
506
- },
507
- mapper: {
508
- ...Mappers.PatchPayload,
509
- required: true
510
- }
511
- },
793
+ headerParameters: [Parameters.accept, Parameters.referer],
794
+ serializer
795
+ };
796
+ const updateOperationSpec: coreClient.OperationSpec = {
797
+ path:
798
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/virtualMachines/{virtualMachineName}",
799
+ httpMethod: "PATCH",
512
800
  responses: {
513
801
  200: {
514
802
  bodyMapper: Mappers.VirtualMachine
515
803
  },
804
+ 201: {
805
+ bodyMapper: Mappers.VirtualMachine
806
+ },
807
+ 202: {
808
+ bodyMapper: Mappers.VirtualMachine
809
+ },
810
+ 204: {
811
+ bodyMapper: Mappers.VirtualMachine
812
+ },
516
813
  default: {
517
- bodyMapper: Mappers.CSRPError
814
+ bodyMapper: Mappers.CsrpError
518
815
  }
519
816
  },
520
- serializer
521
- };
522
-
523
- const beginStartOperationSpec: msRest.OperationSpec = {
524
- httpMethod: "POST",
525
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/virtualMachines/{virtualMachineName}/start",
817
+ requestBody: Parameters.virtualMachineRequest1,
818
+ queryParameters: [Parameters.apiVersion],
526
819
  urlParameters: [
820
+ Parameters.$host,
527
821
  Parameters.subscriptionId,
528
822
  Parameters.resourceGroupName,
529
- Parameters.virtualMachineName0
530
- ],
531
- queryParameters: [
532
- Parameters.apiVersion
533
- ],
534
- headerParameters: [
535
- Parameters.referer,
536
- Parameters.acceptLanguage
823
+ Parameters.virtualMachineName
537
824
  ],
825
+ headerParameters: [Parameters.accept, Parameters.contentType],
826
+ mediaType: "json",
827
+ serializer
828
+ };
829
+ const startOperationSpec: coreClient.OperationSpec = {
830
+ path:
831
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/virtualMachines/{virtualMachineName}/start",
832
+ httpMethod: "POST",
538
833
  responses: {
539
- 200: {
540
- headersMapper: Mappers.VirtualMachinesStartHeaders
541
- },
542
- 202: {
543
- headersMapper: Mappers.VirtualMachinesStartHeaders
544
- },
834
+ 200: {},
835
+ 201: {},
836
+ 202: {},
837
+ 204: {},
545
838
  default: {
546
- bodyMapper: Mappers.CSRPError
839
+ bodyMapper: Mappers.CsrpError,
840
+ headersMapper: Mappers.VirtualMachinesStartExceptionHeaders
547
841
  }
548
842
  },
843
+ queryParameters: [Parameters.apiVersion],
844
+ urlParameters: [
845
+ Parameters.$host,
846
+ Parameters.subscriptionId,
847
+ Parameters.resourceGroupName,
848
+ Parameters.virtualMachineName
849
+ ],
850
+ headerParameters: [Parameters.accept, Parameters.referer],
549
851
  serializer
550
852
  };
551
-
552
- const beginStopOperationSpec: msRest.OperationSpec = {
853
+ const stopOperationSpec: coreClient.OperationSpec = {
854
+ path:
855
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/virtualMachines/{virtualMachineName}/stop",
553
856
  httpMethod: "POST",
554
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/virtualMachines/{virtualMachineName}/stop",
857
+ responses: {
858
+ 200: {},
859
+ 201: {},
860
+ 202: {},
861
+ 204: {},
862
+ default: {
863
+ bodyMapper: Mappers.CsrpError,
864
+ headersMapper: Mappers.VirtualMachinesStopExceptionHeaders
865
+ }
866
+ },
867
+ requestBody: Parameters.m,
868
+ queryParameters: [Parameters.apiVersion, Parameters.mode],
555
869
  urlParameters: [
870
+ Parameters.$host,
556
871
  Parameters.subscriptionId,
557
872
  Parameters.resourceGroupName,
558
- Parameters.virtualMachineName0
559
- ],
560
- queryParameters: [
561
- Parameters.mode,
562
- Parameters.apiVersion
873
+ Parameters.virtualMachineName
563
874
  ],
564
875
  headerParameters: [
876
+ Parameters.accept,
565
877
  Parameters.referer,
566
- Parameters.acceptLanguage
878
+ Parameters.contentType
567
879
  ],
568
- requestBody: {
569
- parameterPath: {
570
- mode: [
571
- "options",
572
- "mode1"
573
- ]
574
- },
575
- mapper: Mappers.VirtualMachineStopMode
576
- },
577
- responses: {
578
- 200: {
579
- headersMapper: Mappers.VirtualMachinesStopHeaders
580
- },
581
- 202: {
582
- headersMapper: Mappers.VirtualMachinesStopHeaders
583
- },
584
- default: {
585
- bodyMapper: Mappers.CSRPError
586
- }
587
- },
880
+ mediaType: "json",
588
881
  serializer
589
882
  };
590
-
591
- const listBySubscriptionNextOperationSpec: msRest.OperationSpec = {
592
- httpMethod: "GET",
593
- baseUrl: "https://management.azure.com",
883
+ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
594
884
  path: "{nextLink}",
595
- urlParameters: [
596
- Parameters.nextPageLink
597
- ],
598
- headerParameters: [
599
- Parameters.acceptLanguage
600
- ],
885
+ httpMethod: "GET",
601
886
  responses: {
602
887
  200: {
603
888
  bodyMapper: Mappers.VirtualMachineListResponse
604
889
  },
605
890
  default: {
606
- bodyMapper: Mappers.CSRPError
891
+ bodyMapper: Mappers.CsrpError
607
892
  }
608
893
  },
894
+ queryParameters: [
895
+ Parameters.apiVersion,
896
+ Parameters.filter,
897
+ Parameters.top,
898
+ Parameters.skipToken
899
+ ],
900
+ urlParameters: [
901
+ Parameters.$host,
902
+ Parameters.subscriptionId,
903
+ Parameters.nextLink
904
+ ],
905
+ headerParameters: [Parameters.accept],
609
906
  serializer
610
907
  };
611
-
612
- const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
613
- httpMethod: "GET",
614
- baseUrl: "https://management.azure.com",
908
+ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
615
909
  path: "{nextLink}",
616
- urlParameters: [
617
- Parameters.nextPageLink
618
- ],
619
- headerParameters: [
620
- Parameters.acceptLanguage
621
- ],
910
+ httpMethod: "GET",
622
911
  responses: {
623
912
  200: {
624
913
  bodyMapper: Mappers.VirtualMachineListResponse
625
914
  },
626
915
  default: {
627
- bodyMapper: Mappers.CSRPError
916
+ bodyMapper: Mappers.CsrpError
628
917
  }
629
918
  },
919
+ queryParameters: [
920
+ Parameters.apiVersion,
921
+ Parameters.filter,
922
+ Parameters.top,
923
+ Parameters.skipToken
924
+ ],
925
+ urlParameters: [
926
+ Parameters.$host,
927
+ Parameters.subscriptionId,
928
+ Parameters.nextLink,
929
+ Parameters.resourceGroupName
930
+ ],
931
+ headerParameters: [Parameters.accept],
630
932
  serializer
631
933
  };