@azure/arm-mysql-flexible 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (408) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/{LICENSE.txt → LICENSE} +2 -2
  3. package/README.md +81 -82
  4. package/dist/index.js +4360 -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/backupsGetSample.d.ts +2 -0
  9. package/dist-esm/samples-dev/backupsGetSample.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/backupsGetSample.js +32 -0
  11. package/dist-esm/samples-dev/backupsGetSample.js.map +1 -0
  12. package/dist-esm/samples-dev/backupsListByServerSample.d.ts +2 -0
  13. package/dist-esm/samples-dev/backupsListByServerSample.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/backupsListByServerSample.js +45 -0
  15. package/dist-esm/samples-dev/backupsListByServerSample.js.map +1 -0
  16. package/dist-esm/samples-dev/checkNameAvailabilityExecuteSample.d.ts +2 -0
  17. package/dist-esm/samples-dev/checkNameAvailabilityExecuteSample.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/checkNameAvailabilityExecuteSample.js +34 -0
  19. package/dist-esm/samples-dev/checkNameAvailabilityExecuteSample.js.map +1 -0
  20. package/dist-esm/samples-dev/checkVirtualNetworkSubnetUsageExecuteSample.d.ts +2 -0
  21. package/dist-esm/samples-dev/checkVirtualNetworkSubnetUsageExecuteSample.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/checkVirtualNetworkSubnetUsageExecuteSample.js +33 -0
  23. package/dist-esm/samples-dev/checkVirtualNetworkSubnetUsageExecuteSample.js.map +1 -0
  24. package/dist-esm/samples-dev/configurationsBatchUpdateSample.d.ts +2 -0
  25. package/dist-esm/samples-dev/configurationsBatchUpdateSample.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/configurationsBatchUpdateSample.js +37 -0
  27. package/dist-esm/samples-dev/configurationsBatchUpdateSample.js.map +1 -0
  28. package/dist-esm/samples-dev/configurationsGetSample.d.ts +2 -0
  29. package/dist-esm/samples-dev/configurationsGetSample.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/configurationsGetSample.js +32 -0
  31. package/dist-esm/samples-dev/configurationsGetSample.js.map +1 -0
  32. package/dist-esm/samples-dev/configurationsListByServerSample.d.ts +2 -0
  33. package/dist-esm/samples-dev/configurationsListByServerSample.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/configurationsListByServerSample.js +45 -0
  35. package/dist-esm/samples-dev/configurationsListByServerSample.js.map +1 -0
  36. package/dist-esm/samples-dev/configurationsUpdateSample.d.ts +2 -0
  37. package/dist-esm/samples-dev/configurationsUpdateSample.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/configurationsUpdateSample.js +33 -0
  39. package/dist-esm/samples-dev/configurationsUpdateSample.js.map +1 -0
  40. package/dist-esm/samples-dev/databasesCreateOrUpdateSample.d.ts +2 -0
  41. package/dist-esm/samples-dev/databasesCreateOrUpdateSample.d.ts.map +1 -0
  42. package/dist-esm/samples-dev/databasesCreateOrUpdateSample.js +36 -0
  43. package/dist-esm/samples-dev/databasesCreateOrUpdateSample.js.map +1 -0
  44. package/dist-esm/samples-dev/databasesDeleteSample.d.ts +2 -0
  45. package/dist-esm/samples-dev/databasesDeleteSample.d.ts.map +1 -0
  46. package/dist-esm/samples-dev/databasesDeleteSample.js +32 -0
  47. package/dist-esm/samples-dev/databasesDeleteSample.js.map +1 -0
  48. package/dist-esm/samples-dev/databasesGetSample.d.ts +2 -0
  49. package/dist-esm/samples-dev/databasesGetSample.d.ts.map +1 -0
  50. package/dist-esm/samples-dev/databasesGetSample.js +32 -0
  51. package/dist-esm/samples-dev/databasesGetSample.js.map +1 -0
  52. package/dist-esm/samples-dev/databasesListByServerSample.d.ts +2 -0
  53. package/dist-esm/samples-dev/databasesListByServerSample.d.ts.map +1 -0
  54. package/dist-esm/samples-dev/databasesListByServerSample.js +45 -0
  55. package/dist-esm/samples-dev/databasesListByServerSample.js.map +1 -0
  56. package/dist-esm/samples-dev/firewallRulesCreateOrUpdateSample.d.ts +2 -0
  57. package/dist-esm/samples-dev/firewallRulesCreateOrUpdateSample.d.ts.map +1 -0
  58. package/dist-esm/samples-dev/firewallRulesCreateOrUpdateSample.js +36 -0
  59. package/dist-esm/samples-dev/firewallRulesCreateOrUpdateSample.js.map +1 -0
  60. package/dist-esm/samples-dev/firewallRulesDeleteSample.d.ts +2 -0
  61. package/dist-esm/samples-dev/firewallRulesDeleteSample.d.ts.map +1 -0
  62. package/dist-esm/samples-dev/firewallRulesDeleteSample.js +32 -0
  63. package/dist-esm/samples-dev/firewallRulesDeleteSample.js.map +1 -0
  64. package/dist-esm/samples-dev/firewallRulesGetSample.d.ts +2 -0
  65. package/dist-esm/samples-dev/firewallRulesGetSample.d.ts.map +1 -0
  66. package/dist-esm/samples-dev/firewallRulesGetSample.js +32 -0
  67. package/dist-esm/samples-dev/firewallRulesGetSample.js.map +1 -0
  68. package/dist-esm/samples-dev/firewallRulesListByServerSample.d.ts +2 -0
  69. package/dist-esm/samples-dev/firewallRulesListByServerSample.d.ts.map +1 -0
  70. package/dist-esm/samples-dev/firewallRulesListByServerSample.js +45 -0
  71. package/dist-esm/samples-dev/firewallRulesListByServerSample.js.map +1 -0
  72. package/dist-esm/samples-dev/getPrivateDnsZoneSuffixExecuteSample.d.ts +2 -0
  73. package/dist-esm/samples-dev/getPrivateDnsZoneSuffixExecuteSample.d.ts.map +1 -0
  74. package/dist-esm/samples-dev/getPrivateDnsZoneSuffixExecuteSample.js +29 -0
  75. package/dist-esm/samples-dev/getPrivateDnsZoneSuffixExecuteSample.js.map +1 -0
  76. package/dist-esm/samples-dev/locationBasedCapabilitiesListSample.d.ts +2 -0
  77. package/dist-esm/samples-dev/locationBasedCapabilitiesListSample.d.ts.map +1 -0
  78. package/dist-esm/samples-dev/locationBasedCapabilitiesListSample.js +44 -0
  79. package/dist-esm/samples-dev/locationBasedCapabilitiesListSample.js.map +1 -0
  80. package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
  81. package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
  82. package/dist-esm/samples-dev/operationsListSample.js +43 -0
  83. package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
  84. package/dist-esm/samples-dev/replicasListByServerSample.d.ts +2 -0
  85. package/dist-esm/samples-dev/replicasListByServerSample.d.ts.map +1 -0
  86. package/dist-esm/samples-dev/replicasListByServerSample.js +45 -0
  87. package/dist-esm/samples-dev/replicasListByServerSample.js.map +1 -0
  88. package/dist-esm/samples-dev/serversCreateSample.d.ts +2 -0
  89. package/dist-esm/samples-dev/serversCreateSample.d.ts.map +1 -0
  90. package/dist-esm/samples-dev/serversCreateSample.js +137 -0
  91. package/dist-esm/samples-dev/serversCreateSample.js.map +1 -0
  92. package/dist-esm/samples-dev/serversDeleteSample.d.ts +2 -0
  93. package/dist-esm/samples-dev/serversDeleteSample.d.ts.map +1 -0
  94. package/dist-esm/samples-dev/serversDeleteSample.js +31 -0
  95. package/dist-esm/samples-dev/serversDeleteSample.js.map +1 -0
  96. package/dist-esm/samples-dev/serversFailoverSample.d.ts +2 -0
  97. package/dist-esm/samples-dev/serversFailoverSample.d.ts.map +1 -0
  98. package/dist-esm/samples-dev/serversFailoverSample.js +31 -0
  99. package/dist-esm/samples-dev/serversFailoverSample.js.map +1 -0
  100. package/dist-esm/samples-dev/serversGetSample.d.ts +2 -0
  101. package/dist-esm/samples-dev/serversGetSample.d.ts.map +1 -0
  102. package/dist-esm/samples-dev/serversGetSample.js +49 -0
  103. package/dist-esm/samples-dev/serversGetSample.js.map +1 -0
  104. package/dist-esm/samples-dev/serversListByResourceGroupSample.d.ts +2 -0
  105. package/dist-esm/samples-dev/serversListByResourceGroupSample.d.ts.map +1 -0
  106. package/dist-esm/samples-dev/serversListByResourceGroupSample.js +44 -0
  107. package/dist-esm/samples-dev/serversListByResourceGroupSample.js.map +1 -0
  108. package/dist-esm/samples-dev/serversListSample.d.ts +2 -0
  109. package/dist-esm/samples-dev/serversListSample.d.ts.map +1 -0
  110. package/dist-esm/samples-dev/serversListSample.js +43 -0
  111. package/dist-esm/samples-dev/serversListSample.js.map +1 -0
  112. package/dist-esm/samples-dev/serversRestartSample.d.ts +2 -0
  113. package/dist-esm/samples-dev/serversRestartSample.d.ts.map +1 -0
  114. package/dist-esm/samples-dev/serversRestartSample.js +35 -0
  115. package/dist-esm/samples-dev/serversRestartSample.js.map +1 -0
  116. package/dist-esm/samples-dev/serversStartSample.d.ts +2 -0
  117. package/dist-esm/samples-dev/serversStartSample.d.ts.map +1 -0
  118. package/dist-esm/samples-dev/serversStartSample.js +31 -0
  119. package/dist-esm/samples-dev/serversStartSample.js.map +1 -0
  120. package/dist-esm/samples-dev/serversStopSample.d.ts +2 -0
  121. package/dist-esm/samples-dev/serversStopSample.d.ts.map +1 -0
  122. package/dist-esm/samples-dev/serversStopSample.js +31 -0
  123. package/dist-esm/samples-dev/serversStopSample.js.map +1 -0
  124. package/dist-esm/samples-dev/serversUpdateSample.d.ts +2 -0
  125. package/dist-esm/samples-dev/serversUpdateSample.d.ts.map +1 -0
  126. package/dist-esm/samples-dev/serversUpdateSample.js +93 -0
  127. package/dist-esm/samples-dev/serversUpdateSample.js.map +1 -0
  128. package/dist-esm/src/index.d.ts +5 -0
  129. package/dist-esm/src/index.d.ts.map +1 -0
  130. package/dist-esm/src/index.js +12 -0
  131. package/dist-esm/src/index.js.map +1 -0
  132. package/dist-esm/src/lroImpl.d.ts +16 -0
  133. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  134. package/dist-esm/src/lroImpl.js +29 -0
  135. package/dist-esm/src/lroImpl.js.map +1 -0
  136. package/dist-esm/src/models/index.d.ts +1084 -0
  137. package/dist-esm/src/models/index.d.ts.map +1 -0
  138. package/dist-esm/src/models/index.js +101 -0
  139. package/dist-esm/src/models/index.js.map +1 -0
  140. package/dist-esm/src/models/mappers.d.ts +47 -0
  141. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  142. package/{esm → dist-esm/src}/models/mappers.js +730 -662
  143. package/dist-esm/src/models/mappers.js.map +1 -0
  144. package/dist-esm/src/models/parameters.d.ts +24 -0
  145. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  146. package/dist-esm/src/models/parameters.js +187 -0
  147. package/dist-esm/src/models/parameters.js.map +1 -0
  148. package/dist-esm/src/mySQLManagementFlexibleServerClient.d.ts +28 -0
  149. package/dist-esm/src/mySQLManagementFlexibleServerClient.d.ts.map +1 -0
  150. package/dist-esm/src/mySQLManagementFlexibleServerClient.js +61 -0
  151. package/dist-esm/src/mySQLManagementFlexibleServerClient.js.map +1 -0
  152. package/dist-esm/src/operations/backups.d.ts +46 -0
  153. package/dist-esm/src/operations/backups.d.ts.map +1 -0
  154. package/dist-esm/src/operations/backups.js +169 -0
  155. package/dist-esm/src/operations/backups.js.map +1 -0
  156. package/dist-esm/src/operations/checkNameAvailability.d.ts +20 -0
  157. package/dist-esm/src/operations/checkNameAvailability.d.ts.map +1 -0
  158. package/dist-esm/src/operations/checkNameAvailability.js +54 -0
  159. package/dist-esm/src/operations/checkNameAvailability.js.map +1 -0
  160. package/dist-esm/src/operations/checkVirtualNetworkSubnetUsage.d.ts +20 -0
  161. package/dist-esm/src/operations/checkVirtualNetworkSubnetUsage.d.ts.map +1 -0
  162. package/dist-esm/src/operations/checkVirtualNetworkSubnetUsage.js +54 -0
  163. package/dist-esm/src/operations/checkVirtualNetworkSubnetUsage.js.map +1 -0
  164. package/dist-esm/src/operations/configurations.d.ts +81 -0
  165. package/dist-esm/src/operations/configurations.d.ts.map +1 -0
  166. package/dist-esm/src/operations/configurations.js +341 -0
  167. package/dist-esm/src/operations/configurations.js.map +1 -0
  168. package/dist-esm/src/operations/databases.d.ts +81 -0
  169. package/dist-esm/src/operations/databases.d.ts.map +1 -0
  170. package/dist-esm/src/operations/databases.js +331 -0
  171. package/dist-esm/src/operations/databases.js.map +1 -0
  172. package/dist-esm/src/operations/firewallRules.d.ts +81 -0
  173. package/dist-esm/src/operations/firewallRules.d.ts.map +1 -0
  174. package/dist-esm/src/operations/firewallRules.js +331 -0
  175. package/dist-esm/src/operations/firewallRules.js.map +1 -0
  176. package/dist-esm/src/operations/getPrivateDnsZoneSuffix.d.ts +18 -0
  177. package/dist-esm/src/operations/getPrivateDnsZoneSuffix.d.ts.map +1 -0
  178. package/dist-esm/src/operations/getPrivateDnsZoneSuffix.js +46 -0
  179. package/dist-esm/src/operations/getPrivateDnsZoneSuffix.js.map +1 -0
  180. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  181. package/dist-esm/src/operations/index.d.ts.map +1 -0
  182. package/{esm → dist-esm/src}/operations/index.js +1 -2
  183. package/dist-esm/src/operations/index.js.map +1 -0
  184. package/dist-esm/src/operations/locationBasedCapabilities.d.ts +35 -0
  185. package/dist-esm/src/operations/locationBasedCapabilities.d.ts.map +1 -0
  186. package/dist-esm/src/operations/locationBasedCapabilities.js +132 -0
  187. package/dist-esm/src/operations/locationBasedCapabilities.js.map +1 -0
  188. package/dist-esm/src/operations/operations.d.ts +32 -0
  189. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  190. package/dist-esm/src/operations/operations.js +120 -0
  191. package/dist-esm/src/operations/operations.js.map +1 -0
  192. package/dist-esm/src/operations/replicas.d.ts +38 -0
  193. package/dist-esm/src/operations/replicas.d.ts.map +1 -0
  194. package/dist-esm/src/operations/replicas.js +137 -0
  195. package/dist-esm/src/operations/replicas.js.map +1 -0
  196. package/dist-esm/src/operations/servers.d.ts +169 -0
  197. package/dist-esm/src/operations/servers.d.ts.map +1 -0
  198. package/dist-esm/src/operations/servers.js +792 -0
  199. package/dist-esm/src/operations/servers.js.map +1 -0
  200. package/dist-esm/src/operationsInterfaces/backups.d.ts +21 -0
  201. package/dist-esm/src/operationsInterfaces/backups.d.ts.map +1 -0
  202. package/{esm/models/index.js → dist-esm/src/operationsInterfaces/backups.js} +2 -1
  203. package/dist-esm/src/operationsInterfaces/backups.js.map +1 -0
  204. package/dist-esm/src/operationsInterfaces/checkNameAvailability.d.ts +12 -0
  205. package/dist-esm/src/operationsInterfaces/checkNameAvailability.d.ts.map +1 -0
  206. package/{src/models/getPrivateDnsZoneSuffixMappers.ts → dist-esm/src/operationsInterfaces/checkNameAvailability.js} +2 -7
  207. package/dist-esm/src/operationsInterfaces/checkNameAvailability.js.map +1 -0
  208. package/dist-esm/src/operationsInterfaces/checkVirtualNetworkSubnetUsage.d.ts +12 -0
  209. package/dist-esm/src/operationsInterfaces/checkVirtualNetworkSubnetUsage.d.ts.map +1 -0
  210. package/{src/models/checkNameAvailabilityMappers.ts → dist-esm/src/operationsInterfaces/checkVirtualNetworkSubnetUsage.js} +2 -8
  211. package/dist-esm/src/operationsInterfaces/checkVirtualNetworkSubnetUsage.js.map +1 -0
  212. package/dist-esm/src/operationsInterfaces/configurations.d.ts +56 -0
  213. package/dist-esm/src/operationsInterfaces/configurations.d.ts.map +1 -0
  214. package/{src/models/operationsMappers.ts → dist-esm/src/operationsInterfaces/configurations.js} +2 -9
  215. package/dist-esm/src/operationsInterfaces/configurations.js.map +1 -0
  216. package/dist-esm/src/operationsInterfaces/databases.d.ts +56 -0
  217. package/dist-esm/src/operationsInterfaces/databases.d.ts.map +1 -0
  218. package/dist-esm/src/operationsInterfaces/databases.js +9 -0
  219. package/dist-esm/src/operationsInterfaces/databases.js.map +1 -0
  220. package/dist-esm/src/operationsInterfaces/firewallRules.d.ts +56 -0
  221. package/dist-esm/src/operationsInterfaces/firewallRules.d.ts.map +1 -0
  222. package/dist-esm/src/operationsInterfaces/firewallRules.js +9 -0
  223. package/dist-esm/src/operationsInterfaces/firewallRules.js.map +1 -0
  224. package/dist-esm/src/operationsInterfaces/getPrivateDnsZoneSuffix.d.ts +10 -0
  225. package/dist-esm/src/operationsInterfaces/getPrivateDnsZoneSuffix.d.ts.map +1 -0
  226. package/dist-esm/src/operationsInterfaces/getPrivateDnsZoneSuffix.js +9 -0
  227. package/dist-esm/src/operationsInterfaces/getPrivateDnsZoneSuffix.js.map +1 -0
  228. package/dist-esm/src/operationsInterfaces/index.d.ts +12 -0
  229. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  230. package/dist-esm/src/operationsInterfaces/index.js +19 -0
  231. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  232. package/dist-esm/src/operationsInterfaces/locationBasedCapabilities.d.ts +12 -0
  233. package/dist-esm/src/operationsInterfaces/locationBasedCapabilities.d.ts.map +1 -0
  234. package/dist-esm/src/operationsInterfaces/locationBasedCapabilities.js +9 -0
  235. package/dist-esm/src/operationsInterfaces/locationBasedCapabilities.js.map +1 -0
  236. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  237. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  238. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  239. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  240. package/dist-esm/src/operationsInterfaces/replicas.d.ts +13 -0
  241. package/dist-esm/src/operationsInterfaces/replicas.d.ts.map +1 -0
  242. package/dist-esm/src/operationsInterfaces/replicas.js +9 -0
  243. package/dist-esm/src/operationsInterfaces/replicas.js.map +1 -0
  244. package/dist-esm/src/operationsInterfaces/servers.d.ts +133 -0
  245. package/dist-esm/src/operationsInterfaces/servers.d.ts.map +1 -0
  246. package/dist-esm/src/operationsInterfaces/servers.js +9 -0
  247. package/dist-esm/src/operationsInterfaces/servers.js.map +1 -0
  248. package/dist-esm/test/sampleTest.d.ts +2 -0
  249. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  250. package/dist-esm/test/sampleTest.js +40 -0
  251. package/dist-esm/test/sampleTest.js.map +1 -0
  252. package/package.json +83 -24
  253. package/review/arm-mysql-flexible.api.md +939 -0
  254. package/rollup.config.js +115 -30
  255. package/src/{models/checkVirtualNetworkSubnetUsageMappers.ts → index.ts} +4 -8
  256. package/src/lroImpl.ts +34 -0
  257. package/src/models/index.ts +927 -1445
  258. package/src/models/mappers.ts +765 -691
  259. package/src/models/parameters.ts +141 -49
  260. package/src/mySQLManagementFlexibleServerClient.ts +121 -0
  261. package/src/operations/backups.ts +156 -123
  262. package/src/operations/checkNameAvailability.ts +39 -57
  263. package/src/operations/checkVirtualNetworkSubnetUsage.ts +40 -57
  264. package/src/operations/configurations.ts +368 -212
  265. package/src/operations/databases.ts +355 -212
  266. package/src/operations/firewallRules.ts +355 -212
  267. package/src/operations/getPrivateDnsZoneSuffix.ts +27 -41
  268. package/src/operations/index.ts +1 -2
  269. package/src/operations/locationBasedCapabilities.ts +106 -80
  270. package/src/operations/operations.ts +85 -73
  271. package/src/operations/replicas.ts +133 -82
  272. package/src/operations/servers.ts +833 -454
  273. package/src/operationsInterfaces/backups.ts +44 -0
  274. package/src/operationsInterfaces/checkNameAvailability.ts +28 -0
  275. package/src/operationsInterfaces/checkVirtualNetworkSubnetUsage.ts +28 -0
  276. package/src/operationsInterfaces/configurations.ts +116 -0
  277. package/src/operationsInterfaces/databases.ts +109 -0
  278. package/src/operationsInterfaces/firewallRules.ts +109 -0
  279. package/src/operationsInterfaces/getPrivateDnsZoneSuffix.ts +23 -0
  280. package/src/operationsInterfaces/index.ts +19 -0
  281. package/src/operationsInterfaces/locationBasedCapabilities.ts +27 -0
  282. package/src/operationsInterfaces/operations.ts +22 -0
  283. package/src/operationsInterfaces/replicas.ts +26 -0
  284. package/src/operationsInterfaces/servers.ts +232 -0
  285. package/tsconfig.json +21 -7
  286. package/types/arm-mysql-flexible.d.ts +1627 -0
  287. package/types/tsdoc-metadata.json +11 -0
  288. package/dist/arm-mysql-flexible.js +0 -3773
  289. package/dist/arm-mysql-flexible.js.map +0 -1
  290. package/dist/arm-mysql-flexible.min.js +0 -1
  291. package/dist/arm-mysql-flexible.min.js.map +0 -1
  292. package/esm/models/backupsMappers.d.ts +0 -2
  293. package/esm/models/backupsMappers.d.ts.map +0 -1
  294. package/esm/models/backupsMappers.js +0 -9
  295. package/esm/models/backupsMappers.js.map +0 -1
  296. package/esm/models/checkNameAvailabilityMappers.d.ts +0 -2
  297. package/esm/models/checkNameAvailabilityMappers.d.ts.map +0 -1
  298. package/esm/models/checkNameAvailabilityMappers.js +0 -9
  299. package/esm/models/checkNameAvailabilityMappers.js.map +0 -1
  300. package/esm/models/checkVirtualNetworkSubnetUsageMappers.d.ts +0 -2
  301. package/esm/models/checkVirtualNetworkSubnetUsageMappers.d.ts.map +0 -1
  302. package/esm/models/checkVirtualNetworkSubnetUsageMappers.js +0 -9
  303. package/esm/models/checkVirtualNetworkSubnetUsageMappers.js.map +0 -1
  304. package/esm/models/configurationsMappers.d.ts +0 -2
  305. package/esm/models/configurationsMappers.d.ts.map +0 -1
  306. package/esm/models/configurationsMappers.js +0 -9
  307. package/esm/models/configurationsMappers.js.map +0 -1
  308. package/esm/models/databasesMappers.d.ts +0 -2
  309. package/esm/models/databasesMappers.d.ts.map +0 -1
  310. package/esm/models/databasesMappers.js +0 -9
  311. package/esm/models/databasesMappers.js.map +0 -1
  312. package/esm/models/firewallRulesMappers.d.ts +0 -2
  313. package/esm/models/firewallRulesMappers.d.ts.map +0 -1
  314. package/esm/models/firewallRulesMappers.js +0 -9
  315. package/esm/models/firewallRulesMappers.js.map +0 -1
  316. package/esm/models/getPrivateDnsZoneSuffixMappers.d.ts +0 -2
  317. package/esm/models/getPrivateDnsZoneSuffixMappers.d.ts.map +0 -1
  318. package/esm/models/getPrivateDnsZoneSuffixMappers.js +0 -9
  319. package/esm/models/getPrivateDnsZoneSuffixMappers.js.map +0 -1
  320. package/esm/models/index.d.ts +0 -1621
  321. package/esm/models/index.d.ts.map +0 -1
  322. package/esm/models/index.js.map +0 -1
  323. package/esm/models/locationBasedCapabilitiesMappers.d.ts +0 -2
  324. package/esm/models/locationBasedCapabilitiesMappers.d.ts.map +0 -1
  325. package/esm/models/locationBasedCapabilitiesMappers.js +0 -9
  326. package/esm/models/locationBasedCapabilitiesMappers.js.map +0 -1
  327. package/esm/models/mappers.d.ts +0 -46
  328. package/esm/models/mappers.d.ts.map +0 -1
  329. package/esm/models/mappers.js.map +0 -1
  330. package/esm/models/operationsMappers.d.ts +0 -2
  331. package/esm/models/operationsMappers.d.ts.map +0 -1
  332. package/esm/models/operationsMappers.js +0 -9
  333. package/esm/models/operationsMappers.js.map +0 -1
  334. package/esm/models/parameters.d.ts +0 -13
  335. package/esm/models/parameters.d.ts.map +0 -1
  336. package/esm/models/parameters.js +0 -130
  337. package/esm/models/parameters.js.map +0 -1
  338. package/esm/models/replicasMappers.d.ts +0 -2
  339. package/esm/models/replicasMappers.d.ts.map +0 -1
  340. package/esm/models/replicasMappers.js +0 -9
  341. package/esm/models/replicasMappers.js.map +0 -1
  342. package/esm/models/serversMappers.d.ts +0 -2
  343. package/esm/models/serversMappers.d.ts.map +0 -1
  344. package/esm/models/serversMappers.js +0 -9
  345. package/esm/models/serversMappers.js.map +0 -1
  346. package/esm/mySQLManagementClient.d.ts +0 -34
  347. package/esm/mySQLManagementClient.d.ts.map +0 -1
  348. package/esm/mySQLManagementClient.js +0 -47
  349. package/esm/mySQLManagementClient.js.map +0 -1
  350. package/esm/mySQLManagementClientContext.d.ts +0 -22
  351. package/esm/mySQLManagementClientContext.d.ts.map +0 -1
  352. package/esm/mySQLManagementClientContext.js +0 -60
  353. package/esm/mySQLManagementClientContext.js.map +0 -1
  354. package/esm/operations/backups.d.ts +0 -76
  355. package/esm/operations/backups.d.ts.map +0 -1
  356. package/esm/operations/backups.js +0 -119
  357. package/esm/operations/backups.js.map +0 -1
  358. package/esm/operations/checkNameAvailability.d.ts +0 -34
  359. package/esm/operations/checkNameAvailability.d.ts.map +0 -1
  360. package/esm/operations/checkNameAvailability.js +0 -61
  361. package/esm/operations/checkNameAvailability.js.map +0 -1
  362. package/esm/operations/checkVirtualNetworkSubnetUsage.d.ts +0 -34
  363. package/esm/operations/checkVirtualNetworkSubnetUsage.d.ts.map +0 -1
  364. package/esm/operations/checkVirtualNetworkSubnetUsage.js +0 -61
  365. package/esm/operations/checkVirtualNetworkSubnetUsage.js.map +0 -1
  366. package/esm/operations/configurations.d.ts +0 -115
  367. package/esm/operations/configurations.d.ts.map +0 -1
  368. package/esm/operations/configurations.js +0 -238
  369. package/esm/operations/configurations.js.map +0 -1
  370. package/esm/operations/databases.d.ts +0 -115
  371. package/esm/operations/databases.d.ts.map +0 -1
  372. package/esm/operations/databases.js +0 -237
  373. package/esm/operations/databases.js.map +0 -1
  374. package/esm/operations/firewallRules.d.ts +0 -115
  375. package/esm/operations/firewallRules.d.ts.map +0 -1
  376. package/esm/operations/firewallRules.js +0 -237
  377. package/esm/operations/firewallRules.js.map +0 -1
  378. package/esm/operations/getPrivateDnsZoneSuffix.d.ts +0 -28
  379. package/esm/operations/getPrivateDnsZoneSuffix.d.ts.map +0 -1
  380. package/esm/operations/getPrivateDnsZoneSuffix.js +0 -50
  381. package/esm/operations/getPrivateDnsZoneSuffix.js.map +0 -1
  382. package/esm/operations/index.d.ts.map +0 -1
  383. package/esm/operations/index.js.map +0 -1
  384. package/esm/operations/locationBasedCapabilities.d.ts +0 -49
  385. package/esm/operations/locationBasedCapabilities.d.ts.map +0 -1
  386. package/esm/operations/locationBasedCapabilities.js +0 -84
  387. package/esm/operations/locationBasedCapabilities.js.map +0 -1
  388. package/esm/operations/operations.d.ts +0 -46
  389. package/esm/operations/operations.d.ts.map +0 -1
  390. package/esm/operations/operations.js +0 -79
  391. package/esm/operations/operations.js.map +0 -1
  392. package/esm/operations/replicas.d.ts +0 -52
  393. package/esm/operations/replicas.d.ts.map +0 -1
  394. package/esm/operations/replicas.js +0 -86
  395. package/esm/operations/replicas.js.map +0 -1
  396. package/esm/operations/servers.d.ts +0 -226
  397. package/esm/operations/servers.d.ts.map +0 -1
  398. package/esm/operations/servers.js +0 -541
  399. package/esm/operations/servers.js.map +0 -1
  400. package/src/models/backupsMappers.ts +0 -31
  401. package/src/models/configurationsMappers.ts +0 -33
  402. package/src/models/databasesMappers.ts +0 -31
  403. package/src/models/firewallRulesMappers.ts +0 -31
  404. package/src/models/locationBasedCapabilitiesMappers.ts +0 -19
  405. package/src/models/replicasMappers.ts +0 -31
  406. package/src/models/serversMappers.ts +0 -33
  407. package/src/mySQLManagementClient.ts +0 -67
  408. package/src/mySQLManagementClientContext.ts +0 -67
