@azure/arm-labservices 1.0.0 → 3.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (446) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/LICENSE.txt +21 -21
  4. package/README.md +98 -96
  5. package/dist/index.js +6456 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/index.min.js +1 -0
  8. package/dist/index.min.js.map +1 -0
  9. package/dist-esm/samples-dev/deleteLab.d.ts +2 -0
  10. package/dist-esm/samples-dev/deleteLab.d.ts.map +1 -0
  11. package/dist-esm/samples-dev/deleteLab.js +31 -0
  12. package/dist-esm/samples-dev/deleteLab.js.map +1 -0
  13. package/dist-esm/samples-dev/deleteLabPlan.d.ts +2 -0
  14. package/dist-esm/samples-dev/deleteLabPlan.d.ts.map +1 -0
  15. package/dist-esm/samples-dev/deleteLabPlan.js +31 -0
  16. package/dist-esm/samples-dev/deleteLabPlan.js.map +1 -0
  17. package/dist-esm/samples-dev/deleteSchedule.d.ts +2 -0
  18. package/dist-esm/samples-dev/deleteSchedule.d.ts.map +1 -0
  19. package/dist-esm/samples-dev/deleteSchedule.js +32 -0
  20. package/dist-esm/samples-dev/deleteSchedule.js.map +1 -0
  21. package/dist-esm/samples-dev/deleteUser.d.ts +2 -0
  22. package/dist-esm/samples-dev/deleteUser.d.ts.map +1 -0
  23. package/dist-esm/samples-dev/deleteUser.js +32 -0
  24. package/dist-esm/samples-dev/deleteUser.js.map +1 -0
  25. package/dist-esm/samples-dev/getImage.d.ts +2 -0
  26. package/dist-esm/samples-dev/getImage.d.ts.map +1 -0
  27. package/dist-esm/samples-dev/getImage.js +32 -0
  28. package/dist-esm/samples-dev/getImage.js.map +1 -0
  29. package/dist-esm/samples-dev/getLab.d.ts +2 -0
  30. package/dist-esm/samples-dev/getLab.d.ts.map +1 -0
  31. package/dist-esm/samples-dev/getLab.js +31 -0
  32. package/dist-esm/samples-dev/getLab.js.map +1 -0
  33. package/dist-esm/samples-dev/getLabPlan.d.ts +2 -0
  34. package/dist-esm/samples-dev/getLabPlan.d.ts.map +1 -0
  35. package/dist-esm/samples-dev/getLabPlan.js +31 -0
  36. package/dist-esm/samples-dev/getLabPlan.js.map +1 -0
  37. package/dist-esm/samples-dev/getListSchedule.d.ts +2 -0
  38. package/dist-esm/samples-dev/getListSchedule.d.ts.map +1 -0
  39. package/dist-esm/samples-dev/getListSchedule.js +45 -0
  40. package/dist-esm/samples-dev/getListSchedule.js.map +1 -0
  41. package/dist-esm/samples-dev/getOperationResult.d.ts +2 -0
  42. package/dist-esm/samples-dev/getOperationResult.d.ts.map +1 -0
  43. package/dist-esm/samples-dev/getOperationResult.js +30 -0
  44. package/dist-esm/samples-dev/getOperationResult.js.map +1 -0
  45. package/dist-esm/samples-dev/getSchedule.d.ts +2 -0
  46. package/dist-esm/samples-dev/getSchedule.d.ts.map +1 -0
  47. package/dist-esm/samples-dev/getSchedule.js +32 -0
  48. package/dist-esm/samples-dev/getSchedule.js.map +1 -0
  49. package/dist-esm/samples-dev/getUser.d.ts +2 -0
  50. package/dist-esm/samples-dev/getUser.d.ts.map +1 -0
  51. package/dist-esm/samples-dev/getUser.js +32 -0
  52. package/dist-esm/samples-dev/getUser.js.map +1 -0
  53. package/dist-esm/samples-dev/getVirtualMachine.d.ts +2 -0
  54. package/dist-esm/samples-dev/getVirtualMachine.d.ts.map +1 -0
  55. package/dist-esm/samples-dev/getVirtualMachine.js +32 -0
  56. package/dist-esm/samples-dev/getVirtualMachine.js.map +1 -0
  57. package/dist-esm/samples-dev/inviteUser.d.ts +2 -0
  58. package/dist-esm/samples-dev/inviteUser.d.ts.map +1 -0
  59. package/dist-esm/samples-dev/inviteUser.js +33 -0
  60. package/dist-esm/samples-dev/inviteUser.js.map +1 -0
  61. package/dist-esm/samples-dev/listImages.d.ts +2 -0
  62. package/dist-esm/samples-dev/listImages.d.ts.map +1 -0
  63. package/dist-esm/samples-dev/listImages.js +45 -0
  64. package/dist-esm/samples-dev/listImages.js.map +1 -0
  65. package/dist-esm/samples-dev/listLabPlans.d.ts +2 -0
  66. package/dist-esm/samples-dev/listLabPlans.d.ts.map +1 -0
  67. package/dist-esm/samples-dev/listLabPlans.js +43 -0
  68. package/dist-esm/samples-dev/listLabPlans.js.map +1 -0
  69. package/dist-esm/samples-dev/listLabs.d.ts +2 -0
  70. package/dist-esm/samples-dev/listLabs.d.ts.map +1 -0
  71. package/dist-esm/samples-dev/listLabs.js +43 -0
  72. package/dist-esm/samples-dev/listLabs.js.map +1 -0
  73. package/dist-esm/samples-dev/listOperations.d.ts +2 -0
  74. package/dist-esm/samples-dev/listOperations.d.ts.map +1 -0
  75. package/dist-esm/samples-dev/listOperations.js +43 -0
  76. package/dist-esm/samples-dev/listOperations.js.map +1 -0
  77. package/dist-esm/samples-dev/listResourceGroupLabPlans.d.ts +2 -0
  78. package/dist-esm/samples-dev/listResourceGroupLabPlans.d.ts.map +1 -0
  79. package/dist-esm/samples-dev/listResourceGroupLabPlans.js +44 -0
  80. package/dist-esm/samples-dev/listResourceGroupLabPlans.js.map +1 -0
  81. package/dist-esm/samples-dev/listResourceGroupLabs.d.ts +2 -0
  82. package/dist-esm/samples-dev/listResourceGroupLabs.d.ts.map +1 -0
  83. package/dist-esm/samples-dev/listResourceGroupLabs.js +44 -0
  84. package/dist-esm/samples-dev/listResourceGroupLabs.js.map +1 -0
  85. package/dist-esm/samples-dev/listSkus.d.ts +2 -0
  86. package/dist-esm/samples-dev/listSkus.d.ts.map +1 -0
  87. package/dist-esm/samples-dev/listSkus.js +43 -0
  88. package/dist-esm/samples-dev/listSkus.js.map +1 -0
  89. package/dist-esm/samples-dev/listUsages.d.ts +2 -0
  90. package/dist-esm/samples-dev/listUsages.d.ts.map +1 -0
  91. package/dist-esm/samples-dev/listUsages.js +44 -0
  92. package/dist-esm/samples-dev/listUsages.js.map +1 -0
  93. package/dist-esm/samples-dev/listUser.d.ts +2 -0
  94. package/dist-esm/samples-dev/listUser.d.ts.map +1 -0
  95. package/dist-esm/samples-dev/listUser.js +45 -0
  96. package/dist-esm/samples-dev/listUser.js.map +1 -0
  97. package/dist-esm/samples-dev/listVirtualMachine.d.ts +2 -0
  98. package/dist-esm/samples-dev/listVirtualMachine.d.ts.map +1 -0
  99. package/dist-esm/samples-dev/listVirtualMachine.js +45 -0
  100. package/dist-esm/samples-dev/listVirtualMachine.js.map +1 -0
  101. package/dist-esm/samples-dev/patchImage.d.ts +2 -0
  102. package/dist-esm/samples-dev/patchImage.d.ts.map +1 -0
  103. package/dist-esm/samples-dev/patchImage.js +33 -0
  104. package/dist-esm/samples-dev/patchImage.js.map +1 -0
  105. package/dist-esm/samples-dev/patchLab.d.ts +2 -0
  106. package/dist-esm/samples-dev/patchLab.d.ts.map +1 -0
  107. package/dist-esm/samples-dev/patchLab.js +32 -0
  108. package/dist-esm/samples-dev/patchLab.js.map +1 -0
  109. package/dist-esm/samples-dev/patchLabPlan.d.ts +2 -0
  110. package/dist-esm/samples-dev/patchLabPlan.d.ts.map +1 -0
  111. package/dist-esm/samples-dev/patchLabPlan.js +39 -0
  112. package/dist-esm/samples-dev/patchLabPlan.js.map +1 -0
  113. package/dist-esm/samples-dev/patchSchedule.d.ts +2 -0
  114. package/dist-esm/samples-dev/patchSchedule.d.ts.map +1 -0
  115. package/dist-esm/samples-dev/patchSchedule.js +39 -0
  116. package/dist-esm/samples-dev/patchSchedule.js.map +1 -0
  117. package/dist-esm/samples-dev/patchUser.d.ts +2 -0
  118. package/dist-esm/samples-dev/patchUser.d.ts.map +1 -0
  119. package/dist-esm/samples-dev/patchUser.js +33 -0
  120. package/dist-esm/samples-dev/patchUser.js.map +1 -0
  121. package/dist-esm/samples-dev/publishLab.d.ts +2 -0
  122. package/dist-esm/samples-dev/publishLab.d.ts.map +1 -0
  123. package/dist-esm/samples-dev/publishLab.js +31 -0
  124. package/dist-esm/samples-dev/publishLab.js.map +1 -0
  125. package/dist-esm/samples-dev/putImage.d.ts +2 -0
  126. package/dist-esm/samples-dev/putImage.d.ts.map +1 -0
  127. package/dist-esm/samples-dev/putImage.js +33 -0
  128. package/dist-esm/samples-dev/putImage.js.map +1 -0
  129. package/dist-esm/samples-dev/putLab.d.ts +2 -0
  130. package/dist-esm/samples-dev/putLab.d.ts.map +1 -0
  131. package/dist-esm/samples-dev/putLab.js +70 -0
  132. package/dist-esm/samples-dev/putLab.js.map +1 -0
  133. package/dist-esm/samples-dev/putLabPlan.d.ts +2 -0
  134. package/dist-esm/samples-dev/putLabPlan.d.ts.map +1 -0
  135. package/dist-esm/samples-dev/putLabPlan.js +58 -0
  136. package/dist-esm/samples-dev/putLabPlan.js.map +1 -0
  137. package/dist-esm/samples-dev/putSchedule.d.ts +2 -0
  138. package/dist-esm/samples-dev/putSchedule.d.ts.map +1 -0
  139. package/dist-esm/samples-dev/putSchedule.js +43 -0
  140. package/dist-esm/samples-dev/putSchedule.js.map +1 -0
  141. package/dist-esm/samples-dev/putUser.d.ts +2 -0
  142. package/dist-esm/samples-dev/putUser.d.ts.map +1 -0
  143. package/dist-esm/samples-dev/putUser.js +36 -0
  144. package/dist-esm/samples-dev/putUser.js.map +1 -0
  145. package/dist-esm/samples-dev/redeployVirtualMachine.d.ts +2 -0
  146. package/dist-esm/samples-dev/redeployVirtualMachine.d.ts.map +1 -0
  147. package/dist-esm/samples-dev/redeployVirtualMachine.js +32 -0
  148. package/dist-esm/samples-dev/redeployVirtualMachine.js.map +1 -0
  149. package/dist-esm/samples-dev/reimageVirtualMachine.d.ts +2 -0
  150. package/dist-esm/samples-dev/reimageVirtualMachine.d.ts.map +1 -0
  151. package/dist-esm/samples-dev/reimageVirtualMachine.js +32 -0
  152. package/dist-esm/samples-dev/reimageVirtualMachine.js.map +1 -0
  153. package/dist-esm/samples-dev/resetPasswordVirtualMachine.d.ts +2 -0
  154. package/dist-esm/samples-dev/resetPasswordVirtualMachine.d.ts.map +1 -0
  155. package/dist-esm/samples-dev/resetPasswordVirtualMachine.js +36 -0
  156. package/dist-esm/samples-dev/resetPasswordVirtualMachine.js.map +1 -0
  157. package/dist-esm/samples-dev/saveImageVirtualMachine.d.ts +2 -0
  158. package/dist-esm/samples-dev/saveImageVirtualMachine.d.ts.map +1 -0
  159. package/dist-esm/samples-dev/saveImageVirtualMachine.js +35 -0
  160. package/dist-esm/samples-dev/saveImageVirtualMachine.js.map +1 -0
  161. package/dist-esm/samples-dev/startVirtualMachine.d.ts +2 -0
  162. package/dist-esm/samples-dev/startVirtualMachine.d.ts.map +1 -0
  163. package/dist-esm/samples-dev/startVirtualMachine.js +32 -0
  164. package/dist-esm/samples-dev/startVirtualMachine.js.map +1 -0
  165. package/dist-esm/samples-dev/stopVirtualMachine.d.ts +2 -0
  166. package/dist-esm/samples-dev/stopVirtualMachine.d.ts.map +1 -0
  167. package/dist-esm/samples-dev/stopVirtualMachine.js +32 -0
  168. package/dist-esm/samples-dev/stopVirtualMachine.js.map +1 -0
  169. package/dist-esm/samples-dev/syncLab.d.ts +2 -0
  170. package/dist-esm/samples-dev/syncLab.d.ts.map +1 -0
  171. package/dist-esm/samples-dev/syncLab.js +31 -0
  172. package/dist-esm/samples-dev/syncLab.js.map +1 -0
  173. package/dist-esm/src/index.d.ts +5 -0
  174. package/dist-esm/src/index.d.ts.map +1 -0
  175. package/dist-esm/src/index.js +12 -0
  176. package/dist-esm/src/index.js.map +1 -0
  177. package/dist-esm/src/labServicesClient.d.ts +27 -0
  178. package/dist-esm/src/labServicesClient.d.ts.map +1 -0
  179. package/dist-esm/src/labServicesClient.js +60 -0
  180. package/dist-esm/src/labServicesClient.js.map +1 -0
  181. package/dist-esm/src/lroImpl.d.ts +16 -0
  182. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  183. package/dist-esm/src/lroImpl.js +29 -0
  184. package/dist-esm/src/lroImpl.js.map +1 -0
  185. package/dist-esm/src/models/index.d.ts +1638 -0
  186. package/dist-esm/src/models/index.d.ts.map +1 -0
  187. package/dist-esm/src/models/index.js +60 -0
  188. package/dist-esm/src/models/index.js.map +1 -0
  189. package/dist-esm/src/models/mappers.d.ts +67 -0
  190. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  191. package/dist-esm/src/models/mappers.js +2675 -0
  192. package/dist-esm/src/models/mappers.js.map +1 -0
  193. package/dist-esm/src/models/parameters.d.ts +31 -0
  194. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  195. package/dist-esm/src/models/parameters.js +270 -0
  196. package/dist-esm/src/models/parameters.js.map +1 -0
  197. package/dist-esm/src/operations/images.d.ts +70 -0
  198. package/dist-esm/src/operations/images.d.ts.map +1 -0
  199. package/dist-esm/src/operations/images.js +245 -0
  200. package/dist-esm/src/operations/images.js.map +1 -0
  201. package/dist-esm/src/operations/index.d.ts +11 -0
  202. package/dist-esm/src/operations/index.d.ts.map +1 -0
  203. package/dist-esm/src/operations/index.js +18 -0
  204. package/dist-esm/src/operations/index.js.map +1 -0
  205. package/dist-esm/src/operations/labPlans.d.ts +134 -0
  206. package/dist-esm/src/operations/labPlans.d.ts.map +1 -0
  207. package/dist-esm/src/operations/labPlans.js +590 -0
  208. package/dist-esm/src/operations/labPlans.js.map +1 -0
  209. package/dist-esm/src/operations/labs.d.ts +146 -0
  210. package/dist-esm/src/operations/labs.d.ts.map +1 -0
  211. package/dist-esm/src/operations/labs.js +658 -0
  212. package/dist-esm/src/operations/labs.js.map +1 -0
  213. package/dist-esm/src/operations/operationResults.d.ts +19 -0
  214. package/dist-esm/src/operations/operationResults.d.ts.map +1 -0
  215. package/dist-esm/src/operations/operationResults.js +52 -0
  216. package/dist-esm/src/operations/operationResults.js.map +1 -0
  217. package/dist-esm/src/operations/operations.d.ts +32 -0
  218. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  219. package/dist-esm/src/operations/operations.js +120 -0
  220. package/dist-esm/src/operations/operations.js.map +1 -0
  221. package/dist-esm/src/operations/schedules.d.ts +94 -0
  222. package/dist-esm/src/operations/schedules.d.ts.map +1 -0
  223. package/dist-esm/src/operations/schedules.js +332 -0
  224. package/dist-esm/src/operations/schedules.js.map +1 -0
  225. package/dist-esm/src/operations/skus.d.ts +32 -0
  226. package/dist-esm/src/operations/skus.d.ts.map +1 -0
  227. package/dist-esm/src/operations/skus.js +124 -0
  228. package/dist-esm/src/operations/skus.js.map +1 -0
  229. package/dist-esm/src/operations/usages.d.ts +35 -0
  230. package/dist-esm/src/operations/usages.d.ts.map +1 -0
  231. package/dist-esm/src/operations/usages.js +132 -0
  232. package/dist-esm/src/operations/usages.js.map +1 -0
  233. package/dist-esm/src/operations/users.d.ts +138 -0
  234. package/dist-esm/src/operations/users.d.ts.map +1 -0
  235. package/dist-esm/src/operations/users.js +520 -0
  236. package/dist-esm/src/operations/users.js.map +1 -0
  237. package/dist-esm/src/operations/virtualMachines.d.ts +158 -0
  238. package/dist-esm/src/operations/virtualMachines.d.ts.map +1 -0
  239. package/dist-esm/src/operations/virtualMachines.js +579 -0
  240. package/dist-esm/src/operations/virtualMachines.js.map +1 -0
  241. package/dist-esm/src/operationsInterfaces/images.d.ts +43 -0
  242. package/dist-esm/src/operationsInterfaces/images.d.ts.map +1 -0
  243. package/dist-esm/src/operationsInterfaces/images.js +9 -0
  244. package/dist-esm/src/operationsInterfaces/images.js.map +1 -0
  245. package/dist-esm/src/operationsInterfaces/index.d.ts +11 -0
  246. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  247. package/dist-esm/src/operationsInterfaces/index.js +18 -0
  248. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  249. package/dist-esm/src/operationsInterfaces/labPlans.d.ts +98 -0
  250. package/dist-esm/src/operationsInterfaces/labPlans.d.ts.map +1 -0
  251. package/dist-esm/src/operationsInterfaces/labPlans.js +9 -0
  252. package/dist-esm/src/operationsInterfaces/labPlans.js.map +1 -0
  253. package/dist-esm/src/operationsInterfaces/labs.d.ts +110 -0
  254. package/dist-esm/src/operationsInterfaces/labs.d.ts.map +1 -0
  255. package/dist-esm/src/operationsInterfaces/labs.js +9 -0
  256. package/dist-esm/src/operationsInterfaces/labs.js.map +1 -0
  257. package/dist-esm/src/operationsInterfaces/operationResults.d.ts +11 -0
  258. package/dist-esm/src/operationsInterfaces/operationResults.d.ts.map +1 -0
  259. package/dist-esm/src/operationsInterfaces/operationResults.js +9 -0
  260. package/dist-esm/src/operationsInterfaces/operationResults.js.map +1 -0
  261. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  262. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  263. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  264. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  265. package/dist-esm/src/operationsInterfaces/schedules.d.ts +67 -0
  266. package/dist-esm/src/operationsInterfaces/schedules.d.ts.map +1 -0
  267. package/dist-esm/src/operationsInterfaces/schedules.js +9 -0
  268. package/dist-esm/src/operationsInterfaces/schedules.js.map +1 -0
  269. package/dist-esm/src/operationsInterfaces/skus.d.ts +11 -0
  270. package/dist-esm/src/operationsInterfaces/skus.d.ts.map +1 -0
  271. package/dist-esm/src/operationsInterfaces/skus.js +9 -0
  272. package/dist-esm/src/operationsInterfaces/skus.js.map +1 -0
  273. package/dist-esm/src/operationsInterfaces/usages.d.ts +12 -0
  274. package/dist-esm/src/operationsInterfaces/usages.d.ts.map +1 -0
  275. package/dist-esm/src/operationsInterfaces/usages.js +9 -0
  276. package/dist-esm/src/operationsInterfaces/usages.js.map +1 -0
  277. package/dist-esm/src/operationsInterfaces/users.d.ts +111 -0
  278. package/dist-esm/src/operationsInterfaces/users.d.ts.map +1 -0
  279. package/dist-esm/src/operationsInterfaces/users.js +9 -0
  280. package/dist-esm/src/operationsInterfaces/users.js.map +1 -0
  281. package/dist-esm/src/operationsInterfaces/virtualMachines.d.ts +131 -0
  282. package/dist-esm/src/operationsInterfaces/virtualMachines.d.ts.map +1 -0
  283. package/dist-esm/src/operationsInterfaces/virtualMachines.js +9 -0
  284. package/dist-esm/src/operationsInterfaces/virtualMachines.js.map +1 -0
  285. package/dist-esm/test/sampleTest.d.ts +2 -0
  286. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  287. package/dist-esm/test/sampleTest.js +40 -0
  288. package/dist-esm/test/sampleTest.js.map +1 -0
  289. package/package.json +79 -34
  290. package/review/arm-labservices.api.md +1208 -0
  291. package/rollup.config.js +181 -30
  292. package/src/index.ts +12 -0
  293. package/src/labServicesClient.ts +115 -0
  294. package/src/lroImpl.ts +34 -0
  295. package/src/models/index.ts +1872 -0
  296. package/src/models/mappers.ts +2875 -0
  297. package/src/models/parameters.ts +318 -0
  298. package/src/operations/images.ts +336 -0
  299. package/src/operations/index.ts +18 -0
  300. package/src/operations/labPlans.ts +801 -0
  301. package/src/operations/labs.ts +886 -0
  302. package/src/operations/operationResults.ts +70 -0
  303. package/src/operations/operations.ts +137 -0
  304. package/src/operations/schedules.ts +447 -0
  305. package/src/operations/skus.ts +139 -0
  306. package/src/operations/usages.ts +162 -0
  307. package/src/operations/users.ts +736 -0
  308. package/src/operations/virtualMachines.ts +815 -0
  309. package/src/operationsInterfaces/images.ts +83 -0
  310. package/src/operationsInterfaces/index.ts +18 -0
  311. package/src/operationsInterfaces/labPlans.ts +178 -0
  312. package/src/operationsInterfaces/labs.ts +193 -0
  313. package/src/operationsInterfaces/operationResults.ts +25 -0
  314. package/src/operationsInterfaces/operations.ts +22 -0
  315. package/src/operationsInterfaces/schedules.ts +118 -0
  316. package/src/operationsInterfaces/skus.ts +22 -0
  317. package/src/operationsInterfaces/usages.ts +24 -0
  318. package/src/operationsInterfaces/users.ts +195 -0
  319. package/src/operationsInterfaces/virtualMachines.ts +212 -0
  320. package/tsconfig.json +6 -5
  321. package/types/arm-labservices.d.ts +2438 -0
  322. package/types/tsdoc-metadata.json +11 -0
  323. package/dist/arm-labservices.js +0 -5579
  324. package/dist/arm-labservices.js.map +0 -1
  325. package/dist/arm-labservices.min.js +0 -1
  326. package/dist/arm-labservices.min.js.map +0 -1
  327. package/esm/managedLabsClient.d.ts +0 -26
  328. package/esm/managedLabsClient.d.ts.map +0 -1
  329. package/esm/managedLabsClient.js +0 -41
  330. package/esm/managedLabsClient.js.map +0 -1
  331. package/esm/managedLabsClientContext.d.ts +0 -16
  332. package/esm/managedLabsClientContext.d.ts.map +0 -1
  333. package/esm/managedLabsClientContext.js +0 -56
  334. package/esm/managedLabsClientContext.js.map +0 -1
  335. package/esm/models/environmentSettingsMappers.d.ts +0 -2
  336. package/esm/models/environmentSettingsMappers.d.ts.map +0 -1
  337. package/esm/models/environmentSettingsMappers.js +0 -9
  338. package/esm/models/environmentSettingsMappers.js.map +0 -1
  339. package/esm/models/environmentsMappers.d.ts +0 -2
  340. package/esm/models/environmentsMappers.d.ts.map +0 -1
  341. package/esm/models/environmentsMappers.js +0 -9
  342. package/esm/models/environmentsMappers.js.map +0 -1
  343. package/esm/models/galleryImagesMappers.d.ts +0 -2
  344. package/esm/models/galleryImagesMappers.d.ts.map +0 -1
  345. package/esm/models/galleryImagesMappers.js +0 -9
  346. package/esm/models/galleryImagesMappers.js.map +0 -1
  347. package/esm/models/globalUsersMappers.d.ts +0 -2
  348. package/esm/models/globalUsersMappers.d.ts.map +0 -1
  349. package/esm/models/globalUsersMappers.js +0 -9
  350. package/esm/models/globalUsersMappers.js.map +0 -1
  351. package/esm/models/index.d.ts +0 -2379
  352. package/esm/models/index.d.ts.map +0 -1
  353. package/esm/models/index.js +0 -8
  354. package/esm/models/index.js.map +0 -1
  355. package/esm/models/labAccountsMappers.d.ts +0 -2
  356. package/esm/models/labAccountsMappers.d.ts.map +0 -1
  357. package/esm/models/labAccountsMappers.js +0 -9
  358. package/esm/models/labAccountsMappers.js.map +0 -1
  359. package/esm/models/labsMappers.d.ts +0 -2
  360. package/esm/models/labsMappers.d.ts.map +0 -1
  361. package/esm/models/labsMappers.js +0 -9
  362. package/esm/models/labsMappers.js.map +0 -1
  363. package/esm/models/mappers.d.ts +0 -72
  364. package/esm/models/mappers.d.ts.map +0 -1
  365. package/esm/models/mappers.js +0 -2158
  366. package/esm/models/mappers.js.map +0 -1
  367. package/esm/models/operationsMappers.d.ts +0 -2
  368. package/esm/models/operationsMappers.d.ts.map +0 -1
  369. package/esm/models/operationsMappers.js +0 -9
  370. package/esm/models/operationsMappers.js.map +0 -1
  371. package/esm/models/parameters.d.ts +0 -19
  372. package/esm/models/parameters.d.ts.map +0 -1
  373. package/esm/models/parameters.js +0 -190
  374. package/esm/models/parameters.js.map +0 -1
  375. package/esm/models/providerOperationsMappers.d.ts +0 -2
  376. package/esm/models/providerOperationsMappers.d.ts.map +0 -1
  377. package/esm/models/providerOperationsMappers.js +0 -9
  378. package/esm/models/providerOperationsMappers.js.map +0 -1
  379. package/esm/models/usersMappers.d.ts +0 -2
  380. package/esm/models/usersMappers.d.ts.map +0 -1
  381. package/esm/models/usersMappers.js +0 -9
  382. package/esm/models/usersMappers.js.map +0 -1
  383. package/esm/operations/environmentSettings.d.ts +0 -262
  384. package/esm/operations/environmentSettings.d.ts.map +0 -1
  385. package/esm/operations/environmentSettings.js +0 -479
  386. package/esm/operations/environmentSettings.js.map +0 -1
  387. package/esm/operations/environments.d.ts +0 -279
  388. package/esm/operations/environments.d.ts.map +0 -1
  389. package/esm/operations/environments.js +0 -504
  390. package/esm/operations/environments.js.map +0 -1
  391. package/esm/operations/galleryImages.d.ts +0 -154
  392. package/esm/operations/galleryImages.d.ts.map +0 -1
  393. package/esm/operations/galleryImages.js +0 -234
  394. package/esm/operations/galleryImages.js.map +0 -1
  395. package/esm/operations/globalUsers.d.ts +0 -220
  396. package/esm/operations/globalUsers.d.ts.map +0 -1
  397. package/esm/operations/globalUsers.js +0 -411
  398. package/esm/operations/globalUsers.js.map +0 -1
  399. package/esm/operations/index.d.ts +0 -10
  400. package/esm/operations/index.d.ts.map +0 -1
  401. package/esm/operations/index.js +0 -19
  402. package/esm/operations/index.js.map +0 -1
  403. package/esm/operations/labAccounts.d.ts +0 -216
  404. package/esm/operations/labAccounts.d.ts.map +0 -1
  405. package/esm/operations/labAccounts.js +0 -364
  406. package/esm/operations/labAccounts.js.map +0 -1
  407. package/esm/operations/labs.d.ts +0 -200
  408. package/esm/operations/labs.d.ts.map +0 -1
  409. package/esm/operations/labs.js +0 -321
  410. package/esm/operations/labs.js.map +0 -1
  411. package/esm/operations/operations.d.ts +0 -34
  412. package/esm/operations/operations.d.ts.map +0 -1
  413. package/esm/operations/operations.js +0 -58
  414. package/esm/operations/operations.js.map +0 -1
  415. package/esm/operations/providerOperations.d.ts +0 -46
  416. package/esm/operations/providerOperations.d.ts.map +0 -1
  417. package/esm/operations/providerOperations.js +0 -77
  418. package/esm/operations/providerOperations.js.map +0 -1
  419. package/esm/operations/users.d.ts +0 -163
  420. package/esm/operations/users.d.ts.map +0 -1
  421. package/esm/operations/users.js +0 -266
  422. package/esm/operations/users.js.map +0 -1
  423. package/lib/managedLabsClient.ts +0 -58
  424. package/lib/managedLabsClientContext.ts +0 -62
  425. package/lib/models/environmentSettingsMappers.ts +0 -40
  426. package/lib/models/environmentsMappers.ts +0 -40
  427. package/lib/models/galleryImagesMappers.ts +0 -39
  428. package/lib/models/globalUsersMappers.ts +0 -29
  429. package/lib/models/index.ts +0 -2557
  430. package/lib/models/labAccountsMappers.ts +0 -47
  431. package/lib/models/labsMappers.ts +0 -40
  432. package/lib/models/mappers.ts +0 -2333
  433. package/lib/models/operationsMappers.ts +0 -13
  434. package/lib/models/parameters.ts +0 -192
  435. package/lib/models/providerOperationsMappers.ts +0 -14
  436. package/lib/models/usersMappers.ts +0 -39
  437. package/lib/operations/environmentSettings.ts +0 -705
  438. package/lib/operations/environments.ts +0 -741
  439. package/lib/operations/galleryImages.ts +0 -413
  440. package/lib/operations/globalUsers.ts +0 -644
  441. package/lib/operations/index.ts +0 -19
  442. package/lib/operations/labAccounts.ts +0 -613
  443. package/lib/operations/labs.ts +0 -542
  444. package/lib/operations/operations.ts +0 -87
  445. package/lib/operations/providerOperations.ts +0 -123
  446. package/lib/operations/users.ts +0 -435
