@azure/arm-datamigration 2.0.0 → 3.0.0-beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (450) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/README.md +72 -73
  4. package/dist/index.js +16801 -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/samples-dev/createOrUpdateDatabaseMigrationResourceWithMaximumParameters.d.ts +2 -0
  9. package/dist-esm/samples-dev/createOrUpdateDatabaseMigrationResourceWithMaximumParameters.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/createOrUpdateDatabaseMigrationResourceWithMaximumParameters.js +65 -0
  11. package/dist-esm/samples-dev/createOrUpdateDatabaseMigrationResourceWithMaximumParameters.js.map +1 -0
  12. package/dist-esm/samples-dev/createOrUpdateDatabaseMigrationResourceWithMinimumParameters.d.ts +2 -0
  13. package/dist-esm/samples-dev/createOrUpdateDatabaseMigrationResourceWithMinimumParameters.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/createOrUpdateDatabaseMigrationResourceWithMinimumParameters.js +65 -0
  15. package/dist-esm/samples-dev/createOrUpdateDatabaseMigrationResourceWithMinimumParameters.js.map +1 -0
  16. package/dist-esm/samples-dev/createOrUpdateSqlMigrationServiceWithMaximumParameters.d.ts +2 -0
  17. package/dist-esm/samples-dev/createOrUpdateSqlMigrationServiceWithMaximumParameters.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/createOrUpdateSqlMigrationServiceWithMaximumParameters.js +32 -0
  19. package/dist-esm/samples-dev/createOrUpdateSqlMigrationServiceWithMaximumParameters.js.map +1 -0
  20. package/dist-esm/samples-dev/createOrUpdateSqlMigrationServiceWithMinimumParameters.d.ts +2 -0
  21. package/dist-esm/samples-dev/createOrUpdateSqlMigrationServiceWithMinimumParameters.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/createOrUpdateSqlMigrationServiceWithMinimumParameters.js +32 -0
  23. package/dist-esm/samples-dev/createOrUpdateSqlMigrationServiceWithMinimumParameters.js.map +1 -0
  24. package/dist-esm/samples-dev/cutoverOnlineMigrationOperationForTheDatabase.d.ts +2 -0
  25. package/dist-esm/samples-dev/cutoverOnlineMigrationOperationForTheDatabase.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/cutoverOnlineMigrationOperationForTheDatabase.js +35 -0
  27. package/dist-esm/samples-dev/cutoverOnlineMigrationOperationForTheDatabase.js.map +1 -0
  28. package/dist-esm/samples-dev/deleteSqlMigrationService.d.ts +2 -0
  29. package/dist-esm/samples-dev/deleteSqlMigrationService.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/deleteSqlMigrationService.js +31 -0
  31. package/dist-esm/samples-dev/deleteSqlMigrationService.js.map +1 -0
  32. package/dist-esm/samples-dev/deleteTheIntegrationRuntimeNode.d.ts +2 -0
  33. package/dist-esm/samples-dev/deleteTheIntegrationRuntimeNode.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/deleteTheIntegrationRuntimeNode.js +35 -0
  35. package/dist-esm/samples-dev/deleteTheIntegrationRuntimeNode.js.map +1 -0
  36. package/dist-esm/samples-dev/filesCreateOrUpdate.d.ts +2 -0
  37. package/dist-esm/samples-dev/filesCreateOrUpdate.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/filesCreateOrUpdate.js +36 -0
  39. package/dist-esm/samples-dev/filesCreateOrUpdate.js.map +1 -0
  40. package/dist-esm/samples-dev/filesDelete.d.ts +2 -0
  41. package/dist-esm/samples-dev/filesDelete.d.ts.map +1 -0
  42. package/dist-esm/samples-dev/filesDelete.js +33 -0
  43. package/dist-esm/samples-dev/filesDelete.js.map +1 -0
  44. package/dist-esm/samples-dev/filesList.d.ts +2 -0
  45. package/dist-esm/samples-dev/filesList.d.ts.map +1 -0
  46. package/dist-esm/samples-dev/filesList.js +33 -0
  47. package/dist-esm/samples-dev/filesList.js.map +1 -0
  48. package/dist-esm/samples-dev/filesUpdate.d.ts +2 -0
  49. package/dist-esm/samples-dev/filesUpdate.d.ts.map +1 -0
  50. package/dist-esm/samples-dev/filesUpdate.js +36 -0
  51. package/dist-esm/samples-dev/filesUpdate.js.map +1 -0
  52. package/dist-esm/samples-dev/getDatabaseMigrationResource.d.ts +2 -0
  53. package/dist-esm/samples-dev/getDatabaseMigrationResource.d.ts.map +1 -0
  54. package/dist-esm/samples-dev/getDatabaseMigrationResource.js +32 -0
  55. package/dist-esm/samples-dev/getDatabaseMigrationResource.js.map +1 -0
  56. package/dist-esm/samples-dev/getMigrationService.d.ts +2 -0
  57. package/dist-esm/samples-dev/getMigrationService.d.ts.map +1 -0
  58. package/dist-esm/samples-dev/getMigrationService.js +31 -0
  59. package/dist-esm/samples-dev/getMigrationService.js.map +1 -0
  60. package/dist-esm/samples-dev/getMigrationServicesInTheResourceGroup.d.ts +2 -0
  61. package/dist-esm/samples-dev/getMigrationServicesInTheResourceGroup.d.ts.map +1 -0
  62. package/dist-esm/samples-dev/getMigrationServicesInTheResourceGroup.js +44 -0
  63. package/dist-esm/samples-dev/getMigrationServicesInTheResourceGroup.js.map +1 -0
  64. package/dist-esm/samples-dev/getServicesInTheSubscriptions.d.ts +2 -0
  65. package/dist-esm/samples-dev/getServicesInTheSubscriptions.d.ts.map +1 -0
  66. package/dist-esm/samples-dev/getServicesInTheSubscriptions.js +43 -0
  67. package/dist-esm/samples-dev/getServicesInTheSubscriptions.js.map +1 -0
  68. package/dist-esm/samples-dev/listDatabaseMigrationsAttachedToTheService.d.ts +2 -0
  69. package/dist-esm/samples-dev/listDatabaseMigrationsAttachedToTheService.d.ts.map +1 -0
  70. package/dist-esm/samples-dev/listDatabaseMigrationsAttachedToTheService.js +45 -0
  71. package/dist-esm/samples-dev/listDatabaseMigrationsAttachedToTheService.js.map +1 -0
  72. package/dist-esm/samples-dev/listSkus.d.ts +2 -0
  73. package/dist-esm/samples-dev/listSkus.d.ts.map +1 -0
  74. package/dist-esm/samples-dev/listSkus.js +43 -0
  75. package/dist-esm/samples-dev/listSkus.js.map +1 -0
  76. package/dist-esm/samples-dev/listsAllOfTheAvailableSqlRestApiOperations.d.ts +2 -0
  77. package/dist-esm/samples-dev/listsAllOfTheAvailableSqlRestApiOperations.d.ts.map +1 -0
  78. package/dist-esm/samples-dev/listsAllOfTheAvailableSqlRestApiOperations.js +43 -0
  79. package/dist-esm/samples-dev/listsAllOfTheAvailableSqlRestApiOperations.js.map +1 -0
  80. package/dist-esm/samples-dev/projectsCreateOrUpdate.d.ts +2 -0
  81. package/dist-esm/samples-dev/projectsCreateOrUpdate.d.ts.map +1 -0
  82. package/dist-esm/samples-dev/projectsCreateOrUpdate.js +37 -0
  83. package/dist-esm/samples-dev/projectsCreateOrUpdate.js.map +1 -0
  84. package/dist-esm/samples-dev/projectsDelete.d.ts +2 -0
  85. package/dist-esm/samples-dev/projectsDelete.d.ts.map +1 -0
  86. package/dist-esm/samples-dev/projectsDelete.js +32 -0
  87. package/dist-esm/samples-dev/projectsDelete.js.map +1 -0
  88. package/dist-esm/samples-dev/projectsGet.d.ts +2 -0
  89. package/dist-esm/samples-dev/projectsGet.d.ts.map +1 -0
  90. package/dist-esm/samples-dev/projectsGet.js +32 -0
  91. package/dist-esm/samples-dev/projectsGet.js.map +1 -0
  92. package/dist-esm/samples-dev/projectsList.d.ts +2 -0
  93. package/dist-esm/samples-dev/projectsList.d.ts.map +1 -0
  94. package/dist-esm/samples-dev/projectsList.js +45 -0
  95. package/dist-esm/samples-dev/projectsList.js.map +1 -0
  96. package/dist-esm/samples-dev/projectsUpdate.d.ts +2 -0
  97. package/dist-esm/samples-dev/projectsUpdate.d.ts.map +1 -0
  98. package/dist-esm/samples-dev/projectsUpdate.js +37 -0
  99. package/dist-esm/samples-dev/projectsUpdate.js.map +1 -0
  100. package/dist-esm/samples-dev/regenerateTheOfAuthenticationKeys.d.ts +2 -0
  101. package/dist-esm/samples-dev/regenerateTheOfAuthenticationKeys.d.ts.map +1 -0
  102. package/dist-esm/samples-dev/regenerateTheOfAuthenticationKeys.js +32 -0
  103. package/dist-esm/samples-dev/regenerateTheOfAuthenticationKeys.js.map +1 -0
  104. package/dist-esm/samples-dev/retrieveTheListOfAuthenticationKeys.d.ts +2 -0
  105. package/dist-esm/samples-dev/retrieveTheListOfAuthenticationKeys.d.ts.map +1 -0
  106. package/dist-esm/samples-dev/retrieveTheListOfAuthenticationKeys.js +31 -0
  107. package/dist-esm/samples-dev/retrieveTheListOfAuthenticationKeys.js.map +1 -0
  108. package/dist-esm/samples-dev/retrieveTheMonitoringData.d.ts +2 -0
  109. package/dist-esm/samples-dev/retrieveTheMonitoringData.d.ts.map +1 -0
  110. package/dist-esm/samples-dev/retrieveTheMonitoringData.js +31 -0
  111. package/dist-esm/samples-dev/retrieveTheMonitoringData.js.map +1 -0
  112. package/dist-esm/samples-dev/serviceTasksList.d.ts +2 -0
  113. package/dist-esm/samples-dev/serviceTasksList.d.ts.map +1 -0
  114. package/dist-esm/samples-dev/serviceTasksList.js +45 -0
  115. package/dist-esm/samples-dev/serviceTasksList.js.map +1 -0
  116. package/dist-esm/samples-dev/servicesCheckChildrenNameAvailability.d.ts +2 -0
  117. package/dist-esm/samples-dev/servicesCheckChildrenNameAvailability.d.ts.map +1 -0
  118. package/dist-esm/samples-dev/servicesCheckChildrenNameAvailability.js +32 -0
  119. package/dist-esm/samples-dev/servicesCheckChildrenNameAvailability.js.map +1 -0
  120. package/dist-esm/samples-dev/servicesCheckNameAvailability.d.ts +2 -0
  121. package/dist-esm/samples-dev/servicesCheckNameAvailability.d.ts.map +1 -0
  122. package/dist-esm/samples-dev/servicesCheckNameAvailability.js +34 -0
  123. package/dist-esm/samples-dev/servicesCheckNameAvailability.js.map +1 -0
  124. package/dist-esm/samples-dev/servicesCheckStatus.d.ts +2 -0
  125. package/dist-esm/samples-dev/servicesCheckStatus.d.ts.map +1 -0
  126. package/dist-esm/samples-dev/servicesCheckStatus.js +31 -0
  127. package/dist-esm/samples-dev/servicesCheckStatus.js.map +1 -0
  128. package/dist-esm/samples-dev/servicesCreateOrUpdate.d.ts +2 -0
  129. package/dist-esm/samples-dev/servicesCreateOrUpdate.d.ts.map +1 -0
  130. package/dist-esm/samples-dev/servicesCreateOrUpdate.js +35 -0
  131. package/dist-esm/samples-dev/servicesCreateOrUpdate.js.map +1 -0
  132. package/dist-esm/samples-dev/servicesList.d.ts +2 -0
  133. package/dist-esm/samples-dev/servicesList.d.ts.map +1 -0
  134. package/dist-esm/samples-dev/servicesList.js +43 -0
  135. package/dist-esm/samples-dev/servicesList.js.map +1 -0
  136. package/dist-esm/samples-dev/servicesListByResourceGroup.d.ts +2 -0
  137. package/dist-esm/samples-dev/servicesListByResourceGroup.d.ts.map +1 -0
  138. package/dist-esm/samples-dev/servicesListByResourceGroup.js +44 -0
  139. package/dist-esm/samples-dev/servicesListByResourceGroup.js.map +1 -0
  140. package/dist-esm/samples-dev/servicesListSkus.d.ts +2 -0
  141. package/dist-esm/samples-dev/servicesListSkus.d.ts.map +1 -0
  142. package/dist-esm/samples-dev/servicesListSkus.js +45 -0
  143. package/dist-esm/samples-dev/servicesListSkus.js.map +1 -0
  144. package/dist-esm/samples-dev/servicesStart.d.ts +2 -0
  145. package/dist-esm/samples-dev/servicesStart.d.ts.map +1 -0
  146. package/dist-esm/samples-dev/servicesStart.js +31 -0
  147. package/dist-esm/samples-dev/servicesStart.js.map +1 -0
  148. package/dist-esm/samples-dev/servicesStop.d.ts +2 -0
  149. package/dist-esm/samples-dev/servicesStop.d.ts.map +1 -0
  150. package/dist-esm/samples-dev/servicesStop.js +31 -0
  151. package/dist-esm/samples-dev/servicesStop.js.map +1 -0
  152. package/dist-esm/samples-dev/servicesUsages.d.ts +2 -0
  153. package/dist-esm/samples-dev/servicesUsages.d.ts.map +1 -0
  154. package/dist-esm/samples-dev/servicesUsages.js +44 -0
  155. package/dist-esm/samples-dev/servicesUsages.js.map +1 -0
  156. package/dist-esm/samples-dev/stopOngoingMigrationForTheDatabase.d.ts +2 -0
  157. package/dist-esm/samples-dev/stopOngoingMigrationForTheDatabase.d.ts.map +1 -0
  158. package/dist-esm/samples-dev/stopOngoingMigrationForTheDatabase.js +35 -0
  159. package/dist-esm/samples-dev/stopOngoingMigrationForTheDatabase.js.map +1 -0
  160. package/dist-esm/samples-dev/tasksCancel.d.ts +2 -0
  161. package/dist-esm/samples-dev/tasksCancel.d.ts.map +1 -0
  162. package/dist-esm/samples-dev/tasksCancel.js +32 -0
  163. package/dist-esm/samples-dev/tasksCancel.js.map +1 -0
  164. package/dist-esm/samples-dev/tasksCommand.d.ts +2 -0
  165. package/dist-esm/samples-dev/tasksCommand.d.ts.map +1 -0
  166. package/dist-esm/samples-dev/tasksCommand.js +37 -0
  167. package/dist-esm/samples-dev/tasksCommand.js.map +1 -0
  168. package/dist-esm/samples-dev/tasksCreateOrUpdate.d.ts +2 -0
  169. package/dist-esm/samples-dev/tasksCreateOrUpdate.d.ts.map +1 -0
  170. package/dist-esm/samples-dev/tasksCreateOrUpdate.js +38 -0
  171. package/dist-esm/samples-dev/tasksCreateOrUpdate.js.map +1 -0
  172. package/dist-esm/samples-dev/tasksDelete.d.ts +2 -0
  173. package/dist-esm/samples-dev/tasksDelete.d.ts.map +1 -0
  174. package/dist-esm/samples-dev/tasksDelete.js +32 -0
  175. package/dist-esm/samples-dev/tasksDelete.js.map +1 -0
  176. package/dist-esm/samples-dev/tasksGet.d.ts +2 -0
  177. package/dist-esm/samples-dev/tasksGet.d.ts.map +1 -0
  178. package/dist-esm/samples-dev/tasksGet.js +32 -0
  179. package/dist-esm/samples-dev/tasksGet.js.map +1 -0
  180. package/dist-esm/samples-dev/tasksList.d.ts +2 -0
  181. package/dist-esm/samples-dev/tasksList.d.ts.map +1 -0
  182. package/dist-esm/samples-dev/tasksList.js +46 -0
  183. package/dist-esm/samples-dev/tasksList.js.map +1 -0
  184. package/dist-esm/samples-dev/tasksUpdate.d.ts +2 -0
  185. package/dist-esm/samples-dev/tasksUpdate.d.ts.map +1 -0
  186. package/dist-esm/samples-dev/tasksUpdate.js +38 -0
  187. package/dist-esm/samples-dev/tasksUpdate.js.map +1 -0
  188. package/dist-esm/samples-dev/updateSqlMigrationService.d.ts +2 -0
  189. package/dist-esm/samples-dev/updateSqlMigrationService.d.ts.map +1 -0
  190. package/dist-esm/samples-dev/updateSqlMigrationService.js +32 -0
  191. package/dist-esm/samples-dev/updateSqlMigrationService.js.map +1 -0
  192. package/dist-esm/src/dataMigrationManagementClient.d.ts +28 -0
  193. package/dist-esm/src/dataMigrationManagementClient.d.ts.map +1 -0
  194. package/dist-esm/src/dataMigrationManagementClient.js +61 -0
  195. package/dist-esm/src/dataMigrationManagementClient.js.map +1 -0
  196. package/dist-esm/src/index.d.ts +5 -0
  197. package/dist-esm/src/index.d.ts.map +1 -0
  198. package/dist-esm/src/index.js +12 -0
  199. package/dist-esm/src/index.js.map +1 -0
  200. package/dist-esm/src/lroImpl.d.ts +16 -0
  201. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  202. package/dist-esm/src/lroImpl.js +29 -0
  203. package/dist-esm/src/lroImpl.js.map +1 -0
  204. package/dist-esm/src/models/index.d.ts +7238 -0
  205. package/dist-esm/src/models/index.d.ts.map +1 -0
  206. package/dist-esm/src/models/index.js +534 -0
  207. package/dist-esm/src/models/index.js.map +1 -0
  208. package/dist-esm/src/models/mappers.d.ts +434 -0
  209. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  210. package/{esm → dist-esm/src}/models/mappers.js +7803 -6204
  211. package/dist-esm/src/models/mappers.js.map +1 -0
  212. package/dist-esm/src/models/parameters.d.ts +36 -0
  213. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  214. package/dist-esm/src/models/parameters.js +272 -0
  215. package/dist-esm/src/models/parameters.js.map +1 -0
  216. package/dist-esm/src/operations/databaseMigrationsSqlMi.d.ts +83 -0
  217. package/dist-esm/src/operations/databaseMigrationsSqlMi.d.ts.map +1 -0
  218. package/dist-esm/src/operations/databaseMigrationsSqlMi.js +309 -0
  219. package/dist-esm/src/operations/databaseMigrationsSqlMi.js.map +1 -0
  220. package/dist-esm/src/operations/databaseMigrationsSqlVm.d.ts +83 -0
  221. package/dist-esm/src/operations/databaseMigrationsSqlVm.d.ts.map +1 -0
  222. package/dist-esm/src/operations/databaseMigrationsSqlVm.js +309 -0
  223. package/dist-esm/src/operations/databaseMigrationsSqlVm.js.map +1 -0
  224. package/dist-esm/src/operations/files.d.ts +101 -0
  225. package/dist-esm/src/operations/files.d.ts.map +1 -0
  226. package/dist-esm/src/operations/files.js +358 -0
  227. package/dist-esm/src/operations/files.js.map +1 -0
  228. package/{esm → dist-esm/src}/operations/index.d.ts +4 -1
  229. package/dist-esm/src/operations/index.d.ts.map +1 -0
  230. package/dist-esm/src/operations/index.js +19 -0
  231. package/dist-esm/src/operations/index.js.map +1 -0
  232. package/dist-esm/src/operations/operations.d.ts +32 -0
  233. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  234. package/dist-esm/src/operations/operations.js +116 -0
  235. package/dist-esm/src/operations/operations.js.map +1 -0
  236. package/dist-esm/src/operations/projects.d.ts +78 -0
  237. package/dist-esm/src/operations/projects.d.ts.map +1 -0
  238. package/dist-esm/src/operations/projects.js +279 -0
  239. package/dist-esm/src/operations/projects.js.map +1 -0
  240. package/dist-esm/src/operations/resourceSkus.d.ts +32 -0
  241. package/dist-esm/src/operations/resourceSkus.d.ts.map +1 -0
  242. package/dist-esm/src/operations/resourceSkus.js +124 -0
  243. package/dist-esm/src/operations/resourceSkus.js.map +1 -0
  244. package/dist-esm/src/operations/serviceTasks.d.ts +91 -0
  245. package/dist-esm/src/operations/serviceTasks.d.ts.map +1 -0
  246. package/dist-esm/src/operations/serviceTasks.js +316 -0
  247. package/dist-esm/src/operations/serviceTasks.js.map +1 -0
  248. package/dist-esm/src/operations/services.d.ts +217 -0
  249. package/dist-esm/src/operations/services.d.ts.map +1 -0
  250. package/dist-esm/src/operations/services.js +884 -0
  251. package/dist-esm/src/operations/services.js.map +1 -0
  252. package/dist-esm/src/operations/sqlMigrationServices.d.ts +178 -0
  253. package/dist-esm/src/operations/sqlMigrationServices.d.ts.map +1 -0
  254. package/dist-esm/src/operations/sqlMigrationServices.js +720 -0
  255. package/dist-esm/src/operations/sqlMigrationServices.js.map +1 -0
  256. package/dist-esm/src/operations/tasks.d.ts +110 -0
  257. package/dist-esm/src/operations/tasks.d.ts.map +1 -0
  258. package/dist-esm/src/operations/tasks.js +369 -0
  259. package/dist-esm/src/operations/tasks.js.map +1 -0
  260. package/dist-esm/src/operations/usages.d.ts +37 -0
  261. package/dist-esm/src/operations/usages.d.ts.map +1 -0
  262. package/dist-esm/src/operations/usages.js +134 -0
  263. package/dist-esm/src/operations/usages.js.map +1 -0
  264. package/dist-esm/src/operationsInterfaces/databaseMigrationsSqlMi.d.ts +75 -0
  265. package/dist-esm/src/operationsInterfaces/databaseMigrationsSqlMi.d.ts.map +1 -0
  266. package/dist-esm/src/operationsInterfaces/databaseMigrationsSqlMi.js +9 -0
  267. package/dist-esm/src/operationsInterfaces/databaseMigrationsSqlMi.js.map +1 -0
  268. package/dist-esm/src/operationsInterfaces/databaseMigrationsSqlVm.d.ts +75 -0
  269. package/dist-esm/src/operationsInterfaces/databaseMigrationsSqlVm.d.ts.map +1 -0
  270. package/dist-esm/src/operationsInterfaces/databaseMigrationsSqlVm.js +9 -0
  271. package/dist-esm/src/operationsInterfaces/databaseMigrationsSqlVm.js.map +1 -0
  272. package/dist-esm/src/operationsInterfaces/files.d.ts +73 -0
  273. package/dist-esm/src/operationsInterfaces/files.d.ts.map +1 -0
  274. package/dist-esm/src/operationsInterfaces/files.js +9 -0
  275. package/dist-esm/src/operationsInterfaces/files.js.map +1 -0
  276. package/dist-esm/src/operationsInterfaces/index.d.ts +12 -0
  277. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  278. package/dist-esm/src/operationsInterfaces/index.js +19 -0
  279. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  280. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  281. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  282. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  283. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  284. package/dist-esm/src/operationsInterfaces/projects.d.ts +52 -0
  285. package/dist-esm/src/operationsInterfaces/projects.d.ts.map +1 -0
  286. package/dist-esm/src/operationsInterfaces/projects.js +9 -0
  287. package/dist-esm/src/operationsInterfaces/projects.js.map +1 -0
  288. package/dist-esm/src/operationsInterfaces/resourceSkus.d.ts +11 -0
  289. package/dist-esm/src/operationsInterfaces/resourceSkus.d.ts.map +1 -0
  290. package/dist-esm/src/operationsInterfaces/resourceSkus.js +9 -0
  291. package/dist-esm/src/operationsInterfaces/resourceSkus.js.map +1 -0
  292. package/dist-esm/src/operationsInterfaces/serviceTasks.d.ts +64 -0
  293. package/dist-esm/src/operationsInterfaces/serviceTasks.d.ts.map +1 -0
  294. package/dist-esm/src/operationsInterfaces/serviceTasks.js +9 -0
  295. package/dist-esm/src/operationsInterfaces/serviceTasks.js.map +1 -0
  296. package/dist-esm/src/operationsInterfaces/services.d.ts +161 -0
  297. package/dist-esm/src/operationsInterfaces/services.d.ts.map +1 -0
  298. package/dist-esm/src/operationsInterfaces/services.js +9 -0
  299. package/dist-esm/src/operationsInterfaces/services.js.map +1 -0
  300. package/dist-esm/src/operationsInterfaces/sqlMigrationServices.d.ts +121 -0
  301. package/dist-esm/src/operationsInterfaces/sqlMigrationServices.d.ts.map +1 -0
  302. package/dist-esm/src/operationsInterfaces/sqlMigrationServices.js +9 -0
  303. package/dist-esm/src/operationsInterfaces/sqlMigrationServices.js.map +1 -0
  304. package/dist-esm/src/operationsInterfaces/tasks.d.ts +81 -0
  305. package/dist-esm/src/operationsInterfaces/tasks.d.ts.map +1 -0
  306. package/dist-esm/src/operationsInterfaces/tasks.js +9 -0
  307. package/dist-esm/src/operationsInterfaces/tasks.js.map +1 -0
  308. package/dist-esm/src/operationsInterfaces/usages.d.ts +13 -0
  309. package/dist-esm/src/operationsInterfaces/usages.d.ts.map +1 -0
  310. package/dist-esm/src/operationsInterfaces/usages.js +9 -0
  311. package/dist-esm/src/operationsInterfaces/usages.js.map +1 -0
  312. package/dist-esm/test/sampleTest.d.ts +2 -0
  313. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  314. package/dist-esm/test/sampleTest.js +40 -0
  315. package/dist-esm/test/sampleTest.js.map +1 -0
  316. package/package.json +80 -32
  317. package/review/arm-datamigration.api.md +4412 -0
  318. package/rollup.config.js +181 -30
  319. package/src/dataMigrationManagementClient.ts +119 -0
  320. package/src/index.ts +12 -0
  321. package/src/lroImpl.ts +34 -0
  322. package/src/models/index.ts +6252 -7473
  323. package/src/models/mappers.ts +8147 -6279
  324. package/src/models/parameters.ts +230 -54
  325. package/src/operations/databaseMigrationsSqlMi.ts +453 -0
  326. package/src/operations/databaseMigrationsSqlVm.ts +453 -0
  327. package/src/operations/files.ts +283 -368
  328. package/src/operations/index.ts +7 -6
  329. package/src/operations/operations.ts +93 -85
  330. package/src/operations/projects.ts +222 -275
  331. package/src/operations/resourceSkus.ts +92 -78
  332. package/src/operations/serviceTasks.ts +244 -321
  333. package/src/operations/services.ts +887 -647
  334. package/src/operations/sqlMigrationServices.ts +986 -0
  335. package/src/operations/tasks.ts +303 -397
  336. package/src/operations/usages.ts +110 -85
  337. package/src/operationsInterfaces/databaseMigrationsSqlMi.ts +138 -0
  338. package/src/operationsInterfaces/databaseMigrationsSqlVm.ts +138 -0
  339. package/src/operationsInterfaces/files.ts +139 -0
  340. package/{esm/operations/index.js → src/operationsInterfaces/index.ts} +8 -7
  341. package/src/operationsInterfaces/operations.ts +22 -0
  342. package/src/operationsInterfaces/projects.ts +97 -0
  343. package/src/operationsInterfaces/resourceSkus.ts +22 -0
  344. package/src/operationsInterfaces/serviceTasks.ts +116 -0
  345. package/src/operationsInterfaces/services.ts +272 -0
  346. package/src/operationsInterfaces/sqlMigrationServices.ts +223 -0
  347. package/src/operationsInterfaces/tasks.ts +149 -0
  348. package/src/operationsInterfaces/usages.ts +25 -0
  349. package/tsconfig.json +5 -4
  350. package/types/arm-datamigration.d.ts +8549 -0
  351. package/types/tsdoc-metadata.json +11 -0
  352. package/dist/arm-datamigration.js +0 -14002
  353. package/dist/arm-datamigration.js.map +0 -1
  354. package/dist/arm-datamigration.min.js +0 -1
  355. package/dist/arm-datamigration.min.js.map +0 -1
  356. package/esm/dataMigrationServiceClient.d.ts +0 -25
  357. package/esm/dataMigrationServiceClient.d.ts.map +0 -1
  358. package/esm/dataMigrationServiceClient.js +0 -40
  359. package/esm/dataMigrationServiceClient.js.map +0 -1
  360. package/esm/dataMigrationServiceClientContext.d.ts +0 -16
  361. package/esm/dataMigrationServiceClientContext.d.ts.map +0 -1
  362. package/esm/dataMigrationServiceClientContext.js +0 -56
  363. package/esm/dataMigrationServiceClientContext.js.map +0 -1
  364. package/esm/models/filesMappers.d.ts +0 -2
  365. package/esm/models/filesMappers.d.ts.map +0 -1
  366. package/esm/models/filesMappers.js +0 -9
  367. package/esm/models/filesMappers.js.map +0 -1
  368. package/esm/models/index.d.ts +0 -8920
  369. package/esm/models/index.d.ts.map +0 -1
  370. package/esm/models/index.js +0 -8
  371. package/esm/models/index.js.map +0 -1
  372. package/esm/models/mappers.d.ts +0 -374
  373. package/esm/models/mappers.d.ts.map +0 -1
  374. package/esm/models/mappers.js.map +0 -1
  375. package/esm/models/operationsMappers.d.ts +0 -2
  376. package/esm/models/operationsMappers.d.ts.map +0 -1
  377. package/esm/models/operationsMappers.js +0 -9
  378. package/esm/models/operationsMappers.js.map +0 -1
  379. package/esm/models/parameters.d.ts +0 -15
  380. package/esm/models/parameters.d.ts.map +0 -1
  381. package/esm/models/parameters.js +0 -147
  382. package/esm/models/parameters.js.map +0 -1
  383. package/esm/models/projectsMappers.d.ts +0 -2
  384. package/esm/models/projectsMappers.d.ts.map +0 -1
  385. package/esm/models/projectsMappers.js +0 -9
  386. package/esm/models/projectsMappers.js.map +0 -1
  387. package/esm/models/resourceSkusMappers.d.ts +0 -2
  388. package/esm/models/resourceSkusMappers.d.ts.map +0 -1
  389. package/esm/models/resourceSkusMappers.js +0 -9
  390. package/esm/models/resourceSkusMappers.js.map +0 -1
  391. package/esm/models/serviceTasksMappers.d.ts +0 -2
  392. package/esm/models/serviceTasksMappers.d.ts.map +0 -1
  393. package/esm/models/serviceTasksMappers.js +0 -9
  394. package/esm/models/serviceTasksMappers.js.map +0 -1
  395. package/esm/models/servicesMappers.d.ts +0 -2
  396. package/esm/models/servicesMappers.d.ts.map +0 -1
  397. package/esm/models/servicesMappers.js +0 -9
  398. package/esm/models/servicesMappers.js.map +0 -1
  399. package/esm/models/tasksMappers.d.ts +0 -2
  400. package/esm/models/tasksMappers.d.ts.map +0 -1
  401. package/esm/models/tasksMappers.js +0 -9
  402. package/esm/models/tasksMappers.js.map +0 -1
  403. package/esm/models/usagesMappers.d.ts +0 -2
  404. package/esm/models/usagesMappers.d.ts.map +0 -1
  405. package/esm/models/usagesMappers.js +0 -9
  406. package/esm/models/usagesMappers.js.map +0 -1
  407. package/esm/operations/files.d.ts +0 -235
  408. package/esm/operations/files.d.ts.map +0 -1
  409. package/esm/operations/files.js +0 -309
  410. package/esm/operations/files.js.map +0 -1
  411. package/esm/operations/index.d.ts.map +0 -1
  412. package/esm/operations/index.js.map +0 -1
  413. package/esm/operations/operations.d.ts +0 -48
  414. package/esm/operations/operations.d.ts.map +0 -1
  415. package/esm/operations/operations.js +0 -77
  416. package/esm/operations/operations.js.map +0 -1
  417. package/esm/operations/projects.d.ts +0 -166
  418. package/esm/operations/projects.d.ts.map +0 -1
  419. package/esm/operations/projects.js +0 -230
  420. package/esm/operations/projects.js.map +0 -1
  421. package/esm/operations/resourceSkus.d.ts +0 -48
  422. package/esm/operations/resourceSkus.d.ts.map +0 -1
  423. package/esm/operations/resourceSkus.js +0 -80
  424. package/esm/operations/resourceSkus.js.map +0 -1
  425. package/esm/operations/serviceTasks.d.ts +0 -199
  426. package/esm/operations/serviceTasks.d.ts.map +0 -1
  427. package/esm/operations/serviceTasks.js +0 -265
  428. package/esm/operations/serviceTasks.js.map +0 -1
  429. package/esm/operations/services.d.ts +0 -350
  430. package/esm/operations/services.d.ts.map +0 -1
  431. package/esm/operations/services.js +0 -626
  432. package/esm/operations/services.js.map +0 -1
  433. package/esm/operations/tasks.d.ts +0 -246
  434. package/esm/operations/tasks.d.ts.map +0 -1
  435. package/esm/operations/tasks.js +0 -317
  436. package/esm/operations/tasks.js.map +0 -1
  437. package/esm/operations/usages.d.ts +0 -53
  438. package/esm/operations/usages.d.ts.map +0 -1
  439. package/esm/operations/usages.js +0 -82
  440. package/esm/operations/usages.js.map +0 -1
  441. package/src/dataMigrationServiceClient.ts +0 -56
  442. package/src/dataMigrationServiceClientContext.ts +0 -62
  443. package/src/models/filesMappers.ts +0 -235
  444. package/src/models/operationsMappers.ts +0 -16
  445. package/src/models/projectsMappers.ts +0 -234
  446. package/src/models/resourceSkusMappers.ts +0 -19
  447. package/src/models/serviceTasksMappers.ts +0 -234
  448. package/src/models/servicesMappers.ts +0 -241
  449. package/src/models/tasksMappers.ts +0 -234
  450. package/src/models/usagesMappers.ts +0 -16