@@ -3,64 +3,47 @@
3
3
  * Licensed under the MIT License.
4
4
  *
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is
7
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
7
  */
9
8
 
10
- import * as msRest from "@azure/ms-rest-js";
11
- import * as Models from "../models";
12
- import * as Mappers from "../models/getPrivateDnsZoneSuffixMappers";
9
+ import { GetPrivateDnsZoneSuffix } from "../operationsInterfaces";
10
+ import * as coreClient from "@azure/core-client";
11
+ import * as Mappers from "../models/mappers";
13
12
  import * as Parameters from "../models/parameters";
14
- import { MySQLManagementClientContext } from "../mySQLManagementClientContext";
13
+ import { MySQLManagementFlexibleServerClient } from "../mySQLManagementFlexibleServerClient";
14
+ import {
15
+ GetPrivateDnsZoneSuffixExecuteOptionalParams,
16
+ GetPrivateDnsZoneSuffixExecuteResponse
17
+ } from "../models";
15
18
 
16
- /** Class representing a GetPrivateDnsZoneSuffix. */
17
- export class GetPrivateDnsZoneSuffix {
18
- private readonly client: MySQLManagementClientContext;
19
+ /** Class containing GetPrivateDnsZoneSuffix operations. */
20
+ export class GetPrivateDnsZoneSuffixImpl implements GetPrivateDnsZoneSuffix {
21
+ private readonly client: MySQLManagementFlexibleServerClient;
19
22
 
20
23
  /**
21
- * Create a GetPrivateDnsZoneSuffix.
22
- * @param {MySQLManagementClientContext} client Reference to the service client.
24
+ * Initialize a new instance of the class GetPrivateDnsZoneSuffix class.
25
+ * @param client Reference to the service client
23
26
  */
24
- constructor(client: MySQLManagementClientContext) {
27
+ constructor(client: MySQLManagementFlexibleServerClient) {
25
28
  this.client = client;
26
29
  }
27
30
 
28
31
  /**
29
32
  * Get private DNS zone suffix in the cloud.
30
- * @param [options] The optional parameters
31
- * @returns Promise<Models.GetPrivateDnsZoneSuffixExecuteResponse>
33
+ * @param options The options parameters.
32
34
  */
33
- execute(options?: msRest.RequestOptionsBase): Promise<Models.GetPrivateDnsZoneSuffixExecuteResponse>;
34
- /**
35
- * @param callback The callback
36
- */
37
- execute(callback: msRest.ServiceCallback<Models.GetPrivateDnsZoneSuffixResponse>): void;
38
- /**
39
- * @param options The optional parameters
40
- * @param callback The callback
41
- */
42
- execute(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.GetPrivateDnsZoneSuffixResponse>): void;
43
- execute(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.GetPrivateDnsZoneSuffixResponse>, callback?: msRest.ServiceCallback<Models.GetPrivateDnsZoneSuffixResponse>): Promise<Models.GetPrivateDnsZoneSuffixExecuteResponse> {
44
- return this.client.sendOperationRequest(
45
- {
46
- options
47
- },
48
- executeOperationSpec,
49
- callback) as Promise<Models.GetPrivateDnsZoneSuffixExecuteResponse>;
35
+ execute(
36
+ options?: GetPrivateDnsZoneSuffixExecuteOptionalParams
37
+ ): Promise<GetPrivateDnsZoneSuffixExecuteResponse> {
38
+ return this.client.sendOperationRequest({ options }, executeOperationSpec);
50
39
  }
51
40
  }
52
-
53
41
  // Operation Specifications
54
- const serializer = new msRest.Serializer(Mappers);
55
- const executeOperationSpec: msRest.OperationSpec = {
42
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
43
+
44
+ const executeOperationSpec: coreClient.OperationSpec = {
45
+ path: "/providers/Microsoft.DBforMySQL/getPrivateDnsZoneSuffix",
56
46
  httpMethod: "POST",
57
- path: "providers/Microsoft.DBforMySQL/getPrivateDnsZoneSuffix",
58
- queryParameters: [
59
- Parameters.apiVersion
60
- ],
61
- headerParameters: [
62
- Parameters.acceptLanguage
63
- ],
64
47
  responses: {
65
48
  200: {
66
49
  bodyMapper: Mappers.GetPrivateDnsZoneSuffixResponse
@@ -69,5 +52,8 @@ const executeOperationSpec: msRest.OperationSpec = {
69
52
  bodyMapper: Mappers.CloudError
70
53
  }
71
54
  },
55
+ queryParameters: [Parameters.apiVersion],
56
+ urlParameters: [Parameters.$host],
57
+ headerParameters: [Parameters.accept],
72
58
  serializer
73
59
  };
@@ -3,8 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  *
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is
7
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
7
  */
9
8
 
10
9
  export * from "./servers";
@@ -3,100 +3,122 @@
3
3
  * Licensed under the MIT License.
4
4
  *
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is
7
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
7
  */
9
8
 
10
- import * as msRest from "@azure/ms-rest-js";
11
- import * as Models from "../models";
12
- import * as Mappers from "../models/locationBasedCapabilitiesMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { LocationBasedCapabilities } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
13
13
  import * as Parameters from "../models/parameters";
14
- import { MySQLManagementClientContext } from "../mySQLManagementClientContext";
14
+ import { MySQLManagementFlexibleServerClient } from "../mySQLManagementFlexibleServerClient";
15
+ import {
16
+ CapabilityProperties,
17
+ LocationBasedCapabilitiesListNextOptionalParams,
18
+ LocationBasedCapabilitiesListOptionalParams,
19
+ LocationBasedCapabilitiesListResponse,
20
+ LocationBasedCapabilitiesListNextResponse
21
+ } from "../models";
15
22
 
16
- /** Class representing a LocationBasedCapabilities. */
17
- export class LocationBasedCapabilities {
18
- private readonly client: MySQLManagementClientContext;
23
+ /// <reference lib="esnext.asynciterable" />
24
+ /** Class containing LocationBasedCapabilities operations. */
25
+ export class LocationBasedCapabilitiesImpl
26
+ implements LocationBasedCapabilities {
27
+ private readonly client: MySQLManagementFlexibleServerClient;
19
28
 
20
29
  /**
21
- * Create a LocationBasedCapabilities.
22
- * @param {MySQLManagementClientContext} client Reference to the service client.
30
+ * Initialize a new instance of the class LocationBasedCapabilities class.
31
+ * @param client Reference to the service client
23
32
  */
24
- constructor(client: MySQLManagementClientContext) {
33
+ constructor(client: MySQLManagementFlexibleServerClient) {
25
34
  this.client = client;
26
35
  }
27
36
 
28
37
  /**
29
38
  * Get capabilities at specified location in a given subscription.
30
39
  * @param locationName The name of the location.
31
- * @param [options] The optional parameters
32
- * @returns Promise<Models.LocationBasedCapabilitiesListResponse>
40
+ * @param options The options parameters.
33
41
  */
34
- list(locationName: string, options?: msRest.RequestOptionsBase): Promise<Models.LocationBasedCapabilitiesListResponse>;
35
- /**
36
- * @param locationName The name of the location.
37
- * @param callback The callback
38
- */
39
- list(locationName: string, callback: msRest.ServiceCallback<Models.CapabilitiesListResult>): void;
40
- /**
41
- * @param locationName The name of the location.
42
- * @param options The optional parameters
43
- * @param callback The callback
44
- */
45
- list(locationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.CapabilitiesListResult>): void;
46
- list(locationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.CapabilitiesListResult>, callback?: msRest.ServiceCallback<Models.CapabilitiesListResult>): Promise<Models.LocationBasedCapabilitiesListResponse> {
47
- return this.client.sendOperationRequest(
48
- {
49
- locationName,
50
- options
42
+ public list(
43
+ locationName: string,
44
+ options?: LocationBasedCapabilitiesListOptionalParams
45
+ ): PagedAsyncIterableIterator<CapabilityProperties> {
46
+ const iter = this.listPagingAll(locationName, options);
47
+ return {
48
+ next() {
49
+ return iter.next();
50
+ },
51
+ [Symbol.asyncIterator]() {
52
+ return this;
51
53
  },
52
- listOperationSpec,
53
- callback) as Promise<Models.LocationBasedCapabilitiesListResponse>;
54
+ byPage: () => {
55
+ return this.listPagingPage(locationName, options);
56
+ }
57
+ };
58
+ }
59
+
60
+ private async *listPagingPage(
61
+ locationName: string,
62
+ options?: LocationBasedCapabilitiesListOptionalParams
63
+ ): AsyncIterableIterator<CapabilityProperties[]> {
64
+ let result = await this._list(locationName, options);
65
+ yield result.value || [];
66
+ let continuationToken = result.nextLink;
67
+ while (continuationToken) {
68
+ result = await this._listNext(locationName, continuationToken, options);
69
+ continuationToken = result.nextLink;
70
+ yield result.value || [];
71
+ }
72
+ }
73
+
74
+ private async *listPagingAll(
75
+ locationName: string,
76
+ options?: LocationBasedCapabilitiesListOptionalParams
77
+ ): AsyncIterableIterator<CapabilityProperties> {
78
+ for await (const page of this.listPagingPage(locationName, options)) {
79
+ yield* page;
80
+ }
54
81
  }
55
82
 
56
83
  /**
57
84
  * Get capabilities at specified location in a given subscription.
58
- * @param nextPageLink The NextLink from the previous successful call to List operation.
59
- * @param [options] The optional parameters
60
- * @returns Promise<Models.LocationBasedCapabilitiesListNextResponse>
61
- */
62
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.LocationBasedCapabilitiesListNextResponse>;
63
- /**
64
- * @param nextPageLink The NextLink from the previous successful call to List operation.
65
- * @param callback The callback
85
+ * @param locationName The name of the location.
86
+ * @param options The options parameters.
66
87
  */
67
- listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.CapabilitiesListResult>): void;
88
+ private _list(
89
+ locationName: string,
90
+ options?: LocationBasedCapabilitiesListOptionalParams
91
+ ): Promise<LocationBasedCapabilitiesListResponse> {
92
+ return this.client.sendOperationRequest(
93
+ { locationName, options },
94
+ listOperationSpec
95
+ );
96
+ }
97
+
68
98
  /**
69
- * @param nextPageLink The NextLink from the previous successful call to List operation.
70
- * @param options The optional parameters
71
- * @param callback The callback
99
+ * ListNext
100
+ * @param locationName The name of the location.
101
+ * @param nextLink The nextLink from the previous successful call to the List method.
102
+ * @param options The options parameters.
72
103
  */
73
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.CapabilitiesListResult>): void;
74
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.CapabilitiesListResult>, callback?: msRest.ServiceCallback<Models.CapabilitiesListResult>): Promise<Models.LocationBasedCapabilitiesListNextResponse> {
104
+ private _listNext(
105
+ locationName: string,
106
+ nextLink: string,
107
+ options?: LocationBasedCapabilitiesListNextOptionalParams
108
+ ): Promise<LocationBasedCapabilitiesListNextResponse> {
75
109
  return this.client.sendOperationRequest(
76
- {
77
- nextPageLink,
78
- options
79
- },
80
- listNextOperationSpec,
81
- callback) as Promise<Models.LocationBasedCapabilitiesListNextResponse>;
110
+ { locationName, nextLink, options },
111
+ listNextOperationSpec
112
+ );
82
113
  }
83
114
  }
84
-
85
115
  // Operation Specifications
86
- const serializer = new msRest.Serializer(Mappers);
87
- const listOperationSpec: msRest.OperationSpec = {
116
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
117
+
118
+ const listOperationSpec: coreClient.OperationSpec = {
119
+ path:
120
+ "/subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/capabilities",
88
121
  httpMethod: "GET",
89
- path: "subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/capabilities",
90
- urlParameters: [
91
- Parameters.subscriptionId,
92
- Parameters.locationName
93
- ],
94
- queryParameters: [
95
- Parameters.apiVersion
96
- ],
97
- headerParameters: [
98
- Parameters.acceptLanguage
99
- ],
100
122
  responses: {
101
123
  200: {
102
124
  bodyMapper: Mappers.CapabilitiesListResult
@@ -105,22 +127,18 @@ const listOperationSpec: msRest.OperationSpec = {
105
127
  bodyMapper: Mappers.CloudError
106
128
  }
107
129
  },
130
+ queryParameters: [Parameters.apiVersion],
131
+ urlParameters: [
132
+ Parameters.$host,
133
+ Parameters.subscriptionId,
134
+ Parameters.locationName
135
+ ],
136
+ headerParameters: [Parameters.accept],
108
137
  serializer
109
138
  };
110
-
111
- const listNextOperationSpec: msRest.OperationSpec = {
112
- httpMethod: "GET",
113
- baseUrl: "https://management.azure.com",
139
+ const listNextOperationSpec: coreClient.OperationSpec = {
114
140
  path: "{nextLink}",
115
- urlParameters: [
116
- Parameters.nextPageLink
117
- ],
118
- queryParameters: [
119
- Parameters.apiVersion
120
- ],
121
- headerParameters: [
122
- Parameters.acceptLanguage
123
- ],
141
+ httpMethod: "GET",
124
142
  responses: {
125
143
  200: {
126
144
  bodyMapper: Mappers.CapabilitiesListResult
@@ -129,5 +147,13 @@ const listNextOperationSpec: msRest.OperationSpec = {
129
147
  bodyMapper: Mappers.CloudError
130
148
  }
131
149
  },
150
+ queryParameters: [Parameters.apiVersion],
151
+ urlParameters: [
152
+ Parameters.$host,
153
+ Parameters.subscriptionId,
154
+ Parameters.nextLink,
155
+ Parameters.locationName
156
+ ],
157
+ headerParameters: [Parameters.accept],
132
158
  serializer
133
159
  };
@@ -3,92 +3,109 @@
3
3
  * Licensed under the MIT License.
4
4
  *
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is
7
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
7
  */
9
8
 
10
- import * as msRest from "@azure/ms-rest-js";
11
- import * as Models from "../models";
12
- import * as Mappers from "../models/operationsMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { Operations } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
13
13
  import * as Parameters from "../models/parameters";
14
- import { MySQLManagementClientContext } from "../mySQLManagementClientContext";
14
+ import { MySQLManagementFlexibleServerClient } from "../mySQLManagementFlexibleServerClient";
15
+ import {
16
+ Operation,
17
+ OperationsListNextOptionalParams,
18
+ OperationsListOptionalParams,
19
+ OperationsListResponse,
20
+ OperationsListNextResponse
21
+ } from "../models";
15
22
 
16
- /** Class representing a Operations. */
17
- export class Operations {
18
- private readonly client: MySQLManagementClientContext;
23
+ /// <reference lib="esnext.asynciterable" />
24
+ /** Class containing Operations operations. */
25
+ export class OperationsImpl implements Operations {
26
+ private readonly client: MySQLManagementFlexibleServerClient;
19
27
 
20
28
  /**
21
- * Create a Operations.
22
- * @param {MySQLManagementClientContext} client Reference to the service client.
29
+ * Initialize a new instance of the class Operations class.
30
+ * @param client Reference to the service client
23
31
  */
24
- constructor(client: MySQLManagementClientContext) {
32
+ constructor(client: MySQLManagementFlexibleServerClient) {
25
33
  this.client = client;
26
34
  }
27
35
 
28
36
  /**
29
37
  * Lists all of the available REST API operations.
30
- * @param [options] The optional parameters
31
- * @returns Promise<Models.OperationsListResponse>
38
+ * @param options The options parameters.
32
39
  */
33
- list(options?: msRest.RequestOptionsBase): Promise<Models.OperationsListResponse>;
34
- /**
35
- * @param callback The callback
36
- */
37
- list(callback: msRest.ServiceCallback<Models.OperationListResult>): void;
38
- /**
39
- * @param options The optional parameters
40
- * @param callback The callback
41
- */
42
- list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OperationListResult>): void;
43
- list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OperationListResult>, callback?: msRest.ServiceCallback<Models.OperationListResult>): Promise<Models.OperationsListResponse> {
44
- return this.client.sendOperationRequest(
45
- {
46
- options
40
+ public list(
41
+ options?: OperationsListOptionalParams
42
+ ): PagedAsyncIterableIterator<Operation> {
43
+ const iter = this.listPagingAll(options);
44
+ return {
45
+ next() {
46
+ return iter.next();
47
+ },
48
+ [Symbol.asyncIterator]() {
49
+ return this;
47
50
  },
48
- listOperationSpec,
49
- callback) as Promise<Models.OperationsListResponse>;
51
+ byPage: () => {
52
+ return this.listPagingPage(options);
53
+ }
54
+ };
55
+ }
56
+
57
+ private async *listPagingPage(
58
+ options?: OperationsListOptionalParams
59
+ ): AsyncIterableIterator<Operation[]> {
60
+ let result = await this._list(options);
61
+ yield result.value || [];
62
+ let continuationToken = result.nextLink;
63
+ while (continuationToken) {
64
+ result = await this._listNext(continuationToken, options);
65
+ continuationToken = result.nextLink;
66
+ yield result.value || [];
67
+ }
68
+ }
69
+
70
+ private async *listPagingAll(
71
+ options?: OperationsListOptionalParams
72
+ ): AsyncIterableIterator<Operation> {
73
+ for await (const page of this.listPagingPage(options)) {
74
+ yield* page;
75
+ }
50
76
  }
51
77
 
52
78
  /**
53
79
  * Lists all of the available REST API operations.
54
- * @param nextPageLink The NextLink from the previous successful call to List operation.
55
- * @param [options] The optional parameters
56
- * @returns Promise<Models.OperationsListNextResponse>
57
- */
58
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.OperationsListNextResponse>;
59
- /**
60
- * @param nextPageLink The NextLink from the previous successful call to List operation.
61
- * @param callback The callback
80
+ * @param options The options parameters.
62
81
  */
63
- listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.OperationListResult>): void;
82
+ private _list(
83
+ options?: OperationsListOptionalParams
84
+ ): Promise<OperationsListResponse> {
85
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
86
+ }
87
+
64
88
  /**
65
- * @param nextPageLink The NextLink from the previous successful call to List operation.
66
- * @param options The optional parameters
67
- * @param callback The callback
89
+ * ListNext
90
+ * @param nextLink The nextLink from the previous successful call to the List method.
91
+ * @param options The options parameters.
68
92
  */
69
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OperationListResult>): void;
70
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OperationListResult>, callback?: msRest.ServiceCallback<Models.OperationListResult>): Promise<Models.OperationsListNextResponse> {
93
+ private _listNext(
94
+ nextLink: string,
95
+ options?: OperationsListNextOptionalParams
96
+ ): Promise<OperationsListNextResponse> {
71
97
  return this.client.sendOperationRequest(
72
- {
73
- nextPageLink,
74
- options
75
- },
76
- listNextOperationSpec,
77
- callback) as Promise<Models.OperationsListNextResponse>;
98
+ { nextLink, options },
99
+ listNextOperationSpec
100
+ );
78
101
  }
79
102
  }
80
-
81
103
  // Operation Specifications
82
- const serializer = new msRest.Serializer(Mappers);
83
- const listOperationSpec: msRest.OperationSpec = {
104
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
105
+
106
+ const listOperationSpec: coreClient.OperationSpec = {
107
+ path: "/providers/Microsoft.DBforMySQL/operations",
84
108
  httpMethod: "GET",
85
- path: "providers/Microsoft.DBforMySQL/operations",
86
- queryParameters: [
87
- Parameters.apiVersion
88
- ],
89
- headerParameters: [
90
- Parameters.acceptLanguage
91
- ],
92
109
  responses: {
93
110
  200: {
94
111
  bodyMapper: Mappers.OperationListResult
@@ -97,22 +114,14 @@ const listOperationSpec: msRest.OperationSpec = {
97
114
  bodyMapper: Mappers.CloudError
98
115
  }
99
116
  },
117
+ queryParameters: [Parameters.apiVersion],
118
+ urlParameters: [Parameters.$host],
119
+ headerParameters: [Parameters.accept],
100
120
  serializer
101
121
  };
102
-
103
- const listNextOperationSpec: msRest.OperationSpec = {
104
- httpMethod: "GET",
105
- baseUrl: "https://management.azure.com",
122
+ const listNextOperationSpec: coreClient.OperationSpec = {
106
123
  path: "{nextLink}",
107
- urlParameters: [
108
- Parameters.nextPageLink
109
- ],
110
- queryParameters: [
111
- Parameters.apiVersion
112
- ],
113
- headerParameters: [
114
- Parameters.acceptLanguage
115
- ],
124
+ httpMethod: "GET",
116
125
  responses: {
117
126
  200: {
118
127
  bodyMapper: Mappers.OperationListResult
@@ -121,5 +130,8 @@ const listNextOperationSpec: msRest.OperationSpec = {
121
130
  bodyMapper: Mappers.CloudError
122
131
  }
123
132
  },
133
+ queryParameters: [Parameters.apiVersion],
134
+ urlParameters: [Parameters.$host, Parameters.nextLink],
135
+ headerParameters: [Parameters.accept],
124
136
  serializer
125
137
  };