@@ -0,0 +1,815 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { VirtualMachines } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
13
+ import * as Parameters from "../models/parameters";
14
+ import { LabServicesClient } from "../labServicesClient";
15
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
+ import { LroImpl } from "../lroImpl";
17
+ import {
18
+ VirtualMachine,
19
+ VirtualMachinesListByLabNextOptionalParams,
20
+ VirtualMachinesListByLabOptionalParams,
21
+ VirtualMachinesListByLabResponse,
22
+ VirtualMachinesGetOptionalParams,
23
+ VirtualMachinesGetResponse,
24
+ VirtualMachinesStartOptionalParams,
25
+ VirtualMachinesStopOptionalParams,
26
+ VirtualMachinesReimageOptionalParams,
27
+ VirtualMachinesRedeployOptionalParams,
28
+ ResetPasswordBody,
29
+ VirtualMachinesResetPasswordOptionalParams,
30
+ VirtualMachinesListByLabNextResponse
31
+ } from "../models";
32
+
33
+ /// <reference lib="esnext.asynciterable" />
34
+ /** Class containing VirtualMachines operations. */
35
+ export class VirtualMachinesImpl implements VirtualMachines {
36
+ private readonly client: LabServicesClient;
37
+
38
+ /**
39
+ * Initialize a new instance of the class VirtualMachines class.
40
+ * @param client Reference to the service client
41
+ */
42
+ constructor(client: LabServicesClient) {
43
+ this.client = client;
44
+ }
45
+
46
+ /**
47
+ * Returns a list of all virtual machines for a lab.
48
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
49
+ * @param labName The name of the lab that uniquely identifies it within containing lab account. Used
50
+ * in resource URIs.
51
+ * @param options The options parameters.
52
+ */
53
+ public listByLab(
54
+ resourceGroupName: string,
55
+ labName: string,
56
+ options?: VirtualMachinesListByLabOptionalParams
57
+ ): PagedAsyncIterableIterator<VirtualMachine> {
58
+ const iter = this.listByLabPagingAll(resourceGroupName, labName, options);
59
+ return {
60
+ next() {
61
+ return iter.next();
62
+ },
63
+ [Symbol.asyncIterator]() {
64
+ return this;
65
+ },
66
+ byPage: () => {
67
+ return this.listByLabPagingPage(resourceGroupName, labName, options);
68
+ }
69
+ };
70
+ }
71
+
72
+ private async *listByLabPagingPage(
73
+ resourceGroupName: string,
74
+ labName: string,
75
+ options?: VirtualMachinesListByLabOptionalParams
76
+ ): AsyncIterableIterator<VirtualMachine[]> {
77
+ let result = await this._listByLab(resourceGroupName, labName, options);
78
+ yield result.value || [];
79
+ let continuationToken = result.nextLink;
80
+ while (continuationToken) {
81
+ result = await this._listByLabNext(
82
+ resourceGroupName,
83
+ labName,
84
+ continuationToken,
85
+ options
86
+ );
87
+ continuationToken = result.nextLink;
88
+ yield result.value || [];
89
+ }
90
+ }
91
+
92
+ private async *listByLabPagingAll(
93
+ resourceGroupName: string,
94
+ labName: string,
95
+ options?: VirtualMachinesListByLabOptionalParams
96
+ ): AsyncIterableIterator<VirtualMachine> {
97
+ for await (const page of this.listByLabPagingPage(
98
+ resourceGroupName,
99
+ labName,
100
+ options
101
+ )) {
102
+ yield* page;
103
+ }
104
+ }
105
+
106
+ /**
107
+ * Returns a list of all virtual machines for a lab.
108
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
109
+ * @param labName The name of the lab that uniquely identifies it within containing lab account. Used
110
+ * in resource URIs.
111
+ * @param options The options parameters.
112
+ */
113
+ private _listByLab(
114
+ resourceGroupName: string,
115
+ labName: string,
116
+ options?: VirtualMachinesListByLabOptionalParams
117
+ ): Promise<VirtualMachinesListByLabResponse> {
118
+ return this.client.sendOperationRequest(
119
+ { resourceGroupName, labName, options },
120
+ listByLabOperationSpec
121
+ );
122
+ }
123
+
124
+ /**
125
+ * Returns the properties for a lab virtual machine.
126
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
127
+ * @param labName The name of the lab that uniquely identifies it within containing lab account. Used
128
+ * in resource URIs.
129
+ * @param virtualMachineName The ID of the virtual machine that uniquely identifies it within the
130
+ * containing lab. Used in resource URIs.
131
+ * @param options The options parameters.
132
+ */
133
+ get(
134
+ resourceGroupName: string,
135
+ labName: string,
136
+ virtualMachineName: string,
137
+ options?: VirtualMachinesGetOptionalParams
138
+ ): Promise<VirtualMachinesGetResponse> {
139
+ return this.client.sendOperationRequest(
140
+ { resourceGroupName, labName, virtualMachineName, options },
141
+ getOperationSpec
142
+ );
143
+ }
144
+
145
+ /**
146
+ * Action to start a lab virtual machine.
147
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
148
+ * @param labName The name of the lab that uniquely identifies it within containing lab account. Used
149
+ * in resource URIs.
150
+ * @param virtualMachineName The ID of the virtual machine that uniquely identifies it within the
151
+ * containing lab. Used in resource URIs.
152
+ * @param options The options parameters.
153
+ */
154
+ async beginStart(
155
+ resourceGroupName: string,
156
+ labName: string,
157
+ virtualMachineName: string,
158
+ options?: VirtualMachinesStartOptionalParams
159
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
160
+ const directSendOperation = async (
161
+ args: coreClient.OperationArguments,
162
+ spec: coreClient.OperationSpec
163
+ ): Promise<void> => {
164
+ return this.client.sendOperationRequest(args, spec);
165
+ };
166
+ const sendOperation = async (
167
+ args: coreClient.OperationArguments,
168
+ spec: coreClient.OperationSpec
169
+ ) => {
170
+ let currentRawResponse:
171
+ | coreClient.FullOperationResponse
172
+ | undefined = undefined;
173
+ const providedCallback = args.options?.onResponse;
174
+ const callback: coreClient.RawResponseCallback = (
175
+ rawResponse: coreClient.FullOperationResponse,
176
+ flatResponse: unknown
177
+ ) => {
178
+ currentRawResponse = rawResponse;
179
+ providedCallback?.(rawResponse, flatResponse);
180
+ };
181
+ const updatedArgs = {
182
+ ...args,
183
+ options: {
184
+ ...args.options,
185
+ onResponse: callback
186
+ }
187
+ };
188
+ const flatResponse = await directSendOperation(updatedArgs, spec);
189
+ return {
190
+ flatResponse,
191
+ rawResponse: {
192
+ statusCode: currentRawResponse!.status,
193
+ body: currentRawResponse!.parsedBody,
194
+ headers: currentRawResponse!.headers.toJSON()
195
+ }
196
+ };
197
+ };
198
+
199
+ const lro = new LroImpl(
200
+ sendOperation,
201
+ { resourceGroupName, labName, virtualMachineName, options },
202
+ startOperationSpec
203
+ );
204
+ return new LroEngine(lro, {
205
+ resumeFrom: options?.resumeFrom,
206
+ intervalInMs: options?.updateIntervalInMs,
207
+ lroResourceLocationConfig: "location"
208
+ });
209
+ }
210
+
211
+ /**
212
+ * Action to start a lab virtual machine.
213
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
214
+ * @param labName The name of the lab that uniquely identifies it within containing lab account. Used
215
+ * in resource URIs.
216
+ * @param virtualMachineName The ID of the virtual machine that uniquely identifies it within the
217
+ * containing lab. Used in resource URIs.
218
+ * @param options The options parameters.
219
+ */
220
+ async beginStartAndWait(
221
+ resourceGroupName: string,
222
+ labName: string,
223
+ virtualMachineName: string,
224
+ options?: VirtualMachinesStartOptionalParams
225
+ ): Promise<void> {
226
+ const poller = await this.beginStart(
227
+ resourceGroupName,
228
+ labName,
229
+ virtualMachineName,
230
+ options
231
+ );
232
+ return poller.pollUntilDone();
233
+ }
234
+
235
+ /**
236
+ * Action to stop a lab virtual machine.
237
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
238
+ * @param labName The name of the lab that uniquely identifies it within containing lab account. Used
239
+ * in resource URIs.
240
+ * @param virtualMachineName The ID of the virtual machine that uniquely identifies it within the
241
+ * containing lab. Used in resource URIs.
242
+ * @param options The options parameters.
243
+ */
244
+ async beginStop(
245
+ resourceGroupName: string,
246
+ labName: string,
247
+ virtualMachineName: string,
248
+ options?: VirtualMachinesStopOptionalParams
249
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
250
+ const directSendOperation = async (
251
+ args: coreClient.OperationArguments,
252
+ spec: coreClient.OperationSpec
253
+ ): Promise<void> => {
254
+ return this.client.sendOperationRequest(args, spec);
255
+ };
256
+ const sendOperation = async (
257
+ args: coreClient.OperationArguments,
258
+ spec: coreClient.OperationSpec
259
+ ) => {
260
+ let currentRawResponse:
261
+ | coreClient.FullOperationResponse
262
+ | undefined = undefined;
263
+ const providedCallback = args.options?.onResponse;
264
+ const callback: coreClient.RawResponseCallback = (
265
+ rawResponse: coreClient.FullOperationResponse,
266
+ flatResponse: unknown
267
+ ) => {
268
+ currentRawResponse = rawResponse;
269
+ providedCallback?.(rawResponse, flatResponse);
270
+ };
271
+ const updatedArgs = {
272
+ ...args,
273
+ options: {
274
+ ...args.options,
275
+ onResponse: callback
276
+ }
277
+ };
278
+ const flatResponse = await directSendOperation(updatedArgs, spec);
279
+ return {
280
+ flatResponse,
281
+ rawResponse: {
282
+ statusCode: currentRawResponse!.status,
283
+ body: currentRawResponse!.parsedBody,
284
+ headers: currentRawResponse!.headers.toJSON()
285
+ }
286
+ };
287
+ };
288
+
289
+ const lro = new LroImpl(
290
+ sendOperation,
291
+ { resourceGroupName, labName, virtualMachineName, options },
292
+ stopOperationSpec
293
+ );
294
+ return new LroEngine(lro, {
295
+ resumeFrom: options?.resumeFrom,
296
+ intervalInMs: options?.updateIntervalInMs,
297
+ lroResourceLocationConfig: "location"
298
+ });
299
+ }
300
+
301
+ /**
302
+ * Action to stop a lab virtual machine.
303
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
304
+ * @param labName The name of the lab that uniquely identifies it within containing lab account. Used
305
+ * in resource URIs.
306
+ * @param virtualMachineName The ID of the virtual machine that uniquely identifies it within the
307
+ * containing lab. Used in resource URIs.
308
+ * @param options The options parameters.
309
+ */
310
+ async beginStopAndWait(
311
+ resourceGroupName: string,
312
+ labName: string,
313
+ virtualMachineName: string,
314
+ options?: VirtualMachinesStopOptionalParams
315
+ ): Promise<void> {
316
+ const poller = await this.beginStop(
317
+ resourceGroupName,
318
+ labName,
319
+ virtualMachineName,
320
+ options
321
+ );
322
+ return poller.pollUntilDone();
323
+ }
324
+
325
+ /**
326
+ * Re-image a lab virtual machine. The virtual machine will be deleted and recreated using the latest
327
+ * published snapshot of the reference environment of the lab.
328
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
329
+ * @param labName The name of the lab that uniquely identifies it within containing lab account. Used
330
+ * in resource URIs.
331
+ * @param virtualMachineName The ID of the virtual machine that uniquely identifies it within the
332
+ * containing lab. Used in resource URIs.
333
+ * @param options The options parameters.
334
+ */
335
+ async beginReimage(
336
+ resourceGroupName: string,
337
+ labName: string,
338
+ virtualMachineName: string,
339
+ options?: VirtualMachinesReimageOptionalParams
340
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
341
+ const directSendOperation = async (
342
+ args: coreClient.OperationArguments,
343
+ spec: coreClient.OperationSpec
344
+ ): Promise<void> => {
345
+ return this.client.sendOperationRequest(args, spec);
346
+ };
347
+ const sendOperation = async (
348
+ args: coreClient.OperationArguments,
349
+ spec: coreClient.OperationSpec
350
+ ) => {
351
+ let currentRawResponse:
352
+ | coreClient.FullOperationResponse
353
+ | undefined = undefined;
354
+ const providedCallback = args.options?.onResponse;
355
+ const callback: coreClient.RawResponseCallback = (
356
+ rawResponse: coreClient.FullOperationResponse,
357
+ flatResponse: unknown
358
+ ) => {
359
+ currentRawResponse = rawResponse;
360
+ providedCallback?.(rawResponse, flatResponse);
361
+ };
362
+ const updatedArgs = {
363
+ ...args,
364
+ options: {
365
+ ...args.options,
366
+ onResponse: callback
367
+ }
368
+ };
369
+ const flatResponse = await directSendOperation(updatedArgs, spec);
370
+ return {
371
+ flatResponse,
372
+ rawResponse: {
373
+ statusCode: currentRawResponse!.status,
374
+ body: currentRawResponse!.parsedBody,
375
+ headers: currentRawResponse!.headers.toJSON()
376
+ }
377
+ };
378
+ };
379
+
380
+ const lro = new LroImpl(
381
+ sendOperation,
382
+ { resourceGroupName, labName, virtualMachineName, options },
383
+ reimageOperationSpec
384
+ );
385
+ return new LroEngine(lro, {
386
+ resumeFrom: options?.resumeFrom,
387
+ intervalInMs: options?.updateIntervalInMs,
388
+ lroResourceLocationConfig: "location"
389
+ });
390
+ }
391
+
392
+ /**
393
+ * Re-image a lab virtual machine. The virtual machine will be deleted and recreated using the latest
394
+ * published snapshot of the reference environment of the lab.
395
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
396
+ * @param labName The name of the lab that uniquely identifies it within containing lab account. Used
397
+ * in resource URIs.
398
+ * @param virtualMachineName The ID of the virtual machine that uniquely identifies it within the
399
+ * containing lab. Used in resource URIs.
400
+ * @param options The options parameters.
401
+ */
402
+ async beginReimageAndWait(
403
+ resourceGroupName: string,
404
+ labName: string,
405
+ virtualMachineName: string,
406
+ options?: VirtualMachinesReimageOptionalParams
407
+ ): Promise<void> {
408
+ const poller = await this.beginReimage(
409
+ resourceGroupName,
410
+ labName,
411
+ virtualMachineName,
412
+ options
413
+ );
414
+ return poller.pollUntilDone();
415
+ }
416
+
417
+ /**
418
+ * Action to redeploy a lab virtual machine to a different compute node. For troubleshooting
419
+ * connectivity.
420
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
421
+ * @param labName The name of the lab that uniquely identifies it within containing lab account. Used
422
+ * in resource URIs.
423
+ * @param virtualMachineName The ID of the virtual machine that uniquely identifies it within the
424
+ * containing lab. Used in resource URIs.
425
+ * @param options The options parameters.
426
+ */
427
+ async beginRedeploy(
428
+ resourceGroupName: string,
429
+ labName: string,
430
+ virtualMachineName: string,
431
+ options?: VirtualMachinesRedeployOptionalParams
432
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
433
+ const directSendOperation = async (
434
+ args: coreClient.OperationArguments,
435
+ spec: coreClient.OperationSpec
436
+ ): Promise<void> => {
437
+ return this.client.sendOperationRequest(args, spec);
438
+ };
439
+ const sendOperation = async (
440
+ args: coreClient.OperationArguments,
441
+ spec: coreClient.OperationSpec
442
+ ) => {
443
+ let currentRawResponse:
444
+ | coreClient.FullOperationResponse
445
+ | undefined = undefined;
446
+ const providedCallback = args.options?.onResponse;
447
+ const callback: coreClient.RawResponseCallback = (
448
+ rawResponse: coreClient.FullOperationResponse,
449
+ flatResponse: unknown
450
+ ) => {
451
+ currentRawResponse = rawResponse;
452
+ providedCallback?.(rawResponse, flatResponse);
453
+ };
454
+ const updatedArgs = {
455
+ ...args,
456
+ options: {
457
+ ...args.options,
458
+ onResponse: callback
459
+ }
460
+ };
461
+ const flatResponse = await directSendOperation(updatedArgs, spec);
462
+ return {
463
+ flatResponse,
464
+ rawResponse: {
465
+ statusCode: currentRawResponse!.status,
466
+ body: currentRawResponse!.parsedBody,
467
+ headers: currentRawResponse!.headers.toJSON()
468
+ }
469
+ };
470
+ };
471
+
472
+ const lro = new LroImpl(
473
+ sendOperation,
474
+ { resourceGroupName, labName, virtualMachineName, options },
475
+ redeployOperationSpec
476
+ );
477
+ return new LroEngine(lro, {
478
+ resumeFrom: options?.resumeFrom,
479
+ intervalInMs: options?.updateIntervalInMs,
480
+ lroResourceLocationConfig: "location"
481
+ });
482
+ }
483
+
484
+ /**
485
+ * Action to redeploy a lab virtual machine to a different compute node. For troubleshooting
486
+ * connectivity.
487
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
488
+ * @param labName The name of the lab that uniquely identifies it within containing lab account. Used
489
+ * in resource URIs.
490
+ * @param virtualMachineName The ID of the virtual machine that uniquely identifies it within the
491
+ * containing lab. Used in resource URIs.
492
+ * @param options The options parameters.
493
+ */
494
+ async beginRedeployAndWait(
495
+ resourceGroupName: string,
496
+ labName: string,
497
+ virtualMachineName: string,
498
+ options?: VirtualMachinesRedeployOptionalParams
499
+ ): Promise<void> {
500
+ const poller = await this.beginRedeploy(
501
+ resourceGroupName,
502
+ labName,
503
+ virtualMachineName,
504
+ options
505
+ );
506
+ return poller.pollUntilDone();
507
+ }
508
+
509
+ /**
510
+ * Resets a lab virtual machine password.
511
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
512
+ * @param labName The name of the lab that uniquely identifies it within containing lab account. Used
513
+ * in resource URIs.
514
+ * @param virtualMachineName The ID of the virtual machine that uniquely identifies it within the
515
+ * containing lab. Used in resource URIs.
516
+ * @param body The request body.
517
+ * @param options The options parameters.
518
+ */
519
+ async beginResetPassword(
520
+ resourceGroupName: string,
521
+ labName: string,
522
+ virtualMachineName: string,
523
+ body: ResetPasswordBody,
524
+ options?: VirtualMachinesResetPasswordOptionalParams
525
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
526
+ const directSendOperation = async (
527
+ args: coreClient.OperationArguments,
528
+ spec: coreClient.OperationSpec
529
+ ): Promise<void> => {
530
+ return this.client.sendOperationRequest(args, spec);
531
+ };
532
+ const sendOperation = async (
533
+ args: coreClient.OperationArguments,
534
+ spec: coreClient.OperationSpec
535
+ ) => {
536
+ let currentRawResponse:
537
+ | coreClient.FullOperationResponse
538
+ | undefined = undefined;
539
+ const providedCallback = args.options?.onResponse;
540
+ const callback: coreClient.RawResponseCallback = (
541
+ rawResponse: coreClient.FullOperationResponse,
542
+ flatResponse: unknown
543
+ ) => {
544
+ currentRawResponse = rawResponse;
545
+ providedCallback?.(rawResponse, flatResponse);
546
+ };
547
+ const updatedArgs = {
548
+ ...args,
549
+ options: {
550
+ ...args.options,
551
+ onResponse: callback
552
+ }
553
+ };
554
+ const flatResponse = await directSendOperation(updatedArgs, spec);
555
+ return {
556
+ flatResponse,
557
+ rawResponse: {
558
+ statusCode: currentRawResponse!.status,
559
+ body: currentRawResponse!.parsedBody,
560
+ headers: currentRawResponse!.headers.toJSON()
561
+ }
562
+ };
563
+ };
564
+
565
+ const lro = new LroImpl(
566
+ sendOperation,
567
+ { resourceGroupName, labName, virtualMachineName, body, options },
568
+ resetPasswordOperationSpec
569
+ );
570
+ return new LroEngine(lro, {
571
+ resumeFrom: options?.resumeFrom,
572
+ intervalInMs: options?.updateIntervalInMs,
573
+ lroResourceLocationConfig: "location"
574
+ });
575
+ }
576
+
577
+ /**
578
+ * Resets a lab virtual machine password.
579
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
580
+ * @param labName The name of the lab that uniquely identifies it within containing lab account. Used
581
+ * in resource URIs.
582
+ * @param virtualMachineName The ID of the virtual machine that uniquely identifies it within the
583
+ * containing lab. Used in resource URIs.
584
+ * @param body The request body.
585
+ * @param options The options parameters.
586
+ */
587
+ async beginResetPasswordAndWait(
588
+ resourceGroupName: string,
589
+ labName: string,
590
+ virtualMachineName: string,
591
+ body: ResetPasswordBody,
592
+ options?: VirtualMachinesResetPasswordOptionalParams
593
+ ): Promise<void> {
594
+ const poller = await this.beginResetPassword(
595
+ resourceGroupName,
596
+ labName,
597
+ virtualMachineName,
598
+ body,
599
+ options
600
+ );
601
+ return poller.pollUntilDone();
602
+ }
603
+
604
+ /**
605
+ * ListByLabNext
606
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
607
+ * @param labName The name of the lab that uniquely identifies it within containing lab account. Used
608
+ * in resource URIs.
609
+ * @param nextLink The nextLink from the previous successful call to the ListByLab method.
610
+ * @param options The options parameters.
611
+ */
612
+ private _listByLabNext(
613
+ resourceGroupName: string,
614
+ labName: string,
615
+ nextLink: string,
616
+ options?: VirtualMachinesListByLabNextOptionalParams
617
+ ): Promise<VirtualMachinesListByLabNextResponse> {
618
+ return this.client.sendOperationRequest(
619
+ { resourceGroupName, labName, nextLink, options },
620
+ listByLabNextOperationSpec
621
+ );
622
+ }
623
+ }
624
+ // Operation Specifications
625
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
626
+
627
+ const listByLabOperationSpec: coreClient.OperationSpec = {
628
+ path:
629
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/virtualMachines",
630
+ httpMethod: "GET",
631
+ responses: {
632
+ 200: {
633
+ bodyMapper: Mappers.PagedVirtualMachines
634
+ },
635
+ default: {
636
+ bodyMapper: Mappers.ErrorResponse
637
+ }
638
+ },
639
+ queryParameters: [Parameters.apiVersion, Parameters.filter],
640
+ urlParameters: [
641
+ Parameters.$host,
642
+ Parameters.subscriptionId,
643
+ Parameters.resourceGroupName,
644
+ Parameters.labName
645
+ ],
646
+ headerParameters: [Parameters.accept],
647
+ serializer
648
+ };
649
+ const getOperationSpec: coreClient.OperationSpec = {
650
+ path:
651
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/virtualMachines/{virtualMachineName}",
652
+ httpMethod: "GET",
653
+ responses: {
654
+ 200: {
655
+ bodyMapper: Mappers.VirtualMachine
656
+ },
657
+ default: {
658
+ bodyMapper: Mappers.ErrorResponse
659
+ }
660
+ },
661
+ queryParameters: [Parameters.apiVersion],
662
+ urlParameters: [
663
+ Parameters.$host,
664
+ Parameters.subscriptionId,
665
+ Parameters.resourceGroupName,
666
+ Parameters.labName,
667
+ Parameters.virtualMachineName
668
+ ],
669
+ headerParameters: [Parameters.accept],
670
+ serializer
671
+ };
672
+ const startOperationSpec: coreClient.OperationSpec = {
673
+ path:
674
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/virtualMachines/{virtualMachineName}/start",
675
+ httpMethod: "POST",
676
+ responses: {
677
+ 200: {},
678
+ 201: {},
679
+ 202: {},
680
+ 204: {},
681
+ default: {
682
+ bodyMapper: Mappers.ErrorResponse
683
+ }
684
+ },
685
+ queryParameters: [Parameters.apiVersion],
686
+ urlParameters: [
687
+ Parameters.$host,
688
+ Parameters.subscriptionId,
689
+ Parameters.resourceGroupName,
690
+ Parameters.labName,
691
+ Parameters.virtualMachineName
692
+ ],
693
+ headerParameters: [Parameters.accept],
694
+ serializer
695
+ };
696
+ const stopOperationSpec: coreClient.OperationSpec = {
697
+ path:
698
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/virtualMachines/{virtualMachineName}/stop",
699
+ httpMethod: "POST",
700
+ responses: {
701
+ 200: {},
702
+ 201: {},
703
+ 202: {},
704
+ 204: {},
705
+ default: {
706
+ bodyMapper: Mappers.ErrorResponse
707
+ }
708
+ },
709
+ queryParameters: [Parameters.apiVersion],
710
+ urlParameters: [
711
+ Parameters.$host,
712
+ Parameters.subscriptionId,
713
+ Parameters.resourceGroupName,
714
+ Parameters.labName,
715
+ Parameters.virtualMachineName
716
+ ],
717
+ headerParameters: [Parameters.accept],
718
+ serializer
719
+ };
720
+ const reimageOperationSpec: coreClient.OperationSpec = {
721
+ path:
722
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/virtualMachines/{virtualMachineName}/reimage",
723
+ httpMethod: "POST",
724
+ responses: {
725
+ 200: {},
726
+ 201: {},
727
+ 202: {},
728
+ 204: {},
729
+ default: {
730
+ bodyMapper: Mappers.ErrorResponse
731
+ }
732
+ },
733
+ queryParameters: [Parameters.apiVersion],
734
+ urlParameters: [
735
+ Parameters.$host,
736
+ Parameters.subscriptionId,
737
+ Parameters.resourceGroupName,
738
+ Parameters.labName,
739
+ Parameters.virtualMachineName
740
+ ],
741
+ headerParameters: [Parameters.accept],
742
+ serializer
743
+ };
744
+ const redeployOperationSpec: coreClient.OperationSpec = {
745
+ path:
746
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/virtualMachines/{virtualMachineName}/redeploy",
747
+ httpMethod: "POST",
748
+ responses: {
749
+ 200: {},
750
+ 201: {},
751
+ 202: {},
752
+ 204: {},
753
+ default: {
754
+ bodyMapper: Mappers.ErrorResponse
755
+ }
756
+ },
757
+ queryParameters: [Parameters.apiVersion],
758
+ urlParameters: [
759
+ Parameters.$host,
760
+ Parameters.subscriptionId,
761
+ Parameters.resourceGroupName,
762
+ Parameters.labName,
763
+ Parameters.virtualMachineName
764
+ ],
765
+ headerParameters: [Parameters.accept],
766
+ serializer
767
+ };
768
+ const resetPasswordOperationSpec: coreClient.OperationSpec = {
769
+ path:
770
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/virtualMachines/{virtualMachineName}/resetPassword",
771
+ httpMethod: "POST",
772
+ responses: {
773
+ 200: {},
774
+ 201: {},
775
+ 202: {},
776
+ 204: {},
777
+ default: {
778
+ bodyMapper: Mappers.ErrorResponse
779
+ }
780
+ },
781
+ requestBody: Parameters.body12,
782
+ queryParameters: [Parameters.apiVersion],
783
+ urlParameters: [
784
+ Parameters.$host,
785
+ Parameters.subscriptionId,
786
+ Parameters.resourceGroupName,
787
+ Parameters.labName,
788
+ Parameters.virtualMachineName
789
+ ],
790
+ headerParameters: [Parameters.accept, Parameters.contentType],
791
+ mediaType: "json",
792
+ serializer
793
+ };
794
+ const listByLabNextOperationSpec: coreClient.OperationSpec = {
795
+ path: "{nextLink}",
796
+ httpMethod: "GET",
797
+ responses: {
798
+ 200: {
799
+ bodyMapper: Mappers.PagedVirtualMachines
800
+ },
801
+ default: {
802
+ bodyMapper: Mappers.ErrorResponse
803
+ }
804
+ },
805
+ queryParameters: [Parameters.apiVersion, Parameters.filter],
806
+ urlParameters: [
807
+ Parameters.$host,
808
+ Parameters.subscriptionId,
809
+ Parameters.resourceGroupName,
810
+ Parameters.nextLink,
811
+ Parameters.labName
812
+ ],
813
+ headerParameters: [Parameters.accept],
814
+ serializer
815
+ };