@@ -1,886 +1,1118 @@
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/servicesMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { Services } 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 { DataMigrationServiceClientContext } from "../dataMigrationServiceClientContext";
14
+ import { DataMigrationManagementClient } from "../dataMigrationManagementClient";
15
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
+ import { LroImpl } from "../lroImpl";
17
+ import {
18
+ AvailableServiceSku,
19
+ ServicesListSkusNextOptionalParams,
20
+ ServicesListSkusOptionalParams,
21
+ DataMigrationService,
22
+ ServicesListByResourceGroupNextOptionalParams,
23
+ ServicesListByResourceGroupOptionalParams,
24
+ ServicesListNextOptionalParams,
25
+ ServicesListOptionalParams,
26
+ ServicesCreateOrUpdateOptionalParams,
27
+ ServicesCreateOrUpdateResponse,
28
+ ServicesGetOptionalParams,
29
+ ServicesGetResponse,
30
+ ServicesDeleteOptionalParams,
31
+ ServicesUpdateOptionalParams,
32
+ ServicesUpdateResponse,
33
+ ServicesCheckStatusOptionalParams,
34
+ ServicesCheckStatusResponse,
35
+ ServicesStartOptionalParams,
36
+ ServicesStopOptionalParams,
37
+ ServicesListSkusResponse,
38
+ NameAvailabilityRequest,
39
+ ServicesCheckChildrenNameAvailabilityOptionalParams,
40
+ ServicesCheckChildrenNameAvailabilityResponse,
41
+ ServicesListByResourceGroupResponse,
42
+ ServicesListResponse,
43
+ ServicesCheckNameAvailabilityOptionalParams,
44
+ ServicesCheckNameAvailabilityResponse,
45
+ ServicesListSkusNextResponse,
46
+ ServicesListByResourceGroupNextResponse,
47
+ ServicesListNextResponse
48
+ } from "../models";
17
49
 
18
- /** Class representing a Services. */
19
- export class Services {
20
- private readonly client: DataMigrationServiceClientContext;
50
+ /// <reference lib="esnext.asynciterable" />
51
+ /** Class containing Services operations. */
52
+ export class ServicesImpl implements Services {
53
+ private readonly client: DataMigrationManagementClient;
21
54
 
22
55
  /**
23
- * Create a Services.
24
- * @param {DataMigrationServiceClientContext} client Reference to the service client.
56
+ * Initialize a new instance of the class Services class.
57
+ * @param client Reference to the service client
25
58
  */
26
- constructor(client: DataMigrationServiceClientContext) {
59
+ constructor(client: DataMigrationManagementClient) {
27
60
  this.client = client;
28
61
  }
29
62
 
30
63
  /**
31
- * The services resource is the top-level resource that represents the Database Migration Service.
32
- * The PUT method creates a new service or updates an existing one. When a service is updated,
33
- * existing child resources (i.e. tasks) are unaffected. Services currently support a single kind,
34
- * "vm", which refers to a VM-based service, although other kinds may be added in the future. This
35
- * method can change the kind, SKU, and network of the service, but if tasks are currently running
36
- * (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider
37
- * will reply when successful with 200 OK or 201 Created. Long-running operations use the
38
- * provisioningState property.
39
- * @summary Create or update DMS Instance
40
- * @param parameters Information about the service
64
+ * The services resource is the top-level resource that represents the Database Migration Service. The
65
+ * skus action returns the list of SKUs that a service resource can be updated to.
41
66
  * @param groupName Name of the resource group
42
67
  * @param serviceName Name of the service
43
- * @param [options] The optional parameters
44
- * @returns Promise<Models.ServicesCreateOrUpdateResponse>
68
+ * @param options The options parameters.
45
69
  */
46
- createOrUpdate(parameters: Models.DataMigrationService, groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise<Models.ServicesCreateOrUpdateResponse> {
47
- return this.beginCreateOrUpdate(parameters,groupName,serviceName,options)
48
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.ServicesCreateOrUpdateResponse>;
70
+ public listSkus(
71
+ groupName: string,
72
+ serviceName: string,
73
+ options?: ServicesListSkusOptionalParams
74
+ ): PagedAsyncIterableIterator<AvailableServiceSku> {
75
+ const iter = this.listSkusPagingAll(groupName, serviceName, options);
76
+ return {
77
+ next() {
78
+ return iter.next();
79
+ },
80
+ [Symbol.asyncIterator]() {
81
+ return this;
82
+ },
83
+ byPage: () => {
84
+ return this.listSkusPagingPage(groupName, serviceName, options);
85
+ }
86
+ };
49
87
  }
50
88
 
51
- /**
52
- * The services resource is the top-level resource that represents the Database Migration Service.
53
- * The GET method retrieves information about a service instance.
54
- * @summary Get DMS Service Instance
55
- * @param groupName Name of the resource group
56
- * @param serviceName Name of the service
57
- * @param [options] The optional parameters
58
- * @returns Promise<Models.ServicesGetResponse>
59
- */
60
- get(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise<Models.ServicesGetResponse>;
61
- /**
62
- * @param groupName Name of the resource group
63
- * @param serviceName Name of the service
64
- * @param callback The callback
65
- */
66
- get(groupName: string, serviceName: string, callback: msRest.ServiceCallback<Models.DataMigrationService>): void;
67
- /**
68
- * @param groupName Name of the resource group
69
- * @param serviceName Name of the service
70
- * @param options The optional parameters
71
- * @param callback The callback
72
- */
73
- get(groupName: string, serviceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DataMigrationService>): void;
74
- get(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.DataMigrationService>, callback?: msRest.ServiceCallback<Models.DataMigrationService>): Promise<Models.ServicesGetResponse> {
75
- return this.client.sendOperationRequest(
76
- {
89
+ private async *listSkusPagingPage(
90
+ groupName: string,
91
+ serviceName: string,
92
+ options?: ServicesListSkusOptionalParams
93
+ ): AsyncIterableIterator<AvailableServiceSku[]> {
94
+ let result = await this._listSkus(groupName, serviceName, options);
95
+ yield result.value || [];
96
+ let continuationToken = result.nextLink;
97
+ while (continuationToken) {
98
+ result = await this._listSkusNext(
77
99
  groupName,
78
100
  serviceName,
101
+ continuationToken,
79
102
  options
80
- },
81
- getOperationSpec,
82
- callback) as Promise<Models.ServicesGetResponse>;
103
+ );
104
+ continuationToken = result.nextLink;
105
+ yield result.value || [];
106
+ }
83
107
  }
84
108
 
85
- /**
86
- * The services resource is the top-level resource that represents the Database Migration Service.
87
- * The DELETE method deletes a service. Any running tasks will be canceled.
88
- * @summary Delete DMS Service Instance
89
- * @param groupName Name of the resource group
90
- * @param serviceName Name of the service
91
- * @param [options] The optional parameters
92
- * @returns Promise<msRest.RestResponse>
93
- */
94
- deleteMethod(groupName: string, serviceName: string, options?: Models.ServicesDeleteMethodOptionalParams): Promise<msRest.RestResponse> {
95
- return this.beginDeleteMethod(groupName,serviceName,options)
96
- .then(lroPoller => lroPoller.pollUntilFinished());
109
+ private async *listSkusPagingAll(
110
+ groupName: string,
111
+ serviceName: string,
112
+ options?: ServicesListSkusOptionalParams
113
+ ): AsyncIterableIterator<AvailableServiceSku> {
114
+ for await (const page of this.listSkusPagingPage(
115
+ groupName,
116
+ serviceName,
117
+ options
118
+ )) {
119
+ yield* page;
120
+ }
97
121
  }
98
122
 
99
123
  /**
100
- * The services resource is the top-level resource that represents the Database Migration Service.
101
- * The PATCH method updates an existing service. This method can change the kind, SKU, and network
102
- * of the service, but if tasks are currently running (i.e. the service is busy), this will fail
103
- * with 400 Bad Request ("ServiceIsBusy").
104
- * @summary Create or update DMS Service Instance
105
- * @param parameters Information about the service
124
+ * The Services resource is the top-level resource that represents the Database Migration Service. This
125
+ * method returns a list of service resources in a resource group.
106
126
  * @param groupName Name of the resource group
107
- * @param serviceName Name of the service
108
- * @param [options] The optional parameters
109
- * @returns Promise<Models.ServicesUpdateResponse>
127
+ * @param options The options parameters.
110
128
  */
111
- update(parameters: Models.DataMigrationService, groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise<Models.ServicesUpdateResponse> {
112
- return this.beginUpdate(parameters,groupName,serviceName,options)
113
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.ServicesUpdateResponse>;
129
+ public listByResourceGroup(
130
+ groupName: string,
131
+ options?: ServicesListByResourceGroupOptionalParams
132
+ ): PagedAsyncIterableIterator<DataMigrationService> {
133
+ const iter = this.listByResourceGroupPagingAll(groupName, options);
134
+ return {
135
+ next() {
136
+ return iter.next();
137
+ },
138
+ [Symbol.asyncIterator]() {
139
+ return this;
140
+ },
141
+ byPage: () => {
142
+ return this.listByResourceGroupPagingPage(groupName, options);
143
+ }
144
+ };
114
145
  }
115
146
 
116
- /**
117
- * The services resource is the top-level resource that represents the Database Migration Service.
118
- * This action performs a health check and returns the status of the service and virtual machine
119
- * size.
120
- * @summary Check service health status
121
- * @param groupName Name of the resource group
122
- * @param serviceName Name of the service
123
- * @param [options] The optional parameters
124
- * @returns Promise<Models.ServicesCheckStatusResponse>
125
- */
126
- checkStatus(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise<Models.ServicesCheckStatusResponse>;
127
- /**
128
- * @param groupName Name of the resource group
129
- * @param serviceName Name of the service
130
- * @param callback The callback
131
- */
132
- checkStatus(groupName: string, serviceName: string, callback: msRest.ServiceCallback<Models.DataMigrationServiceStatusResponse>): void;
133
- /**
134
- * @param groupName Name of the resource group
135
- * @param serviceName Name of the service
136
- * @param options The optional parameters
137
- * @param callback The callback
138
- */
139
- checkStatus(groupName: string, serviceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DataMigrationServiceStatusResponse>): void;
140
- checkStatus(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.DataMigrationServiceStatusResponse>, callback?: msRest.ServiceCallback<Models.DataMigrationServiceStatusResponse>): Promise<Models.ServicesCheckStatusResponse> {
141
- return this.client.sendOperationRequest(
142
- {
147
+ private async *listByResourceGroupPagingPage(
148
+ groupName: string,
149
+ options?: ServicesListByResourceGroupOptionalParams
150
+ ): AsyncIterableIterator<DataMigrationService[]> {
151
+ let result = await this._listByResourceGroup(groupName, options);
152
+ yield result.value || [];
153
+ let continuationToken = result.nextLink;
154
+ while (continuationToken) {
155
+ result = await this._listByResourceGroupNext(
143
156
  groupName,
144
- serviceName,
157
+ continuationToken,
145
158
  options
146
- },
147
- checkStatusOperationSpec,
148
- callback) as Promise<Models.ServicesCheckStatusResponse>;
159
+ );
160
+ continuationToken = result.nextLink;
161
+ yield result.value || [];
162
+ }
149
163
  }
150
164
 
151
- /**
152
- * The services resource is the top-level resource that represents the Database Migration Service.
153
- * This action starts the service and the service can be used for data migration.
154
- * @summary Start service
155
- * @param groupName Name of the resource group
156
- * @param serviceName Name of the service
157
- * @param [options] The optional parameters
158
- * @returns Promise<msRest.RestResponse>
159
- */
160
- start(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse> {
161
- return this.beginStart(groupName,serviceName,options)
162
- .then(lroPoller => lroPoller.pollUntilFinished());
165
+ private async *listByResourceGroupPagingAll(
166
+ groupName: string,
167
+ options?: ServicesListByResourceGroupOptionalParams
168
+ ): AsyncIterableIterator<DataMigrationService> {
169
+ for await (const page of this.listByResourceGroupPagingPage(
170
+ groupName,
171
+ options
172
+ )) {
173
+ yield* page;
174
+ }
163
175
  }
164
176
 
165
177
  /**
166
- * The services resource is the top-level resource that represents the Database Migration Service.
167
- * This action stops the service and the service cannot be used for data migration. The service
168
- * owner won't be billed when the service is stopped.
169
- * @summary Stop service
170
- * @param groupName Name of the resource group
171
- * @param serviceName Name of the service
172
- * @param [options] The optional parameters
173
- * @returns Promise<msRest.RestResponse>
178
+ * The services resource is the top-level resource that represents the Database Migration Service. This
179
+ * method returns a list of service resources in a subscription.
180
+ * @param options The options parameters.
174
181
  */
175
- stop(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse> {
176
- return this.beginStop(groupName,serviceName,options)
177
- .then(lroPoller => lroPoller.pollUntilFinished());
182
+ public list(
183
+ options?: ServicesListOptionalParams
184
+ ): PagedAsyncIterableIterator<DataMigrationService> {
185
+ const iter = this.listPagingAll(options);
186
+ return {
187
+ next() {
188
+ return iter.next();
189
+ },
190
+ [Symbol.asyncIterator]() {
191
+ return this;
192
+ },
193
+ byPage: () => {
194
+ return this.listPagingPage(options);
195
+ }
196
+ };
197
+ }
198
+
199
+ private async *listPagingPage(
200
+ options?: ServicesListOptionalParams
201
+ ): AsyncIterableIterator<DataMigrationService[]> {
202
+ let result = await this._list(options);
203
+ yield result.value || [];
204
+ let continuationToken = result.nextLink;
205
+ while (continuationToken) {
206
+ result = await this._listNext(continuationToken, options);
207
+ continuationToken = result.nextLink;
208
+ yield result.value || [];
209
+ }
210
+ }
211
+
212
+ private async *listPagingAll(
213
+ options?: ServicesListOptionalParams
214
+ ): AsyncIterableIterator<DataMigrationService> {
215
+ for await (const page of this.listPagingPage(options)) {
216
+ yield* page;
217
+ }
178
218
  }
179
219
 
180
220
  /**
181
- * The services resource is the top-level resource that represents the Database Migration Service.
182
- * The skus action returns the list of SKUs that a service resource can be updated to.
183
- * @summary Get compatible SKUs
221
+ * The services resource is the top-level resource that represents the Database Migration Service. The
222
+ * PUT method creates a new service or updates an existing one. When a service is updated, existing
223
+ * child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which
224
+ * refers to a VM-based service, although other kinds may be added in the future. This method can
225
+ * change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the
226
+ * service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply
227
+ * when successful with 200 OK or 201 Created. Long-running operations use the provisioningState
228
+ * property.
184
229
  * @param groupName Name of the resource group
185
230
  * @param serviceName Name of the service
186
- * @param [options] The optional parameters
187
- * @returns Promise<Models.ServicesListSkusResponse>
231
+ * @param parameters Information about the service
232
+ * @param options The options parameters.
188
233
  */
189
- listSkus(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise<Models.ServicesListSkusResponse>;
234
+ async beginCreateOrUpdate(
235
+ groupName: string,
236
+ serviceName: string,
237
+ parameters: DataMigrationService,
238
+ options?: ServicesCreateOrUpdateOptionalParams
239
+ ): Promise<
240
+ PollerLike<
241
+ PollOperationState<ServicesCreateOrUpdateResponse>,
242
+ ServicesCreateOrUpdateResponse
243
+ >
244
+ > {
245
+ const directSendOperation = async (
246
+ args: coreClient.OperationArguments,
247
+ spec: coreClient.OperationSpec
248
+ ): Promise<ServicesCreateOrUpdateResponse> => {
249
+ return this.client.sendOperationRequest(args, spec);
250
+ };
251
+ const sendOperation = async (
252
+ args: coreClient.OperationArguments,
253
+ spec: coreClient.OperationSpec
254
+ ) => {
255
+ let currentRawResponse:
256
+ | coreClient.FullOperationResponse
257
+ | undefined = undefined;
258
+ const providedCallback = args.options?.onResponse;
259
+ const callback: coreClient.RawResponseCallback = (
260
+ rawResponse: coreClient.FullOperationResponse,
261
+ flatResponse: unknown
262
+ ) => {
263
+ currentRawResponse = rawResponse;
264
+ providedCallback?.(rawResponse, flatResponse);
265
+ };
266
+ const updatedArgs = {
267
+ ...args,
268
+ options: {
269
+ ...args.options,
270
+ onResponse: callback
271
+ }
272
+ };
273
+ const flatResponse = await directSendOperation(updatedArgs, spec);
274
+ return {
275
+ flatResponse,
276
+ rawResponse: {
277
+ statusCode: currentRawResponse!.status,
278
+ body: currentRawResponse!.parsedBody,
279
+ headers: currentRawResponse!.headers.toJSON()
280
+ }
281
+ };
282
+ };
283
+
284
+ const lro = new LroImpl(
285
+ sendOperation,
286
+ { groupName, serviceName, parameters, options },
287
+ createOrUpdateOperationSpec
288
+ );
289
+ return new LroEngine(lro, {
290
+ resumeFrom: options?.resumeFrom,
291
+ intervalInMs: options?.updateIntervalInMs
292
+ });
293
+ }
294
+
190
295
  /**
296
+ * The services resource is the top-level resource that represents the Database Migration Service. The
297
+ * PUT method creates a new service or updates an existing one. When a service is updated, existing
298
+ * child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which
299
+ * refers to a VM-based service, although other kinds may be added in the future. This method can
300
+ * change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the
301
+ * service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply
302
+ * when successful with 200 OK or 201 Created. Long-running operations use the provisioningState
303
+ * property.
191
304
  * @param groupName Name of the resource group
192
305
  * @param serviceName Name of the service
193
- * @param callback The callback
306
+ * @param parameters Information about the service
307
+ * @param options The options parameters.
194
308
  */
195
- listSkus(groupName: string, serviceName: string, callback: msRest.ServiceCallback<Models.ServiceSkuList>): void;
309
+ async beginCreateOrUpdateAndWait(
310
+ groupName: string,
311
+ serviceName: string,
312
+ parameters: DataMigrationService,
313
+ options?: ServicesCreateOrUpdateOptionalParams
314
+ ): Promise<ServicesCreateOrUpdateResponse> {
315
+ const poller = await this.beginCreateOrUpdate(
316
+ groupName,
317
+ serviceName,
318
+ parameters,
319
+ options
320
+ );
321
+ return poller.pollUntilDone();
322
+ }
323
+
196
324
  /**
325
+ * The services resource is the top-level resource that represents the Database Migration Service. The
326
+ * GET method retrieves information about a service instance.
197
327
  * @param groupName Name of the resource group
198
328
  * @param serviceName Name of the service
199
- * @param options The optional parameters
200
- * @param callback The callback
329
+ * @param options The options parameters.
201
330
  */
202
- listSkus(groupName: string, serviceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ServiceSkuList>): void;
203
- listSkus(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ServiceSkuList>, callback?: msRest.ServiceCallback<Models.ServiceSkuList>): Promise<Models.ServicesListSkusResponse> {
331
+ get(
332
+ groupName: string,
333
+ serviceName: string,
334
+ options?: ServicesGetOptionalParams
335
+ ): Promise<ServicesGetResponse> {
204
336
  return this.client.sendOperationRequest(
205
- {
206
- groupName,
207
- serviceName,
208
- options
209
- },
210
- listSkusOperationSpec,
211
- callback) as Promise<Models.ServicesListSkusResponse>;
337
+ { groupName, serviceName, options },
338
+ getOperationSpec
339
+ );
212
340
  }
213
341
 
214
342
  /**
215
- * This method checks whether a proposed nested resource name is valid and available.
216
- * @summary Check nested resource name validity and availability
343
+ * The services resource is the top-level resource that represents the Database Migration Service. The
344
+ * DELETE method deletes a service. Any running tasks will be canceled.
217
345
  * @param groupName Name of the resource group
218
346
  * @param serviceName Name of the service
219
- * @param parameters Requested name to validate
220
- * @param [options] The optional parameters
221
- * @returns Promise<Models.ServicesCheckChildrenNameAvailabilityResponse>
347
+ * @param options The options parameters.
222
348
  */
223
- checkChildrenNameAvailability(groupName: string, serviceName: string, parameters: Models.NameAvailabilityRequest, options?: msRest.RequestOptionsBase): Promise<Models.ServicesCheckChildrenNameAvailabilityResponse>;
349
+ async beginDelete(
350
+ groupName: string,
351
+ serviceName: string,
352
+ options?: ServicesDeleteOptionalParams
353
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
354
+ const directSendOperation = async (
355
+ args: coreClient.OperationArguments,
356
+ spec: coreClient.OperationSpec
357
+ ): Promise<void> => {
358
+ return this.client.sendOperationRequest(args, spec);
359
+ };
360
+ const sendOperation = async (
361
+ args: coreClient.OperationArguments,
362
+ spec: coreClient.OperationSpec
363
+ ) => {
364
+ let currentRawResponse:
365
+ | coreClient.FullOperationResponse
366
+ | undefined = undefined;
367
+ const providedCallback = args.options?.onResponse;
368
+ const callback: coreClient.RawResponseCallback = (
369
+ rawResponse: coreClient.FullOperationResponse,
370
+ flatResponse: unknown
371
+ ) => {
372
+ currentRawResponse = rawResponse;
373
+ providedCallback?.(rawResponse, flatResponse);
374
+ };
375
+ const updatedArgs = {
376
+ ...args,
377
+ options: {
378
+ ...args.options,
379
+ onResponse: callback
380
+ }
381
+ };
382
+ const flatResponse = await directSendOperation(updatedArgs, spec);
383
+ return {
384
+ flatResponse,
385
+ rawResponse: {
386
+ statusCode: currentRawResponse!.status,
387
+ body: currentRawResponse!.parsedBody,
388
+ headers: currentRawResponse!.headers.toJSON()
389
+ }
390
+ };
391
+ };
392
+
393
+ const lro = new LroImpl(
394
+ sendOperation,
395
+ { groupName, serviceName, options },
396
+ deleteOperationSpec
397
+ );
398
+ return new LroEngine(lro, {
399
+ resumeFrom: options?.resumeFrom,
400
+ intervalInMs: options?.updateIntervalInMs
401
+ });
402
+ }
403
+
224
404
  /**
405
+ * The services resource is the top-level resource that represents the Database Migration Service. The
406
+ * DELETE method deletes a service. Any running tasks will be canceled.
225
407
  * @param groupName Name of the resource group
226
408
  * @param serviceName Name of the service
227
- * @param parameters Requested name to validate
228
- * @param callback The callback
409
+ * @param options The options parameters.
229
410
  */
230
- checkChildrenNameAvailability(groupName: string, serviceName: string, parameters: Models.NameAvailabilityRequest, callback: msRest.ServiceCallback<Models.NameAvailabilityResponse>): void;
411
+ async beginDeleteAndWait(
412
+ groupName: string,
413
+ serviceName: string,
414
+ options?: ServicesDeleteOptionalParams
415
+ ): Promise<void> {
416
+ const poller = await this.beginDelete(groupName, serviceName, options);
417
+ return poller.pollUntilDone();
418
+ }
419
+
231
420
  /**
421
+ * The services resource is the top-level resource that represents the Database Migration Service. The
422
+ * PATCH method updates an existing service. This method can change the kind, SKU, and network of the
423
+ * service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad
424
+ * Request ("ServiceIsBusy").
232
425
  * @param groupName Name of the resource group
233
426
  * @param serviceName Name of the service
234
- * @param parameters Requested name to validate
235
- * @param options The optional parameters
236
- * @param callback The callback
427
+ * @param parameters Information about the service
428
+ * @param options The options parameters.
237
429
  */
238
- checkChildrenNameAvailability(groupName: string, serviceName: string, parameters: Models.NameAvailabilityRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.NameAvailabilityResponse>): void;
239
- checkChildrenNameAvailability(groupName: string, serviceName: string, parameters: Models.NameAvailabilityRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.NameAvailabilityResponse>, callback?: msRest.ServiceCallback<Models.NameAvailabilityResponse>): Promise<Models.ServicesCheckChildrenNameAvailabilityResponse> {
240
- return this.client.sendOperationRequest(
241
- {
242
- groupName,
243
- serviceName,
244
- parameters,
245
- options
246
- },
247
- checkChildrenNameAvailabilityOperationSpec,
248
- callback) as Promise<Models.ServicesCheckChildrenNameAvailabilityResponse>;
430
+ async beginUpdate(
431
+ groupName: string,
432
+ serviceName: string,
433
+ parameters: DataMigrationService,
434
+ options?: ServicesUpdateOptionalParams
435
+ ): Promise<
436
+ PollerLike<
437
+ PollOperationState<ServicesUpdateResponse>,
438
+ ServicesUpdateResponse
439
+ >
440
+ > {
441
+ const directSendOperation = async (
442
+ args: coreClient.OperationArguments,
443
+ spec: coreClient.OperationSpec
444
+ ): Promise<ServicesUpdateResponse> => {
445
+ return this.client.sendOperationRequest(args, spec);
446
+ };
447
+ const sendOperation = async (
448
+ args: coreClient.OperationArguments,
449
+ spec: coreClient.OperationSpec
450
+ ) => {
451
+ let currentRawResponse:
452
+ | coreClient.FullOperationResponse
453
+ | undefined = undefined;
454
+ const providedCallback = args.options?.onResponse;
455
+ const callback: coreClient.RawResponseCallback = (
456
+ rawResponse: coreClient.FullOperationResponse,
457
+ flatResponse: unknown
458
+ ) => {
459
+ currentRawResponse = rawResponse;
460
+ providedCallback?.(rawResponse, flatResponse);
461
+ };
462
+ const updatedArgs = {
463
+ ...args,
464
+ options: {
465
+ ...args.options,
466
+ onResponse: callback
467
+ }
468
+ };
469
+ const flatResponse = await directSendOperation(updatedArgs, spec);
470
+ return {
471
+ flatResponse,
472
+ rawResponse: {
473
+ statusCode: currentRawResponse!.status,
474
+ body: currentRawResponse!.parsedBody,
475
+ headers: currentRawResponse!.headers.toJSON()
476
+ }
477
+ };
478
+ };
479
+
480
+ const lro = new LroImpl(
481
+ sendOperation,
482
+ { groupName, serviceName, parameters, options },
483
+ updateOperationSpec
484
+ );
485
+ return new LroEngine(lro, {
486
+ resumeFrom: options?.resumeFrom,
487
+ intervalInMs: options?.updateIntervalInMs
488
+ });
249
489
  }
250
490
 
251
491
  /**
252
- * The Services resource is the top-level resource that represents the Database Migration Service.
253
- * This method returns a list of service resources in a resource group.
254
- * @summary Get services in resource group
255
- * @param groupName Name of the resource group
256
- * @param [options] The optional parameters
257
- * @returns Promise<Models.ServicesListByResourceGroupResponse>
258
- */
259
- listByResourceGroup(groupName: string, options?: msRest.RequestOptionsBase): Promise<Models.ServicesListByResourceGroupResponse>;
260
- /**
492
+ * The services resource is the top-level resource that represents the Database Migration Service. The
493
+ * PATCH method updates an existing service. This method can change the kind, SKU, and network of the
494
+ * service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad
495
+ * Request ("ServiceIsBusy").
261
496
  * @param groupName Name of the resource group
262
- * @param callback The callback
263
- */
264
- listByResourceGroup(groupName: string, callback: msRest.ServiceCallback<Models.DataMigrationServiceList>): void;
265
- /**
266
- * @param groupName Name of the resource group
267
- * @param options The optional parameters
268
- * @param callback The callback
497
+ * @param serviceName Name of the service
498
+ * @param parameters Information about the service
499
+ * @param options The options parameters.
269
500
  */
270
- listByResourceGroup(groupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DataMigrationServiceList>): void;
271
- listByResourceGroup(groupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.DataMigrationServiceList>, callback?: msRest.ServiceCallback<Models.DataMigrationServiceList>): Promise<Models.ServicesListByResourceGroupResponse> {
272
- return this.client.sendOperationRequest(
273
- {
274
- groupName,
275
- options
276
- },
277
- listByResourceGroupOperationSpec,
278
- callback) as Promise<Models.ServicesListByResourceGroupResponse>;
501
+ async beginUpdateAndWait(
502
+ groupName: string,
503
+ serviceName: string,
504
+ parameters: DataMigrationService,
505
+ options?: ServicesUpdateOptionalParams
506
+ ): Promise<ServicesUpdateResponse> {
507
+ const poller = await this.beginUpdate(
508
+ groupName,
509
+ serviceName,
510
+ parameters,
511
+ options
512
+ );
513
+ return poller.pollUntilDone();
279
514
  }
280
515
 
281
516
  /**
282
- * The services resource is the top-level resource that represents the Database Migration Service.
283
- * This method returns a list of service resources in a subscription.
284
- * @summary Get services in subscription
285
- * @param [options] The optional parameters
286
- * @returns Promise<Models.ServicesListResponse>
287
- */
288
- list(options?: msRest.RequestOptionsBase): Promise<Models.ServicesListResponse>;
289
- /**
290
- * @param callback The callback
291
- */
292
- list(callback: msRest.ServiceCallback<Models.DataMigrationServiceList>): void;
293
- /**
294
- * @param options The optional parameters
295
- * @param callback The callback
517
+ * The services resource is the top-level resource that represents the Database Migration Service. This
518
+ * action performs a health check and returns the status of the service and virtual machine size.
519
+ * @param groupName Name of the resource group
520
+ * @param serviceName Name of the service
521
+ * @param options The options parameters.
296
522
  */
297
- list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DataMigrationServiceList>): void;
298
- list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.DataMigrationServiceList>, callback?: msRest.ServiceCallback<Models.DataMigrationServiceList>): Promise<Models.ServicesListResponse> {
523
+ checkStatus(
524
+ groupName: string,
525
+ serviceName: string,
526
+ options?: ServicesCheckStatusOptionalParams
527
+ ): Promise<ServicesCheckStatusResponse> {
299
528
  return this.client.sendOperationRequest(
300
- {
301
- options
302
- },
303
- listOperationSpec,
304
- callback) as Promise<Models.ServicesListResponse>;
529
+ { groupName, serviceName, options },
530
+ checkStatusOperationSpec
531
+ );
305
532
  }
306
533
 
307
534
  /**
308
- * This method checks whether a proposed top-level resource name is valid and available.
309
- * @summary Check name validity and availability
310
- * @param location The Azure region of the operation
311
- * @param parameters Requested name to validate
312
- * @param [options] The optional parameters
313
- * @returns Promise<Models.ServicesCheckNameAvailabilityResponse>
314
- */
315
- checkNameAvailability(location: string, parameters: Models.NameAvailabilityRequest, options?: msRest.RequestOptionsBase): Promise<Models.ServicesCheckNameAvailabilityResponse>;
316
- /**
317
- * @param location The Azure region of the operation
318
- * @param parameters Requested name to validate
319
- * @param callback The callback
320
- */
321
- checkNameAvailability(location: string, parameters: Models.NameAvailabilityRequest, callback: msRest.ServiceCallback<Models.NameAvailabilityResponse>): void;
322
- /**
323
- * @param location The Azure region of the operation
324
- * @param parameters Requested name to validate
325
- * @param options The optional parameters
326
- * @param callback The callback
535
+ * The services resource is the top-level resource that represents the Database Migration Service. This
536
+ * action starts the service and the service can be used for data migration.
537
+ * @param groupName Name of the resource group
538
+ * @param serviceName Name of the service
539
+ * @param options The options parameters.
327
540
  */
328
- checkNameAvailability(location: string, parameters: Models.NameAvailabilityRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.NameAvailabilityResponse>): void;
329
- checkNameAvailability(location: string, parameters: Models.NameAvailabilityRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.NameAvailabilityResponse>, callback?: msRest.ServiceCallback<Models.NameAvailabilityResponse>): Promise<Models.ServicesCheckNameAvailabilityResponse> {
330
- return this.client.sendOperationRequest(
331
- {
332
- location,
333
- parameters,
334
- options
335
- },
336
- checkNameAvailabilityOperationSpec,
337
- callback) as Promise<Models.ServicesCheckNameAvailabilityResponse>;
541
+ async beginStart(
542
+ groupName: string,
543
+ serviceName: string,
544
+ options?: ServicesStartOptionalParams
545
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
546
+ const directSendOperation = async (
547
+ args: coreClient.OperationArguments,
548
+ spec: coreClient.OperationSpec
549
+ ): Promise<void> => {
550
+ return this.client.sendOperationRequest(args, spec);
551
+ };
552
+ const sendOperation = async (
553
+ args: coreClient.OperationArguments,
554
+ spec: coreClient.OperationSpec
555
+ ) => {
556
+ let currentRawResponse:
557
+ | coreClient.FullOperationResponse
558
+ | undefined = undefined;
559
+ const providedCallback = args.options?.onResponse;
560
+ const callback: coreClient.RawResponseCallback = (
561
+ rawResponse: coreClient.FullOperationResponse,
562
+ flatResponse: unknown
563
+ ) => {
564
+ currentRawResponse = rawResponse;
565
+ providedCallback?.(rawResponse, flatResponse);
566
+ };
567
+ const updatedArgs = {
568
+ ...args,
569
+ options: {
570
+ ...args.options,
571
+ onResponse: callback
572
+ }
573
+ };
574
+ const flatResponse = await directSendOperation(updatedArgs, spec);
575
+ return {
576
+ flatResponse,
577
+ rawResponse: {
578
+ statusCode: currentRawResponse!.status,
579
+ body: currentRawResponse!.parsedBody,
580
+ headers: currentRawResponse!.headers.toJSON()
581
+ }
582
+ };
583
+ };
584
+
585
+ const lro = new LroImpl(
586
+ sendOperation,
587
+ { groupName, serviceName, options },
588
+ startOperationSpec
589
+ );
590
+ return new LroEngine(lro, {
591
+ resumeFrom: options?.resumeFrom,
592
+ intervalInMs: options?.updateIntervalInMs
593
+ });
338
594
  }
339
595
 
340
596
  /**
341
- * The services resource is the top-level resource that represents the Database Migration Service.
342
- * The PUT method creates a new service or updates an existing one. When a service is updated,
343
- * existing child resources (i.e. tasks) are unaffected. Services currently support a single kind,
344
- * "vm", which refers to a VM-based service, although other kinds may be added in the future. This
345
- * method can change the kind, SKU, and network of the service, but if tasks are currently running
346
- * (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider
347
- * will reply when successful with 200 OK or 201 Created. Long-running operations use the
348
- * provisioningState property.
349
- * @summary Create or update DMS Instance
350
- * @param parameters Information about the service
597
+ * The services resource is the top-level resource that represents the Database Migration Service. This
598
+ * action starts the service and the service can be used for data migration.
351
599
  * @param groupName Name of the resource group
352
600
  * @param serviceName Name of the service
353
- * @param [options] The optional parameters
354
- * @returns Promise<msRestAzure.LROPoller>
601
+ * @param options The options parameters.
355
602
  */
356
- beginCreateOrUpdate(parameters: Models.DataMigrationService, groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
357
- return this.client.sendLRORequest(
358
- {
359
- parameters,
360
- groupName,
361
- serviceName,
362
- options
363
- },
364
- beginCreateOrUpdateOperationSpec,
365
- options);
603
+ async beginStartAndWait(
604
+ groupName: string,
605
+ serviceName: string,
606
+ options?: ServicesStartOptionalParams
607
+ ): Promise<void> {
608
+ const poller = await this.beginStart(groupName, serviceName, options);
609
+ return poller.pollUntilDone();
366
610
  }
367
611
 
368
612
  /**
369
- * The services resource is the top-level resource that represents the Database Migration Service.
370
- * The DELETE method deletes a service. Any running tasks will be canceled.
371
- * @summary Delete DMS Service Instance
613
+ * The services resource is the top-level resource that represents the Database Migration Service. This
614
+ * action stops the service and the service cannot be used for data migration. The service owner won't
615
+ * be billed when the service is stopped.
372
616
  * @param groupName Name of the resource group
373
617
  * @param serviceName Name of the service
374
- * @param [options] The optional parameters
375
- * @returns Promise<msRestAzure.LROPoller>
618
+ * @param options The options parameters.
376
619
  */
377
- beginDeleteMethod(groupName: string, serviceName: string, options?: Models.ServicesBeginDeleteMethodOptionalParams): Promise<msRestAzure.LROPoller> {
378
- return this.client.sendLRORequest(
379
- {
380
- groupName,
381
- serviceName,
382
- options
383
- },
384
- beginDeleteMethodOperationSpec,
385
- options);
620
+ async beginStop(
621
+ groupName: string,
622
+ serviceName: string,
623
+ options?: ServicesStopOptionalParams
624
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
625
+ const directSendOperation = async (
626
+ args: coreClient.OperationArguments,
627
+ spec: coreClient.OperationSpec
628
+ ): Promise<void> => {
629
+ return this.client.sendOperationRequest(args, spec);
630
+ };
631
+ const sendOperation = async (
632
+ args: coreClient.OperationArguments,
633
+ spec: coreClient.OperationSpec
634
+ ) => {
635
+ let currentRawResponse:
636
+ | coreClient.FullOperationResponse
637
+ | undefined = undefined;
638
+ const providedCallback = args.options?.onResponse;
639
+ const callback: coreClient.RawResponseCallback = (
640
+ rawResponse: coreClient.FullOperationResponse,
641
+ flatResponse: unknown
642
+ ) => {
643
+ currentRawResponse = rawResponse;
644
+ providedCallback?.(rawResponse, flatResponse);
645
+ };
646
+ const updatedArgs = {
647
+ ...args,
648
+ options: {
649
+ ...args.options,
650
+ onResponse: callback
651
+ }
652
+ };
653
+ const flatResponse = await directSendOperation(updatedArgs, spec);
654
+ return {
655
+ flatResponse,
656
+ rawResponse: {
657
+ statusCode: currentRawResponse!.status,
658
+ body: currentRawResponse!.parsedBody,
659
+ headers: currentRawResponse!.headers.toJSON()
660
+ }
661
+ };
662
+ };
663
+
664
+ const lro = new LroImpl(
665
+ sendOperation,
666
+ { groupName, serviceName, options },
667
+ stopOperationSpec
668
+ );
669
+ return new LroEngine(lro, {
670
+ resumeFrom: options?.resumeFrom,
671
+ intervalInMs: options?.updateIntervalInMs
672
+ });
386
673
  }
387
674
 
388
675
  /**
389
- * The services resource is the top-level resource that represents the Database Migration Service.
390
- * The PATCH method updates an existing service. This method can change the kind, SKU, and network
391
- * of the service, but if tasks are currently running (i.e. the service is busy), this will fail
392
- * with 400 Bad Request ("ServiceIsBusy").
393
- * @summary Create or update DMS Service Instance
394
- * @param parameters Information about the service
676
+ * The services resource is the top-level resource that represents the Database Migration Service. This
677
+ * action stops the service and the service cannot be used for data migration. The service owner won't
678
+ * be billed when the service is stopped.
395
679
  * @param groupName Name of the resource group
396
680
  * @param serviceName Name of the service
397
- * @param [options] The optional parameters
398
- * @returns Promise<msRestAzure.LROPoller>
681
+ * @param options The options parameters.
399
682
  */
400
- beginUpdate(parameters: Models.DataMigrationService, groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
401
- return this.client.sendLRORequest(
402
- {
403
- parameters,
404
- groupName,
405
- serviceName,
406
- options
407
- },
408
- beginUpdateOperationSpec,
409
- options);
683
+ async beginStopAndWait(
684
+ groupName: string,
685
+ serviceName: string,
686
+ options?: ServicesStopOptionalParams
687
+ ): Promise<void> {
688
+ const poller = await this.beginStop(groupName, serviceName, options);
689
+ return poller.pollUntilDone();
410
690
  }
411
691
 
412
692
  /**
413
- * The services resource is the top-level resource that represents the Database Migration Service.
414
- * This action starts the service and the service can be used for data migration.
415
- * @summary Start service
693
+ * The services resource is the top-level resource that represents the Database Migration Service. The
694
+ * skus action returns the list of SKUs that a service resource can be updated to.
416
695
  * @param groupName Name of the resource group
417
696
  * @param serviceName Name of the service
418
- * @param [options] The optional parameters
419
- * @returns Promise<msRestAzure.LROPoller>
697
+ * @param options The options parameters.
420
698
  */
421
- beginStart(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
422
- return this.client.sendLRORequest(
423
- {
424
- groupName,
425
- serviceName,
426
- options
427
- },
428
- beginStartOperationSpec,
429
- options);
699
+ private _listSkus(
700
+ groupName: string,
701
+ serviceName: string,
702
+ options?: ServicesListSkusOptionalParams
703
+ ): Promise<ServicesListSkusResponse> {
704
+ return this.client.sendOperationRequest(
705
+ { groupName, serviceName, options },
706
+ listSkusOperationSpec
707
+ );
430
708
  }
431
709
 
432
710
  /**
433
- * The services resource is the top-level resource that represents the Database Migration Service.
434
- * This action stops the service and the service cannot be used for data migration. The service
435
- * owner won't be billed when the service is stopped.
436
- * @summary Stop service
711
+ * This method checks whether a proposed nested resource name is valid and available.
437
712
  * @param groupName Name of the resource group
438
713
  * @param serviceName Name of the service
439
- * @param [options] The optional parameters
440
- * @returns Promise<msRestAzure.LROPoller>
714
+ * @param parameters Requested name to validate
715
+ * @param options The options parameters.
441
716
  */
442
- beginStop(groupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
443
- return this.client.sendLRORequest(
444
- {
445
- groupName,
446
- serviceName,
447
- options
448
- },
449
- beginStopOperationSpec,
450
- options);
717
+ checkChildrenNameAvailability(
718
+ groupName: string,
719
+ serviceName: string,
720
+ parameters: NameAvailabilityRequest,
721
+ options?: ServicesCheckChildrenNameAvailabilityOptionalParams
722
+ ): Promise<ServicesCheckChildrenNameAvailabilityResponse> {
723
+ return this.client.sendOperationRequest(
724
+ { groupName, serviceName, parameters, options },
725
+ checkChildrenNameAvailabilityOperationSpec
726
+ );
451
727
  }
452
728
 
453
729
  /**
454
- * The services resource is the top-level resource that represents the Database Migration Service.
455
- * The skus action returns the list of SKUs that a service resource can be updated to.
456
- * @summary Get compatible SKUs
457
- * @param nextPageLink The NextLink from the previous successful call to List operation.
458
- * @param [options] The optional parameters
459
- * @returns Promise<Models.ServicesListSkusNextResponse>
460
- */
461
- listSkusNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.ServicesListSkusNextResponse>;
462
- /**
463
- * @param nextPageLink The NextLink from the previous successful call to List operation.
464
- * @param callback The callback
465
- */
466
- listSkusNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.ServiceSkuList>): void;
467
- /**
468
- * @param nextPageLink The NextLink from the previous successful call to List operation.
469
- * @param options The optional parameters
470
- * @param callback The callback
730
+ * The Services resource is the top-level resource that represents the Database Migration Service. This
731
+ * method returns a list of service resources in a resource group.
732
+ * @param groupName Name of the resource group
733
+ * @param options The options parameters.
471
734
  */
472
- listSkusNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ServiceSkuList>): void;
473
- listSkusNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ServiceSkuList>, callback?: msRest.ServiceCallback<Models.ServiceSkuList>): Promise<Models.ServicesListSkusNextResponse> {
735
+ private _listByResourceGroup(
736
+ groupName: string,
737
+ options?: ServicesListByResourceGroupOptionalParams
738
+ ): Promise<ServicesListByResourceGroupResponse> {
474
739
  return this.client.sendOperationRequest(
475
- {
476
- nextPageLink,
477
- options
478
- },
479
- listSkusNextOperationSpec,
480
- callback) as Promise<Models.ServicesListSkusNextResponse>;
740
+ { groupName, options },
741
+ listByResourceGroupOperationSpec
742
+ );
481
743
  }
482
744
 
483
745
  /**
484
- * The Services resource is the top-level resource that represents the Database Migration Service.
485
- * This method returns a list of service resources in a resource group.
486
- * @summary Get services in resource group
487
- * @param nextPageLink The NextLink from the previous successful call to List operation.
488
- * @param [options] The optional parameters
489
- * @returns Promise<Models.ServicesListByResourceGroupNextResponse>
490
- */
491
- listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.ServicesListByResourceGroupNextResponse>;
492
- /**
493
- * @param nextPageLink The NextLink from the previous successful call to List operation.
494
- * @param callback The callback
746
+ * The services resource is the top-level resource that represents the Database Migration Service. This
747
+ * method returns a list of service resources in a subscription.
748
+ * @param options The options parameters.
495
749
  */
496
- listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.DataMigrationServiceList>): void;
750
+ private _list(
751
+ options?: ServicesListOptionalParams
752
+ ): Promise<ServicesListResponse> {
753
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
754
+ }
755
+
497
756
  /**
498
- * @param nextPageLink The NextLink from the previous successful call to List operation.
499
- * @param options The optional parameters
500
- * @param callback The callback
757
+ * This method checks whether a proposed top-level resource name is valid and available.
758
+ * @param location The Azure region of the operation
759
+ * @param parameters Requested name to validate
760
+ * @param options The options parameters.
501
761
  */
502
- listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DataMigrationServiceList>): void;
503
- listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.DataMigrationServiceList>, callback?: msRest.ServiceCallback<Models.DataMigrationServiceList>): Promise<Models.ServicesListByResourceGroupNextResponse> {
762
+ checkNameAvailability(
763
+ location: string,
764
+ parameters: NameAvailabilityRequest,
765
+ options?: ServicesCheckNameAvailabilityOptionalParams
766
+ ): Promise<ServicesCheckNameAvailabilityResponse> {
504
767
  return this.client.sendOperationRequest(
505
- {
506
- nextPageLink,
507
- options
508
- },
509
- listByResourceGroupNextOperationSpec,
510
- callback) as Promise<Models.ServicesListByResourceGroupNextResponse>;
768
+ { location, parameters, options },
769
+ checkNameAvailabilityOperationSpec
770
+ );
511
771
  }
512
772
 
513
773
  /**
514
- * The services resource is the top-level resource that represents the Database Migration Service.
515
- * This method returns a list of service resources in a subscription.
516
- * @summary Get services in subscription
517
- * @param nextPageLink The NextLink from the previous successful call to List operation.
518
- * @param [options] The optional parameters
519
- * @returns Promise<Models.ServicesListNextResponse>
774
+ * ListSkusNext
775
+ * @param groupName Name of the resource group
776
+ * @param serviceName Name of the service
777
+ * @param nextLink The nextLink from the previous successful call to the ListSkus method.
778
+ * @param options The options parameters.
520
779
  */
521
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.ServicesListNextResponse>;
780
+ private _listSkusNext(
781
+ groupName: string,
782
+ serviceName: string,
783
+ nextLink: string,
784
+ options?: ServicesListSkusNextOptionalParams
785
+ ): Promise<ServicesListSkusNextResponse> {
786
+ return this.client.sendOperationRequest(
787
+ { groupName, serviceName, nextLink, options },
788
+ listSkusNextOperationSpec
789
+ );
790
+ }
791
+
522
792
  /**
523
- * @param nextPageLink The NextLink from the previous successful call to List operation.
524
- * @param callback The callback
793
+ * ListByResourceGroupNext
794
+ * @param groupName Name of the resource group
795
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
796
+ * @param options The options parameters.
525
797
  */
526
- listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.DataMigrationServiceList>): void;
798
+ private _listByResourceGroupNext(
799
+ groupName: string,
800
+ nextLink: string,
801
+ options?: ServicesListByResourceGroupNextOptionalParams
802
+ ): Promise<ServicesListByResourceGroupNextResponse> {
803
+ return this.client.sendOperationRequest(
804
+ { groupName, nextLink, options },
805
+ listByResourceGroupNextOperationSpec
806
+ );
807
+ }
808
+
527
809
  /**
528
- * @param nextPageLink The NextLink from the previous successful call to List operation.
529
- * @param options The optional parameters
530
- * @param callback The callback
810
+ * ListNext
811
+ * @param nextLink The nextLink from the previous successful call to the List method.
812
+ * @param options The options parameters.
531
813
  */
532
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DataMigrationServiceList>): void;
533
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.DataMigrationServiceList>, callback?: msRest.ServiceCallback<Models.DataMigrationServiceList>): Promise<Models.ServicesListNextResponse> {
814
+ private _listNext(
815
+ nextLink: string,
816
+ options?: ServicesListNextOptionalParams
817
+ ): Promise<ServicesListNextResponse> {
534
818
  return this.client.sendOperationRequest(
535
- {
536
- nextPageLink,
537
- options
538
- },
539
- listNextOperationSpec,
540
- callback) as Promise<Models.ServicesListNextResponse>;
819
+ { nextLink, options },
820
+ listNextOperationSpec
821
+ );
541
822
  }
542
823
  }
543
-
544
824
  // Operation Specifications
545
- const serializer = new msRest.Serializer(Mappers);
546
- const getOperationSpec: msRest.OperationSpec = {
547
- httpMethod: "GET",
548
- path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}",
549
- urlParameters: [
550
- Parameters.subscriptionId,
551
- Parameters.groupName,
552
- Parameters.serviceName
553
- ],
554
- queryParameters: [
555
- Parameters.apiVersion
556
- ],
557
- headerParameters: [
558
- Parameters.acceptLanguage
559
- ],
825
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
826
+
827
+ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
828
+ path:
829
+ "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}",
830
+ httpMethod: "PUT",
560
831
  responses: {
561
832
  200: {
562
833
  bodyMapper: Mappers.DataMigrationService
563
834
  },
835
+ 201: {
836
+ bodyMapper: Mappers.DataMigrationService
837
+ },
838
+ 202: {
839
+ bodyMapper: Mappers.DataMigrationService
840
+ },
841
+ 204: {
842
+ bodyMapper: Mappers.DataMigrationService
843
+ },
564
844
  default: {
565
845
  bodyMapper: Mappers.ApiError
566
846
  }
567
847
  },
568
- serializer
569
- };
570
-
571
- const checkStatusOperationSpec: msRest.OperationSpec = {
572
- httpMethod: "POST",
573
- path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/checkStatus",
848
+ requestBody: Parameters.parameters7,
849
+ queryParameters: [Parameters.apiVersion],
574
850
  urlParameters: [
851
+ Parameters.$host,
575
852
  Parameters.subscriptionId,
576
853
  Parameters.groupName,
577
854
  Parameters.serviceName
578
855
  ],
579
- queryParameters: [
580
- Parameters.apiVersion
581
- ],
582
- headerParameters: [
583
- Parameters.acceptLanguage
584
- ],
856
+ headerParameters: [Parameters.accept, Parameters.contentType],
857
+ mediaType: "json",
858
+ serializer
859
+ };
860
+ const getOperationSpec: coreClient.OperationSpec = {
861
+ path:
862
+ "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}",
863
+ httpMethod: "GET",
585
864
  responses: {
586
865
  200: {
587
- bodyMapper: Mappers.DataMigrationServiceStatusResponse
866
+ bodyMapper: Mappers.DataMigrationService
588
867
  },
589
868
  default: {
590
869
  bodyMapper: Mappers.ApiError
591
870
  }
592
871
  },
593
- serializer
594
- };
595
-
596
- const listSkusOperationSpec: msRest.OperationSpec = {
597
- httpMethod: "GET",
598
- path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/skus",
872
+ queryParameters: [Parameters.apiVersion],
599
873
  urlParameters: [
874
+ Parameters.$host,
600
875
  Parameters.subscriptionId,
601
876
  Parameters.groupName,
602
877
  Parameters.serviceName
603
878
  ],
604
- queryParameters: [
605
- Parameters.apiVersion
606
- ],
607
- headerParameters: [
608
- Parameters.acceptLanguage
609
- ],
879
+ headerParameters: [Parameters.accept],
880
+ serializer
881
+ };
882
+ const deleteOperationSpec: coreClient.OperationSpec = {
883
+ path:
884
+ "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}",
885
+ httpMethod: "DELETE",
610
886
  responses: {
611
- 200: {
612
- bodyMapper: Mappers.ServiceSkuList
613
- },
887
+ 200: {},
888
+ 201: {},
889
+ 202: {},
890
+ 204: {},
614
891
  default: {
615
892
  bodyMapper: Mappers.ApiError
616
893
  }
617
894
  },
618
- serializer
619
- };
620
-
621
- const checkChildrenNameAvailabilityOperationSpec: msRest.OperationSpec = {
622
- httpMethod: "POST",
623
- path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/checkNameAvailability",
895
+ queryParameters: [Parameters.apiVersion, Parameters.deleteRunningTasks],
624
896
  urlParameters: [
897
+ Parameters.$host,
625
898
  Parameters.subscriptionId,
626
899
  Parameters.groupName,
627
900
  Parameters.serviceName
628
901
  ],
629
- queryParameters: [
630
- Parameters.apiVersion
631
- ],
632
- headerParameters: [
633
- Parameters.acceptLanguage
634
- ],
635
- requestBody: {
636
- parameterPath: "parameters",
637
- mapper: {
638
- ...Mappers.NameAvailabilityRequest,
639
- required: true
640
- }
641
- },
902
+ headerParameters: [Parameters.accept],
903
+ serializer
904
+ };
905
+ const updateOperationSpec: coreClient.OperationSpec = {
906
+ path:
907
+ "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}",
908
+ httpMethod: "PATCH",
642
909
  responses: {
643
910
  200: {
644
- bodyMapper: Mappers.NameAvailabilityResponse
911
+ bodyMapper: Mappers.DataMigrationService
912
+ },
913
+ 201: {
914
+ bodyMapper: Mappers.DataMigrationService
915
+ },
916
+ 202: {
917
+ bodyMapper: Mappers.DataMigrationService
918
+ },
919
+ 204: {
920
+ bodyMapper: Mappers.DataMigrationService
645
921
  },
646
922
  default: {
647
923
  bodyMapper: Mappers.ApiError
648
924
  }
649
925
  },
650
- serializer
651
- };
652
-
653
- const listByResourceGroupOperationSpec: msRest.OperationSpec = {
654
- httpMethod: "GET",
655
- path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services",
926
+ requestBody: Parameters.parameters7,
927
+ queryParameters: [Parameters.apiVersion],
656
928
  urlParameters: [
929
+ Parameters.$host,
657
930
  Parameters.subscriptionId,
658
- Parameters.groupName
659
- ],
660
- queryParameters: [
661
- Parameters.apiVersion
662
- ],
663
- headerParameters: [
664
- Parameters.acceptLanguage
931
+ Parameters.groupName,
932
+ Parameters.serviceName
665
933
  ],
934
+ headerParameters: [Parameters.accept, Parameters.contentType],
935
+ mediaType: "json",
936
+ serializer
937
+ };
938
+ const checkStatusOperationSpec: coreClient.OperationSpec = {
939
+ path:
940
+ "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/checkStatus",
941
+ httpMethod: "POST",
666
942
  responses: {
667
943
  200: {
668
- bodyMapper: Mappers.DataMigrationServiceList
944
+ bodyMapper: Mappers.DataMigrationServiceStatusResponse
669
945
  },
670
946
  default: {
671
947
  bodyMapper: Mappers.ApiError
672
948
  }
673
949
  },
674
- serializer
675
- };
676
-
677
- const listOperationSpec: msRest.OperationSpec = {
678
- httpMethod: "GET",
679
- path: "subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/services",
950
+ queryParameters: [Parameters.apiVersion],
680
951
  urlParameters: [
681
- Parameters.subscriptionId
682
- ],
683
- queryParameters: [
684
- Parameters.apiVersion
685
- ],
686
- headerParameters: [
687
- Parameters.acceptLanguage
952
+ Parameters.$host,
953
+ Parameters.subscriptionId,
954
+ Parameters.groupName,
955
+ Parameters.serviceName
688
956
  ],
957
+ headerParameters: [Parameters.accept],
958
+ serializer
959
+ };
960
+ const startOperationSpec: coreClient.OperationSpec = {
961
+ path:
962
+ "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/start",
963
+ httpMethod: "POST",
689
964
  responses: {
690
- 200: {
691
- bodyMapper: Mappers.DataMigrationServiceList
692
- },
965
+ 200: {},
966
+ 201: {},
967
+ 202: {},
968
+ 204: {},
693
969
  default: {
694
970
  bodyMapper: Mappers.ApiError
695
971
  }
696
972
  },
697
- serializer
698
- };
699
-
700
- const checkNameAvailabilityOperationSpec: msRest.OperationSpec = {
701
- httpMethod: "POST",
702
- path: "subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/locations/{location}/checkNameAvailability",
973
+ queryParameters: [Parameters.apiVersion],
703
974
  urlParameters: [
975
+ Parameters.$host,
704
976
  Parameters.subscriptionId,
705
- Parameters.location
706
- ],
707
- queryParameters: [
708
- Parameters.apiVersion
709
- ],
710
- headerParameters: [
711
- Parameters.acceptLanguage
977
+ Parameters.groupName,
978
+ Parameters.serviceName
712
979
  ],
713
- requestBody: {
714
- parameterPath: "parameters",
715
- mapper: {
716
- ...Mappers.NameAvailabilityRequest,
717
- required: true
718
- }
719
- },
980
+ headerParameters: [Parameters.accept],
981
+ serializer
982
+ };
983
+ const stopOperationSpec: coreClient.OperationSpec = {
984
+ path:
985
+ "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/stop",
986
+ httpMethod: "POST",
720
987
  responses: {
721
- 200: {
722
- bodyMapper: Mappers.NameAvailabilityResponse
723
- },
988
+ 200: {},
989
+ 201: {},
990
+ 202: {},
991
+ 204: {},
724
992
  default: {
725
993
  bodyMapper: Mappers.ApiError
726
994
  }
727
995
  },
728
- serializer
729
- };
730
-
731
- const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
732
- httpMethod: "PUT",
733
- path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}",
996
+ queryParameters: [Parameters.apiVersion],
734
997
  urlParameters: [
998
+ Parameters.$host,
735
999
  Parameters.subscriptionId,
736
1000
  Parameters.groupName,
737
1001
  Parameters.serviceName
738
1002
  ],
739
- queryParameters: [
740
- Parameters.apiVersion
741
- ],
742
- headerParameters: [
743
- Parameters.acceptLanguage
744
- ],
745
- requestBody: {
746
- parameterPath: "parameters",
747
- mapper: {
748
- ...Mappers.DataMigrationService,
749
- required: true
750
- }
751
- },
1003
+ headerParameters: [Parameters.accept],
1004
+ serializer
1005
+ };
1006
+ const listSkusOperationSpec: coreClient.OperationSpec = {
1007
+ path:
1008
+ "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/skus",
1009
+ httpMethod: "GET",
752
1010
  responses: {
753
1011
  200: {
754
- bodyMapper: Mappers.DataMigrationService
755
- },
756
- 201: {
757
- bodyMapper: Mappers.DataMigrationService
1012
+ bodyMapper: Mappers.ServiceSkuList
758
1013
  },
759
- 202: {},
760
1014
  default: {
761
1015
  bodyMapper: Mappers.ApiError
762
1016
  }
763
1017
  },
764
- serializer
765
- };
766
-
767
- const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
768
- httpMethod: "DELETE",
769
- path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}",
1018
+ queryParameters: [Parameters.apiVersion],
770
1019
  urlParameters: [
1020
+ Parameters.$host,
771
1021
  Parameters.subscriptionId,
772
1022
  Parameters.groupName,
773
1023
  Parameters.serviceName
774
1024
  ],
775
- queryParameters: [
776
- Parameters.deleteRunningTasks,
777
- Parameters.apiVersion
778
- ],
779
- headerParameters: [
780
- Parameters.acceptLanguage
781
- ],
1025
+ headerParameters: [Parameters.accept],
1026
+ serializer
1027
+ };
1028
+ const checkChildrenNameAvailabilityOperationSpec: coreClient.OperationSpec = {
1029
+ path:
1030
+ "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/checkNameAvailability",
1031
+ httpMethod: "POST",
782
1032
  responses: {
783
- 200: {},
784
- 202: {},
785
- 204: {},
1033
+ 200: {
1034
+ bodyMapper: Mappers.NameAvailabilityResponse
1035
+ },
786
1036
  default: {
787
1037
  bodyMapper: Mappers.ApiError
788
1038
  }
789
1039
  },
790
- serializer
791
- };
792
-
793
- const beginUpdateOperationSpec: msRest.OperationSpec = {
794
- httpMethod: "PATCH",
795
- path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}",
1040
+ requestBody: Parameters.parameters8,
1041
+ queryParameters: [Parameters.apiVersion],
796
1042
  urlParameters: [
1043
+ Parameters.$host,
797
1044
  Parameters.subscriptionId,
798
1045
  Parameters.groupName,
799
1046
  Parameters.serviceName
800
1047
  ],
801
- queryParameters: [
802
- Parameters.apiVersion
803
- ],
804
- headerParameters: [
805
- Parameters.acceptLanguage
806
- ],
807
- requestBody: {
808
- parameterPath: "parameters",
809
- mapper: {
810
- ...Mappers.DataMigrationService,
811
- required: true
812
- }
813
- },
1048
+ headerParameters: [Parameters.accept, Parameters.contentType],
1049
+ mediaType: "json",
1050
+ serializer
1051
+ };
1052
+ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
1053
+ path:
1054
+ "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services",
1055
+ httpMethod: "GET",
814
1056
  responses: {
815
1057
  200: {
816
- bodyMapper: Mappers.DataMigrationService
1058
+ bodyMapper: Mappers.DataMigrationServiceList
817
1059
  },
818
- 202: {},
819
1060
  default: {
820
1061
  bodyMapper: Mappers.ApiError
821
1062
  }
822
1063
  },
823
- serializer
824
- };
825
-
826
- const beginStartOperationSpec: msRest.OperationSpec = {
827
- httpMethod: "POST",
828
- path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/start",
1064
+ queryParameters: [Parameters.apiVersion],
829
1065
  urlParameters: [
1066
+ Parameters.$host,
830
1067
  Parameters.subscriptionId,
831
- Parameters.groupName,
832
- Parameters.serviceName
833
- ],
834
- queryParameters: [
835
- Parameters.apiVersion
836
- ],
837
- headerParameters: [
838
- Parameters.acceptLanguage
1068
+ Parameters.groupName
839
1069
  ],
1070
+ headerParameters: [Parameters.accept],
1071
+ serializer
1072
+ };
1073
+ const listOperationSpec: coreClient.OperationSpec = {
1074
+ path:
1075
+ "/subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/services",
1076
+ httpMethod: "GET",
840
1077
  responses: {
841
- 200: {},
842
- 202: {},
1078
+ 200: {
1079
+ bodyMapper: Mappers.DataMigrationServiceList
1080
+ },
843
1081
  default: {
844
1082
  bodyMapper: Mappers.ApiError
845
1083
  }
846
1084
  },
1085
+ queryParameters: [Parameters.apiVersion],
1086
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
1087
+ headerParameters: [Parameters.accept],
847
1088
  serializer
848
1089
  };
849
-
850
- const beginStopOperationSpec: msRest.OperationSpec = {
1090
+ const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = {
1091
+ path:
1092
+ "/subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/locations/{location}/checkNameAvailability",
851
1093
  httpMethod: "POST",
852
- path: "subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/stop",
853
- urlParameters: [
854
- Parameters.subscriptionId,
855
- Parameters.groupName,
856
- Parameters.serviceName
857
- ],
858
- queryParameters: [
859
- Parameters.apiVersion
860
- ],
861
- headerParameters: [
862
- Parameters.acceptLanguage
863
- ],
864
1094
  responses: {
865
- 200: {},
866
- 202: {},
1095
+ 200: {
1096
+ bodyMapper: Mappers.NameAvailabilityResponse
1097
+ },
867
1098
  default: {
868
1099
  bodyMapper: Mappers.ApiError
869
1100
  }
870
1101
  },
1102
+ requestBody: Parameters.parameters8,
1103
+ queryParameters: [Parameters.apiVersion],
1104
+ urlParameters: [
1105
+ Parameters.$host,
1106
+ Parameters.subscriptionId,
1107
+ Parameters.location
1108
+ ],
1109
+ headerParameters: [Parameters.accept, Parameters.contentType],
1110
+ mediaType: "json",
871
1111
  serializer
872
1112
  };
873
-
874
- const listSkusNextOperationSpec: msRest.OperationSpec = {
875
- httpMethod: "GET",
876
- baseUrl: "https://management.azure.com",
1113
+ const listSkusNextOperationSpec: coreClient.OperationSpec = {
877
1114
  path: "{nextLink}",
878
- urlParameters: [
879
- Parameters.nextPageLink
880
- ],
881
- headerParameters: [
882
- Parameters.acceptLanguage
883
- ],
1115
+ httpMethod: "GET",
884
1116
  responses: {
885
1117
  200: {
886
1118
  bodyMapper: Mappers.ServiceSkuList
@@ -889,19 +1121,20 @@ const listSkusNextOperationSpec: msRest.OperationSpec = {
889
1121
  bodyMapper: Mappers.ApiError
890
1122
  }
891
1123
  },
1124
+ queryParameters: [Parameters.apiVersion],
1125
+ urlParameters: [
1126
+ Parameters.$host,
1127
+ Parameters.subscriptionId,
1128
+ Parameters.nextLink,
1129
+ Parameters.groupName,
1130
+ Parameters.serviceName
1131
+ ],
1132
+ headerParameters: [Parameters.accept],
892
1133
  serializer
893
1134
  };
894
-
895
- const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
896
- httpMethod: "GET",
897
- baseUrl: "https://management.azure.com",
1135
+ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
898
1136
  path: "{nextLink}",
899
- urlParameters: [
900
- Parameters.nextPageLink
901
- ],
902
- headerParameters: [
903
- Parameters.acceptLanguage
904
- ],
1137
+ httpMethod: "GET",
905
1138
  responses: {
906
1139
  200: {
907
1140
  bodyMapper: Mappers.DataMigrationServiceList
@@ -910,19 +1143,19 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
910
1143
  bodyMapper: Mappers.ApiError
911
1144
  }
912
1145
  },
1146
+ queryParameters: [Parameters.apiVersion],
1147
+ urlParameters: [
1148
+ Parameters.$host,
1149
+ Parameters.subscriptionId,
1150
+ Parameters.nextLink,
1151
+ Parameters.groupName
1152
+ ],
1153
+ headerParameters: [Parameters.accept],
913
1154
  serializer
914
1155
  };
915
-
916
- const listNextOperationSpec: msRest.OperationSpec = {
917
- httpMethod: "GET",
918
- baseUrl: "https://management.azure.com",
1156
+ const listNextOperationSpec: coreClient.OperationSpec = {
919
1157
  path: "{nextLink}",
920
- urlParameters: [
921
- Parameters.nextPageLink
922
- ],
923
- headerParameters: [
924
- Parameters.acceptLanguage
925
- ],
1158
+ httpMethod: "GET",
926
1159
  responses: {
927
1160
  200: {
928
1161
  bodyMapper: Mappers.DataMigrationServiceList
@@ -931,5 +1164,12 @@ const listNextOperationSpec: msRest.OperationSpec = {
931
1164
  bodyMapper: Mappers.ApiError
932
1165
  }
933
1166
  },
1167
+ queryParameters: [Parameters.apiVersion],
1168
+ urlParameters: [
1169
+ Parameters.$host,
1170
+ Parameters.subscriptionId,
1171
+ Parameters.nextLink
1172
+ ],
1173
+ headerParameters: [Parameters.accept],
934
1174
  serializer
935
1175
  };