@azure/arm-mysql 3.4.0 → 5.0.0-alpha.20211215.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (439) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/{LICENSE.txt → LICENSE} +2 -2
  3. package/README.md +65 -83
  4. package/dist/index.js +7800 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/src/index.d.ts +6 -0
  9. package/dist-esm/src/index.d.ts.map +1 -0
  10. package/dist-esm/src/index.js +13 -0
  11. package/dist-esm/src/index.js.map +1 -0
  12. package/dist-esm/src/lroImpl.d.ts +16 -0
  13. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  14. package/dist-esm/src/lroImpl.js +29 -0
  15. package/dist-esm/src/lroImpl.js.map +1 -0
  16. package/dist-esm/src/models/index.d.ts +1641 -0
  17. package/dist-esm/src/models/index.d.ts.map +1 -0
  18. package/dist-esm/src/models/index.js +131 -0
  19. package/dist-esm/src/models/index.js.map +1 -0
  20. package/dist-esm/src/models/mappers.d.ts +79 -0
  21. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  22. package/dist-esm/src/models/mappers.js +2145 -0
  23. package/dist-esm/src/models/mappers.js.map +1 -0
  24. package/dist-esm/src/models/parameters.d.ts +46 -0
  25. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  26. package/dist-esm/src/models/parameters.js +372 -0
  27. package/dist-esm/src/models/parameters.js.map +1 -0
  28. package/dist-esm/src/mySQLManagementClient.d.ts +65 -0
  29. package/dist-esm/src/mySQLManagementClient.d.ts.map +1 -0
  30. package/dist-esm/src/mySQLManagementClient.js +151 -0
  31. package/dist-esm/src/mySQLManagementClient.js.map +1 -0
  32. package/dist-esm/src/mySQLManagementClientContext.d.ts +15 -0
  33. package/dist-esm/src/mySQLManagementClientContext.d.ts.map +1 -0
  34. package/dist-esm/src/mySQLManagementClientContext.js +48 -0
  35. package/dist-esm/src/mySQLManagementClientContext.js.map +1 -0
  36. package/dist-esm/src/operations/advisors.d.ts +46 -0
  37. package/dist-esm/src/operations/advisors.d.ts.map +1 -0
  38. package/dist-esm/src/operations/advisors.js +160 -0
  39. package/dist-esm/src/operations/advisors.js.map +1 -0
  40. package/dist-esm/src/operations/checkNameAvailability.d.ts +19 -0
  41. package/dist-esm/src/operations/checkNameAvailability.d.ts.map +1 -0
  42. package/dist-esm/src/operations/checkNameAvailability.js +49 -0
  43. package/dist-esm/src/operations/checkNameAvailability.js.map +1 -0
  44. package/dist-esm/src/operations/configurations.d.ts +57 -0
  45. package/dist-esm/src/operations/configurations.d.ts.map +1 -0
  46. package/dist-esm/src/operations/configurations.js +219 -0
  47. package/dist-esm/src/operations/configurations.js.map +1 -0
  48. package/dist-esm/src/operations/databases.d.ts +73 -0
  49. package/dist-esm/src/operations/databases.d.ts.map +1 -0
  50. package/dist-esm/src/operations/databases.js +293 -0
  51. package/dist-esm/src/operations/databases.js.map +1 -0
  52. package/dist-esm/src/operations/firewallRules.d.ts +73 -0
  53. package/dist-esm/src/operations/firewallRules.d.ts.map +1 -0
  54. package/dist-esm/src/operations/firewallRules.js +293 -0
  55. package/dist-esm/src/operations/firewallRules.js.map +1 -0
  56. package/dist-esm/src/operations/index.d.ts +26 -0
  57. package/dist-esm/src/operations/index.d.ts.map +1 -0
  58. package/dist-esm/src/operations/index.js +33 -0
  59. package/dist-esm/src/operations/index.js.map +1 -0
  60. package/dist-esm/src/operations/locationBasedPerformanceTier.d.ts +28 -0
  61. package/dist-esm/src/operations/locationBasedPerformanceTier.d.ts.map +1 -0
  62. package/dist-esm/src/operations/locationBasedPerformanceTier.js +96 -0
  63. package/dist-esm/src/operations/locationBasedPerformanceTier.js.map +1 -0
  64. package/dist-esm/src/operations/locationBasedRecommendedActionSessionsOperationStatus.d.ts +20 -0
  65. package/dist-esm/src/operations/locationBasedRecommendedActionSessionsOperationStatus.d.ts.map +1 -0
  66. package/dist-esm/src/operations/locationBasedRecommendedActionSessionsOperationStatus.js +50 -0
  67. package/dist-esm/src/operations/locationBasedRecommendedActionSessionsOperationStatus.js.map +1 -0
  68. package/dist-esm/src/operations/locationBasedRecommendedActionSessionsResult.d.ts +38 -0
  69. package/dist-esm/src/operations/locationBasedRecommendedActionSessionsResult.d.ts.map +1 -0
  70. package/dist-esm/src/operations/locationBasedRecommendedActionSessionsResult.js +137 -0
  71. package/dist-esm/src/operations/locationBasedRecommendedActionSessionsResult.js.map +1 -0
  72. package/dist-esm/src/operations/logFiles.d.ts +30 -0
  73. package/dist-esm/src/operations/logFiles.d.ts.map +1 -0
  74. package/dist-esm/src/operations/logFiles.js +99 -0
  75. package/dist-esm/src/operations/logFiles.js.map +1 -0
  76. package/dist-esm/src/operations/operations.d.ts +18 -0
  77. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  78. package/dist-esm/src/operations/operations.js +46 -0
  79. package/dist-esm/src/operations/operations.js.map +1 -0
  80. package/dist-esm/src/operations/privateEndpointConnections.d.ts +99 -0
  81. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
  82. package/dist-esm/src/operations/privateEndpointConnections.js +429 -0
  83. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
  84. package/dist-esm/src/operations/privateLinkResources.d.ts +46 -0
  85. package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
  86. package/dist-esm/src/operations/privateLinkResources.js +169 -0
  87. package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
  88. package/dist-esm/src/operations/queryTexts.d.ts +49 -0
  89. package/dist-esm/src/operations/queryTexts.d.ts.map +1 -0
  90. package/dist-esm/src/operations/queryTexts.js +172 -0
  91. package/dist-esm/src/operations/queryTexts.js.map +1 -0
  92. package/dist-esm/src/operations/recommendedActions.d.ts +50 -0
  93. package/dist-esm/src/operations/recommendedActions.d.ts.map +1 -0
  94. package/dist-esm/src/operations/recommendedActions.js +173 -0
  95. package/dist-esm/src/operations/recommendedActions.js.map +1 -0
  96. package/dist-esm/src/operations/recoverableServers.d.ts +20 -0
  97. package/dist-esm/src/operations/recoverableServers.d.ts.map +1 -0
  98. package/dist-esm/src/operations/recoverableServers.js +53 -0
  99. package/dist-esm/src/operations/recoverableServers.js.map +1 -0
  100. package/dist-esm/src/operations/replicas.d.ts +30 -0
  101. package/dist-esm/src/operations/replicas.d.ts.map +1 -0
  102. package/dist-esm/src/operations/replicas.js +99 -0
  103. package/dist-esm/src/operations/replicas.js.map +1 -0
  104. package/dist-esm/src/operations/serverAdministrators.d.ts +70 -0
  105. package/dist-esm/src/operations/serverAdministrators.d.ts.map +1 -0
  106. package/dist-esm/src/operations/serverAdministrators.js +287 -0
  107. package/dist-esm/src/operations/serverAdministrators.js.map +1 -0
  108. package/dist-esm/src/operations/serverBasedPerformanceTier.d.ts +30 -0
  109. package/dist-esm/src/operations/serverBasedPerformanceTier.d.ts.map +1 -0
  110. package/dist-esm/src/operations/serverBasedPerformanceTier.js +99 -0
  111. package/dist-esm/src/operations/serverBasedPerformanceTier.js.map +1 -0
  112. package/dist-esm/src/operations/serverKeys.d.ts +81 -0
  113. package/dist-esm/src/operations/serverKeys.d.ts.map +1 -0
  114. package/dist-esm/src/operations/serverKeys.js +331 -0
  115. package/dist-esm/src/operations/serverKeys.js.map +1 -0
  116. package/dist-esm/src/operations/serverParameters.d.ts +30 -0
  117. package/dist-esm/src/operations/serverParameters.d.ts.map +1 -0
  118. package/dist-esm/src/operations/serverParameters.js +110 -0
  119. package/dist-esm/src/operations/serverParameters.js.map +1 -0
  120. package/dist-esm/src/operations/serverSecurityAlertPolicies.d.ts +65 -0
  121. package/dist-esm/src/operations/serverSecurityAlertPolicies.d.ts.map +1 -0
  122. package/dist-esm/src/operations/serverSecurityAlertPolicies.js +255 -0
  123. package/dist-esm/src/operations/serverSecurityAlertPolicies.js.map +1 -0
  124. package/dist-esm/src/operations/servers.d.ts +156 -0
  125. package/dist-esm/src/operations/servers.d.ts.map +1 -0
  126. package/dist-esm/src/operations/servers.js +722 -0
  127. package/dist-esm/src/operations/servers.js.map +1 -0
  128. package/dist-esm/src/operations/topQueryStatistics.d.ts +49 -0
  129. package/dist-esm/src/operations/topQueryStatistics.d.ts.map +1 -0
  130. package/dist-esm/src/operations/topQueryStatistics.js +174 -0
  131. package/dist-esm/src/operations/topQueryStatistics.js.map +1 -0
  132. package/dist-esm/src/operations/virtualNetworkRules.d.ts +81 -0
  133. package/dist-esm/src/operations/virtualNetworkRules.d.ts.map +1 -0
  134. package/dist-esm/src/operations/virtualNetworkRules.js +320 -0
  135. package/dist-esm/src/operations/virtualNetworkRules.js.map +1 -0
  136. package/dist-esm/src/operations/waitStatistics.d.ts +49 -0
  137. package/dist-esm/src/operations/waitStatistics.d.ts.map +1 -0
  138. package/dist-esm/src/operations/waitStatistics.js +174 -0
  139. package/dist-esm/src/operations/waitStatistics.js.map +1 -0
  140. package/dist-esm/src/operationsInterfaces/advisors.d.ts +21 -0
  141. package/dist-esm/src/operationsInterfaces/advisors.d.ts.map +1 -0
  142. package/dist-esm/src/operationsInterfaces/advisors.js +9 -0
  143. package/dist-esm/src/operationsInterfaces/advisors.js.map +1 -0
  144. package/dist-esm/src/operationsInterfaces/checkNameAvailability.d.ts +11 -0
  145. package/dist-esm/src/operationsInterfaces/checkNameAvailability.d.ts.map +1 -0
  146. package/dist-esm/src/operationsInterfaces/checkNameAvailability.js +9 -0
  147. package/dist-esm/src/operationsInterfaces/checkNameAvailability.js.map +1 -0
  148. package/dist-esm/src/operationsInterfaces/configurations.d.ts +40 -0
  149. package/dist-esm/src/operationsInterfaces/configurations.d.ts.map +1 -0
  150. package/dist-esm/src/operationsInterfaces/configurations.js +9 -0
  151. package/dist-esm/src/operationsInterfaces/configurations.js.map +1 -0
  152. package/dist-esm/src/operationsInterfaces/databases.d.ts +56 -0
  153. package/dist-esm/src/operationsInterfaces/databases.d.ts.map +1 -0
  154. package/dist-esm/src/operationsInterfaces/databases.js +9 -0
  155. package/dist-esm/src/operationsInterfaces/databases.js.map +1 -0
  156. package/dist-esm/src/operationsInterfaces/firewallRules.d.ts +56 -0
  157. package/dist-esm/src/operationsInterfaces/firewallRules.d.ts.map +1 -0
  158. package/dist-esm/src/operationsInterfaces/firewallRules.js +9 -0
  159. package/dist-esm/src/operationsInterfaces/firewallRules.js.map +1 -0
  160. package/dist-esm/src/operationsInterfaces/index.d.ts +26 -0
  161. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  162. package/dist-esm/src/operationsInterfaces/index.js +33 -0
  163. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  164. package/dist-esm/src/operationsInterfaces/locationBasedPerformanceTier.d.ts +12 -0
  165. package/dist-esm/src/operationsInterfaces/locationBasedPerformanceTier.d.ts.map +1 -0
  166. package/dist-esm/src/operationsInterfaces/locationBasedPerformanceTier.js +9 -0
  167. package/dist-esm/src/operationsInterfaces/locationBasedPerformanceTier.js.map +1 -0
  168. package/dist-esm/src/operationsInterfaces/locationBasedRecommendedActionSessionsOperationStatus.d.ts +12 -0
  169. package/dist-esm/src/operationsInterfaces/locationBasedRecommendedActionSessionsOperationStatus.d.ts.map +1 -0
  170. package/dist-esm/src/operationsInterfaces/locationBasedRecommendedActionSessionsOperationStatus.js +9 -0
  171. package/dist-esm/src/operationsInterfaces/locationBasedRecommendedActionSessionsOperationStatus.js.map +1 -0
  172. package/dist-esm/src/operationsInterfaces/locationBasedRecommendedActionSessionsResult.d.ts +13 -0
  173. package/dist-esm/src/operationsInterfaces/locationBasedRecommendedActionSessionsResult.d.ts.map +1 -0
  174. package/dist-esm/src/operationsInterfaces/locationBasedRecommendedActionSessionsResult.js +9 -0
  175. package/dist-esm/src/operationsInterfaces/locationBasedRecommendedActionSessionsResult.js.map +1 -0
  176. package/dist-esm/src/operationsInterfaces/logFiles.d.ts +13 -0
  177. package/dist-esm/src/operationsInterfaces/logFiles.d.ts.map +1 -0
  178. package/dist-esm/src/operationsInterfaces/logFiles.js +9 -0
  179. package/dist-esm/src/operationsInterfaces/logFiles.js.map +1 -0
  180. package/dist-esm/src/operationsInterfaces/operations.d.ts +10 -0
  181. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  182. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  183. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  184. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +74 -0
  185. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
  186. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
  187. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
  188. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +21 -0
  189. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
  190. package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
  191. package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
  192. package/dist-esm/src/operationsInterfaces/queryTexts.d.ts +22 -0
  193. package/dist-esm/src/operationsInterfaces/queryTexts.d.ts.map +1 -0
  194. package/dist-esm/src/operationsInterfaces/queryTexts.js +9 -0
  195. package/dist-esm/src/operationsInterfaces/queryTexts.js.map +1 -0
  196. package/dist-esm/src/operationsInterfaces/recommendedActions.d.ts +23 -0
  197. package/dist-esm/src/operationsInterfaces/recommendedActions.d.ts.map +1 -0
  198. package/dist-esm/src/operationsInterfaces/recommendedActions.js +9 -0
  199. package/dist-esm/src/operationsInterfaces/recommendedActions.js.map +1 -0
  200. package/dist-esm/src/operationsInterfaces/recoverableServers.d.ts +12 -0
  201. package/dist-esm/src/operationsInterfaces/recoverableServers.d.ts.map +1 -0
  202. package/dist-esm/src/operationsInterfaces/recoverableServers.js +9 -0
  203. package/dist-esm/src/operationsInterfaces/recoverableServers.js.map +1 -0
  204. package/dist-esm/src/operationsInterfaces/replicas.d.ts +13 -0
  205. package/dist-esm/src/operationsInterfaces/replicas.d.ts.map +1 -0
  206. package/dist-esm/src/operationsInterfaces/replicas.js +9 -0
  207. package/dist-esm/src/operationsInterfaces/replicas.js.map +1 -0
  208. package/dist-esm/src/operationsInterfaces/serverAdministrators.d.ts +53 -0
  209. package/dist-esm/src/operationsInterfaces/serverAdministrators.d.ts.map +1 -0
  210. package/dist-esm/src/operationsInterfaces/serverAdministrators.js +9 -0
  211. package/dist-esm/src/operationsInterfaces/serverAdministrators.js.map +1 -0
  212. package/dist-esm/src/operationsInterfaces/serverBasedPerformanceTier.d.ts +13 -0
  213. package/dist-esm/src/operationsInterfaces/serverBasedPerformanceTier.d.ts.map +1 -0
  214. package/dist-esm/src/operationsInterfaces/serverBasedPerformanceTier.js +9 -0
  215. package/dist-esm/src/operationsInterfaces/serverBasedPerformanceTier.js.map +1 -0
  216. package/dist-esm/src/operationsInterfaces/serverKeys.d.ts +56 -0
  217. package/dist-esm/src/operationsInterfaces/serverKeys.d.ts.map +1 -0
  218. package/dist-esm/src/operationsInterfaces/serverKeys.js +9 -0
  219. package/dist-esm/src/operationsInterfaces/serverKeys.js.map +1 -0
  220. package/dist-esm/src/operationsInterfaces/serverParameters.d.ts +22 -0
  221. package/dist-esm/src/operationsInterfaces/serverParameters.d.ts.map +1 -0
  222. package/dist-esm/src/operationsInterfaces/serverParameters.js +9 -0
  223. package/dist-esm/src/operationsInterfaces/serverParameters.js.map +1 -0
  224. package/dist-esm/src/operationsInterfaces/serverSecurityAlertPolicies.d.ts +40 -0
  225. package/dist-esm/src/operationsInterfaces/serverSecurityAlertPolicies.d.ts.map +1 -0
  226. package/dist-esm/src/operationsInterfaces/serverSecurityAlertPolicies.js +9 -0
  227. package/dist-esm/src/operationsInterfaces/serverSecurityAlertPolicies.js.map +1 -0
  228. package/dist-esm/src/operationsInterfaces/servers.d.ts +133 -0
  229. package/dist-esm/src/operationsInterfaces/servers.d.ts.map +1 -0
  230. package/dist-esm/src/operationsInterfaces/servers.js +9 -0
  231. package/dist-esm/src/operationsInterfaces/servers.js.map +1 -0
  232. package/dist-esm/src/operationsInterfaces/topQueryStatistics.d.ts +22 -0
  233. package/dist-esm/src/operationsInterfaces/topQueryStatistics.d.ts.map +1 -0
  234. package/dist-esm/src/operationsInterfaces/topQueryStatistics.js +9 -0
  235. package/dist-esm/src/operationsInterfaces/topQueryStatistics.js.map +1 -0
  236. package/dist-esm/src/operationsInterfaces/virtualNetworkRules.d.ts +56 -0
  237. package/dist-esm/src/operationsInterfaces/virtualNetworkRules.d.ts.map +1 -0
  238. package/dist-esm/src/operationsInterfaces/virtualNetworkRules.js +9 -0
  239. package/dist-esm/src/operationsInterfaces/virtualNetworkRules.js.map +1 -0
  240. package/dist-esm/src/operationsInterfaces/waitStatistics.d.ts +22 -0
  241. package/dist-esm/src/operationsInterfaces/waitStatistics.d.ts.map +1 -0
  242. package/dist-esm/src/operationsInterfaces/waitStatistics.js +9 -0
  243. package/dist-esm/src/operationsInterfaces/waitStatistics.js.map +1 -0
  244. package/dist-esm/test/sampleTest.d.ts +2 -0
  245. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  246. package/dist-esm/test/sampleTest.js +40 -0
  247. package/dist-esm/test/sampleTest.js.map +1 -0
  248. package/package.json +63 -21
  249. package/review/arm-mysql.api.md +1577 -0
  250. package/rollup.config.js +181 -30
  251. package/src/index.ts +13 -0
  252. package/src/lroImpl.ts +34 -0
  253. package/src/models/index.ts +1584 -1096
  254. package/src/models/mappers.ts +1763 -534
  255. package/src/models/parameters.ts +344 -41
  256. package/src/mySQLManagementClient.ts +280 -51
  257. package/src/mySQLManagementClientContext.ts +46 -46
  258. package/src/operations/advisors.ts +224 -0
  259. package/src/operations/checkNameAvailability.ts +34 -57
  260. package/src/operations/configurations.ts +234 -150
  261. package/src/operations/databases.ts +324 -194
  262. package/src/operations/firewallRules.ts +324 -194
  263. package/src/operations/index.ts +18 -6
  264. package/src/operations/locationBasedPerformanceTier.ts +75 -44
  265. package/src/operations/locationBasedRecommendedActionSessionsOperationStatus.ts +70 -0
  266. package/src/operations/locationBasedRecommendedActionSessionsResult.ts +178 -0
  267. package/src/operations/logFiles.ts +97 -52
  268. package/src/operations/operations.ts +26 -41
  269. package/src/operations/privateEndpointConnections.ts +621 -0
  270. package/src/operations/privateLinkResources.ts +233 -0
  271. package/src/operations/queryTexts.ts +246 -0
  272. package/src/operations/recommendedActions.ts +248 -0
  273. package/src/operations/recoverableServers.ts +72 -0
  274. package/src/operations/replicas.ts +97 -52
  275. package/src/operations/serverAdministrators.ts +397 -0
  276. package/src/operations/serverBasedPerformanceTier.ts +124 -0
  277. package/src/operations/serverKeys.ts +464 -0
  278. package/src/operations/serverParameters.ts +160 -0
  279. package/src/operations/serverSecurityAlertPolicies.ts +300 -95
  280. package/src/operations/servers.ts +828 -280
  281. package/src/operations/topQueryStatistics.ts +249 -0
  282. package/src/operations/virtualNetworkRules.ts +357 -233
  283. package/src/operations/waitStatistics.ts +249 -0
  284. package/src/operationsInterfaces/advisors.ts +44 -0
  285. package/src/operationsInterfaces/checkNameAvailability.ts +26 -0
  286. package/src/operationsInterfaces/configurations.ts +82 -0
  287. package/src/operationsInterfaces/databases.ts +109 -0
  288. package/src/operationsInterfaces/firewallRules.ts +109 -0
  289. package/src/operationsInterfaces/index.ts +33 -0
  290. package/src/operationsInterfaces/locationBasedPerformanceTier.ts +27 -0
  291. package/src/operationsInterfaces/locationBasedRecommendedActionSessionsOperationStatus.ts +27 -0
  292. package/src/operationsInterfaces/locationBasedRecommendedActionSessionsResult.ts +29 -0
  293. package/src/operationsInterfaces/logFiles.ts +26 -0
  294. package/src/operationsInterfaces/operations.ts +21 -0
  295. package/src/operationsInterfaces/privateEndpointConnections.ts +147 -0
  296. package/src/operationsInterfaces/privateLinkResources.ts +44 -0
  297. package/src/operationsInterfaces/queryTexts.ts +46 -0
  298. package/src/operationsInterfaces/recommendedActions.ts +48 -0
  299. package/src/operationsInterfaces/recoverableServers.ts +27 -0
  300. package/src/operationsInterfaces/replicas.ts +26 -0
  301. package/src/operationsInterfaces/serverAdministrators.ts +101 -0
  302. package/src/operationsInterfaces/serverBasedPerformanceTier.ts +29 -0
  303. package/src/operationsInterfaces/serverKeys.ts +109 -0
  304. package/src/operationsInterfaces/serverParameters.ts +49 -0
  305. package/src/operationsInterfaces/serverSecurityAlertPolicies.ts +83 -0
  306. package/src/operationsInterfaces/servers.ts +233 -0
  307. package/src/operationsInterfaces/topQueryStatistics.ts +47 -0
  308. package/src/operationsInterfaces/virtualNetworkRules.ts +109 -0
  309. package/src/operationsInterfaces/waitStatistics.ts +47 -0
  310. package/tsconfig.json +4 -4
  311. package/types/arm-mysql.d.ts +2739 -0
  312. package/types/tsdoc-metadata.json +11 -0
  313. package/dist/arm-mysql.js +0 -3173
  314. package/dist/arm-mysql.js.map +0 -1
  315. package/dist/arm-mysql.min.js +0 -1
  316. package/dist/arm-mysql.min.js.map +0 -1
  317. package/esm/models/checkNameAvailabilityMappers.d.ts +0 -2
  318. package/esm/models/checkNameAvailabilityMappers.d.ts.map +0 -1
  319. package/esm/models/checkNameAvailabilityMappers.js +0 -9
  320. package/esm/models/checkNameAvailabilityMappers.js.map +0 -1
  321. package/esm/models/configurationsMappers.d.ts +0 -2
  322. package/esm/models/configurationsMappers.d.ts.map +0 -1
  323. package/esm/models/configurationsMappers.js +0 -9
  324. package/esm/models/configurationsMappers.js.map +0 -1
  325. package/esm/models/databasesMappers.d.ts +0 -2
  326. package/esm/models/databasesMappers.d.ts.map +0 -1
  327. package/esm/models/databasesMappers.js +0 -9
  328. package/esm/models/databasesMappers.js.map +0 -1
  329. package/esm/models/firewallRulesMappers.d.ts +0 -2
  330. package/esm/models/firewallRulesMappers.d.ts.map +0 -1
  331. package/esm/models/firewallRulesMappers.js +0 -9
  332. package/esm/models/firewallRulesMappers.js.map +0 -1
  333. package/esm/models/index.d.ts +0 -1319
  334. package/esm/models/index.d.ts.map +0 -1
  335. package/esm/models/index.js +0 -8
  336. package/esm/models/index.js.map +0 -1
  337. package/esm/models/locationBasedPerformanceTierMappers.d.ts +0 -2
  338. package/esm/models/locationBasedPerformanceTierMappers.d.ts.map +0 -1
  339. package/esm/models/locationBasedPerformanceTierMappers.js +0 -9
  340. package/esm/models/locationBasedPerformanceTierMappers.js.map +0 -1
  341. package/esm/models/logFilesMappers.d.ts +0 -2
  342. package/esm/models/logFilesMappers.d.ts.map +0 -1
  343. package/esm/models/logFilesMappers.js +0 -9
  344. package/esm/models/logFilesMappers.js.map +0 -1
  345. package/esm/models/mappers.d.ts +0 -43
  346. package/esm/models/mappers.d.ts.map +0 -1
  347. package/esm/models/mappers.js +0 -1037
  348. package/esm/models/mappers.js.map +0 -1
  349. package/esm/models/operationsMappers.d.ts +0 -2
  350. package/esm/models/operationsMappers.d.ts.map +0 -1
  351. package/esm/models/operationsMappers.js +0 -9
  352. package/esm/models/operationsMappers.js.map +0 -1
  353. package/esm/models/parameters.d.ts +0 -14
  354. package/esm/models/parameters.d.ts.map +0 -1
  355. package/esm/models/parameters.js +0 -133
  356. package/esm/models/parameters.js.map +0 -1
  357. package/esm/models/replicasMappers.d.ts +0 -2
  358. package/esm/models/replicasMappers.d.ts.map +0 -1
  359. package/esm/models/replicasMappers.js +0 -9
  360. package/esm/models/replicasMappers.js.map +0 -1
  361. package/esm/models/serverSecurityAlertPoliciesMappers.d.ts +0 -2
  362. package/esm/models/serverSecurityAlertPoliciesMappers.d.ts.map +0 -1
  363. package/esm/models/serverSecurityAlertPoliciesMappers.js +0 -9
  364. package/esm/models/serverSecurityAlertPoliciesMappers.js.map +0 -1
  365. package/esm/models/serversMappers.d.ts +0 -2
  366. package/esm/models/serversMappers.d.ts.map +0 -1
  367. package/esm/models/serversMappers.js +0 -9
  368. package/esm/models/serversMappers.js.map +0 -1
  369. package/esm/models/virtualNetworkRulesMappers.d.ts +0 -2
  370. package/esm/models/virtualNetworkRulesMappers.d.ts.map +0 -1
  371. package/esm/models/virtualNetworkRulesMappers.js +0 -9
  372. package/esm/models/virtualNetworkRulesMappers.js.map +0 -1
  373. package/esm/mySQLManagementClient.d.ts +0 -34
  374. package/esm/mySQLManagementClient.d.ts.map +0 -1
  375. package/esm/mySQLManagementClient.js +0 -48
  376. package/esm/mySQLManagementClient.js.map +0 -1
  377. package/esm/mySQLManagementClientContext.d.ts +0 -22
  378. package/esm/mySQLManagementClientContext.d.ts.map +0 -1
  379. package/esm/mySQLManagementClientContext.js +0 -61
  380. package/esm/mySQLManagementClientContext.js.map +0 -1
  381. package/esm/operations/checkNameAvailability.d.ts +0 -34
  382. package/esm/operations/checkNameAvailability.d.ts.map +0 -1
  383. package/esm/operations/checkNameAvailability.js +0 -60
  384. package/esm/operations/checkNameAvailability.js.map +0 -1
  385. package/esm/operations/configurations.d.ts +0 -87
  386. package/esm/operations/configurations.d.ts.map +0 -1
  387. package/esm/operations/configurations.js +0 -155
  388. package/esm/operations/configurations.js.map +0 -1
  389. package/esm/operations/databases.d.ts +0 -107
  390. package/esm/operations/databases.d.ts.map +0 -1
  391. package/esm/operations/databases.js +0 -213
  392. package/esm/operations/databases.js.map +0 -1
  393. package/esm/operations/firewallRules.d.ts +0 -107
  394. package/esm/operations/firewallRules.d.ts.map +0 -1
  395. package/esm/operations/firewallRules.js +0 -213
  396. package/esm/operations/firewallRules.js.map +0 -1
  397. package/esm/operations/index.d.ts +0 -12
  398. package/esm/operations/index.d.ts.map +0 -1
  399. package/esm/operations/index.js +0 -21
  400. package/esm/operations/index.js.map +0 -1
  401. package/esm/operations/locationBasedPerformanceTier.d.ts +0 -31
  402. package/esm/operations/locationBasedPerformanceTier.d.ts.map +0 -1
  403. package/esm/operations/locationBasedPerformanceTier.js +0 -56
  404. package/esm/operations/locationBasedPerformanceTier.js.map +0 -1
  405. package/esm/operations/logFiles.d.ts +0 -37
  406. package/esm/operations/logFiles.d.ts.map +0 -1
  407. package/esm/operations/logFiles.js +0 -58
  408. package/esm/operations/logFiles.js.map +0 -1
  409. package/esm/operations/operations.d.ts +0 -28
  410. package/esm/operations/operations.d.ts.map +0 -1
  411. package/esm/operations/operations.js +0 -51
  412. package/esm/operations/operations.js.map +0 -1
  413. package/esm/operations/replicas.d.ts +0 -37
  414. package/esm/operations/replicas.d.ts.map +0 -1
  415. package/esm/operations/replicas.js +0 -58
  416. package/esm/operations/replicas.js.map +0 -1
  417. package/esm/operations/serverSecurityAlertPolicies.d.ts +0 -58
  418. package/esm/operations/serverSecurityAlertPolicies.d.ts.map +0 -1
  419. package/esm/operations/serverSecurityAlertPolicies.js +0 -120
  420. package/esm/operations/serverSecurityAlertPolicies.js.map +0 -1
  421. package/esm/operations/servers.d.ts +0 -154
  422. package/esm/operations/servers.d.ts.map +0 -1
  423. package/esm/operations/servers.js +0 -341
  424. package/esm/operations/servers.js.map +0 -1
  425. package/esm/operations/virtualNetworkRules.d.ts +0 -125
  426. package/esm/operations/virtualNetworkRules.d.ts.map +0 -1
  427. package/esm/operations/virtualNetworkRules.js +0 -239
  428. package/esm/operations/virtualNetworkRules.js.map +0 -1
  429. package/src/models/checkNameAvailabilityMappers.ts +0 -14
  430. package/src/models/configurationsMappers.ts +0 -25
  431. package/src/models/databasesMappers.ts +0 -25
  432. package/src/models/firewallRulesMappers.ts +0 -25
  433. package/src/models/locationBasedPerformanceTierMappers.ts +0 -15
  434. package/src/models/logFilesMappers.ts +0 -25
  435. package/src/models/operationsMappers.ts +0 -15
  436. package/src/models/replicasMappers.ts +0 -25
  437. package/src/models/serverSecurityAlertPoliciesMappers.ts +0 -24
  438. package/src/models/serversMappers.ts +0 -32
  439. package/src/models/virtualNetworkRulesMappers.ts +0 -25
@@ -1,68 +1,297 @@
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 { TokenCredential } from "@azure/core-auth";
13
- import * as Models from "./models";
9
+ import * as coreClient from "@azure/core-client";
10
+ import * as coreAuth from "@azure/core-auth";
11
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
12
+ import { LroImpl } from "./lroImpl";
13
+ import {
14
+ ServersImpl,
15
+ ReplicasImpl,
16
+ FirewallRulesImpl,
17
+ VirtualNetworkRulesImpl,
18
+ DatabasesImpl,
19
+ ConfigurationsImpl,
20
+ ServerParametersImpl,
21
+ LogFilesImpl,
22
+ ServerAdministratorsImpl,
23
+ RecoverableServersImpl,
24
+ ServerBasedPerformanceTierImpl,
25
+ LocationBasedPerformanceTierImpl,
26
+ CheckNameAvailabilityImpl,
27
+ OperationsImpl,
28
+ ServerSecurityAlertPoliciesImpl,
29
+ QueryTextsImpl,
30
+ TopQueryStatisticsImpl,
31
+ WaitStatisticsImpl,
32
+ AdvisorsImpl,
33
+ RecommendedActionsImpl,
34
+ LocationBasedRecommendedActionSessionsOperationStatusImpl,
35
+ LocationBasedRecommendedActionSessionsResultImpl,
36
+ PrivateEndpointConnectionsImpl,
37
+ PrivateLinkResourcesImpl,
38
+ ServerKeysImpl
39
+ } from "./operations";
40
+ import {
41
+ Servers,
42
+ Replicas,
43
+ FirewallRules,
44
+ VirtualNetworkRules,
45
+ Databases,
46
+ Configurations,
47
+ ServerParameters,
48
+ LogFiles,
49
+ ServerAdministrators,
50
+ RecoverableServers,
51
+ ServerBasedPerformanceTier,
52
+ LocationBasedPerformanceTier,
53
+ CheckNameAvailability,
54
+ Operations,
55
+ ServerSecurityAlertPolicies,
56
+ QueryTexts,
57
+ TopQueryStatistics,
58
+ WaitStatistics,
59
+ Advisors,
60
+ RecommendedActions,
61
+ LocationBasedRecommendedActionSessionsOperationStatus,
62
+ LocationBasedRecommendedActionSessionsResult,
63
+ PrivateEndpointConnections,
64
+ PrivateLinkResources,
65
+ ServerKeys
66
+ } from "./operationsInterfaces";
67
+ import * as Parameters from "./models/parameters";
14
68
  import * as Mappers from "./models/mappers";
15
- import * as operations from "./operations";
16
69
  import { MySQLManagementClientContext } from "./mySQLManagementClientContext";
70
+ import {
71
+ MySQLManagementClientOptionalParams,
72
+ ResetQueryPerformanceInsightDataOptionalParams,
73
+ ResetQueryPerformanceInsightDataResponse,
74
+ CreateRecommendedActionSessionOptionalParams
75
+ } from "./models";
17
76
 
18
-
19
- class MySQLManagementClient extends MySQLManagementClientContext {
20
- // Operation groups
21
- servers: operations.Servers;
22
- replicas: operations.Replicas;
23
- firewallRules: operations.FirewallRules;
24
- virtualNetworkRules: operations.VirtualNetworkRules;
25
- databases: operations.Databases;
26
- configurations: operations.Configurations;
27
- logFiles: operations.LogFiles;
28
- locationBasedPerformanceTier: operations.LocationBasedPerformanceTier;
29
- checkNameAvailability: operations.CheckNameAvailability;
30
- serverSecurityAlertPolicies: operations.ServerSecurityAlertPolicies;
31
- operations: operations.Operations;
32
-
77
+ export class MySQLManagementClient extends MySQLManagementClientContext {
33
78
  /**
34
79
  * Initializes a new instance of the MySQLManagementClient class.
35
- * @param credentials Credentials needed for the client to connect to Azure. Credentials
36
- * implementing the TokenCredential interface from the @azure/identity package are recommended. For
37
- * more information about these credentials, see
38
- * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
39
- * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
40
- * @azure/ms-rest-browserauth are also supported.
41
- * @param subscriptionId The subscription ID that identifies an Azure subscription.
42
- * @param [options] The parameter options
80
+ * @param credentials Subscription credentials which uniquely identify client subscription.
81
+ * @param subscriptionId The ID of the target subscription.
82
+ * @param options The parameter options
43
83
  */
44
- constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MySQLManagementClientOptions) {
84
+ constructor(
85
+ credentials: coreAuth.TokenCredential,
86
+ subscriptionId: string,
87
+ options?: MySQLManagementClientOptionalParams
88
+ ) {
45
89
  super(credentials, subscriptionId, options);
46
- this.servers = new operations.Servers(this);
47
- this.replicas = new operations.Replicas(this);
48
- this.firewallRules = new operations.FirewallRules(this);
49
- this.virtualNetworkRules = new operations.VirtualNetworkRules(this);
50
- this.databases = new operations.Databases(this);
51
- this.configurations = new operations.Configurations(this);
52
- this.logFiles = new operations.LogFiles(this);
53
- this.locationBasedPerformanceTier = new operations.LocationBasedPerformanceTier(this);
54
- this.checkNameAvailability = new operations.CheckNameAvailability(this);
55
- this.serverSecurityAlertPolicies = new operations.ServerSecurityAlertPolicies(this);
56
- this.operations = new operations.Operations(this);
90
+ this.servers = new ServersImpl(this);
91
+ this.replicas = new ReplicasImpl(this);
92
+ this.firewallRules = new FirewallRulesImpl(this);
93
+ this.virtualNetworkRules = new VirtualNetworkRulesImpl(this);
94
+ this.databases = new DatabasesImpl(this);
95
+ this.configurations = new ConfigurationsImpl(this);
96
+ this.serverParameters = new ServerParametersImpl(this);
97
+ this.logFiles = new LogFilesImpl(this);
98
+ this.serverAdministrators = new ServerAdministratorsImpl(this);
99
+ this.recoverableServers = new RecoverableServersImpl(this);
100
+ this.serverBasedPerformanceTier = new ServerBasedPerformanceTierImpl(this);
101
+ this.locationBasedPerformanceTier = new LocationBasedPerformanceTierImpl(
102
+ this
103
+ );
104
+ this.checkNameAvailability = new CheckNameAvailabilityImpl(this);
105
+ this.operations = new OperationsImpl(this);
106
+ this.serverSecurityAlertPolicies = new ServerSecurityAlertPoliciesImpl(
107
+ this
108
+ );
109
+ this.queryTexts = new QueryTextsImpl(this);
110
+ this.topQueryStatistics = new TopQueryStatisticsImpl(this);
111
+ this.waitStatistics = new WaitStatisticsImpl(this);
112
+ this.advisors = new AdvisorsImpl(this);
113
+ this.recommendedActions = new RecommendedActionsImpl(this);
114
+ this.locationBasedRecommendedActionSessionsOperationStatus = new LocationBasedRecommendedActionSessionsOperationStatusImpl(
115
+ this
116
+ );
117
+ this.locationBasedRecommendedActionSessionsResult = new LocationBasedRecommendedActionSessionsResultImpl(
118
+ this
119
+ );
120
+ this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);
121
+ this.privateLinkResources = new PrivateLinkResourcesImpl(this);
122
+ this.serverKeys = new ServerKeysImpl(this);
123
+ }
124
+
125
+ /**
126
+ * Reset data for Query Performance Insight.
127
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
128
+ * @param serverName The name of the server.
129
+ * @param options The options parameters.
130
+ */
131
+ resetQueryPerformanceInsightData(
132
+ resourceGroupName: string,
133
+ serverName: string,
134
+ options?: ResetQueryPerformanceInsightDataOptionalParams
135
+ ): Promise<ResetQueryPerformanceInsightDataResponse> {
136
+ return this.sendOperationRequest(
137
+ { resourceGroupName, serverName, options },
138
+ resetQueryPerformanceInsightDataOperationSpec
139
+ );
140
+ }
141
+
142
+ /**
143
+ * Create recommendation action session for the advisor.
144
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
145
+ * @param serverName The name of the server.
146
+ * @param advisorName The advisor name for recommendation action.
147
+ * @param databaseName The name of the database.
148
+ * @param options The options parameters.
149
+ */
150
+ async beginCreateRecommendedActionSession(
151
+ resourceGroupName: string,
152
+ serverName: string,
153
+ advisorName: string,
154
+ databaseName: string,
155
+ options?: CreateRecommendedActionSessionOptionalParams
156
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
157
+ const directSendOperation = async (
158
+ args: coreClient.OperationArguments,
159
+ spec: coreClient.OperationSpec
160
+ ): Promise<void> => {
161
+ return this.sendOperationRequest(args, spec);
162
+ };
163
+ const sendOperation = async (
164
+ args: coreClient.OperationArguments,
165
+ spec: coreClient.OperationSpec
166
+ ) => {
167
+ let currentRawResponse:
168
+ | coreClient.FullOperationResponse
169
+ | undefined = undefined;
170
+ const providedCallback = args.options?.onResponse;
171
+ const callback: coreClient.RawResponseCallback = (
172
+ rawResponse: coreClient.FullOperationResponse,
173
+ flatResponse: unknown
174
+ ) => {
175
+ currentRawResponse = rawResponse;
176
+ providedCallback?.(rawResponse, flatResponse);
177
+ };
178
+ const updatedArgs = {
179
+ ...args,
180
+ options: {
181
+ ...args.options,
182
+ onResponse: callback
183
+ }
184
+ };
185
+ const flatResponse = await directSendOperation(updatedArgs, spec);
186
+ return {
187
+ flatResponse,
188
+ rawResponse: {
189
+ statusCode: currentRawResponse!.status,
190
+ body: currentRawResponse!.parsedBody,
191
+ headers: currentRawResponse!.headers.toJSON()
192
+ }
193
+ };
194
+ };
195
+
196
+ const lro = new LroImpl(
197
+ sendOperation,
198
+ { resourceGroupName, serverName, advisorName, databaseName, options },
199
+ createRecommendedActionSessionOperationSpec
200
+ );
201
+ return new LroEngine(lro, {
202
+ resumeFrom: options?.resumeFrom,
203
+ intervalInMs: options?.updateIntervalInMs
204
+ });
57
205
  }
58
- }
59
206
 
207
+ /**
208
+ * Create recommendation action session for the advisor.
209
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
210
+ * @param serverName The name of the server.
211
+ * @param advisorName The advisor name for recommendation action.
212
+ * @param databaseName The name of the database.
213
+ * @param options The options parameters.
214
+ */
215
+ async beginCreateRecommendedActionSessionAndWait(
216
+ resourceGroupName: string,
217
+ serverName: string,
218
+ advisorName: string,
219
+ databaseName: string,
220
+ options?: CreateRecommendedActionSessionOptionalParams
221
+ ): Promise<void> {
222
+ const poller = await this.beginCreateRecommendedActionSession(
223
+ resourceGroupName,
224
+ serverName,
225
+ advisorName,
226
+ databaseName,
227
+ options
228
+ );
229
+ return poller.pollUntilDone();
230
+ }
231
+
232
+ servers: Servers;
233
+ replicas: Replicas;
234
+ firewallRules: FirewallRules;
235
+ virtualNetworkRules: VirtualNetworkRules;
236
+ databases: Databases;
237
+ configurations: Configurations;
238
+ serverParameters: ServerParameters;
239
+ logFiles: LogFiles;
240
+ serverAdministrators: ServerAdministrators;
241
+ recoverableServers: RecoverableServers;
242
+ serverBasedPerformanceTier: ServerBasedPerformanceTier;
243
+ locationBasedPerformanceTier: LocationBasedPerformanceTier;
244
+ checkNameAvailability: CheckNameAvailability;
245
+ operations: Operations;
246
+ serverSecurityAlertPolicies: ServerSecurityAlertPolicies;
247
+ queryTexts: QueryTexts;
248
+ topQueryStatistics: TopQueryStatistics;
249
+ waitStatistics: WaitStatistics;
250
+ advisors: Advisors;
251
+ recommendedActions: RecommendedActions;
252
+ locationBasedRecommendedActionSessionsOperationStatus: LocationBasedRecommendedActionSessionsOperationStatus;
253
+ locationBasedRecommendedActionSessionsResult: LocationBasedRecommendedActionSessionsResult;
254
+ privateEndpointConnections: PrivateEndpointConnections;
255
+ privateLinkResources: PrivateLinkResources;
256
+ serverKeys: ServerKeys;
257
+ }
60
258
  // Operation Specifications
259
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
61
260
 
62
- export {
63
- MySQLManagementClient,
64
- MySQLManagementClientContext,
65
- Models as MySQLManagementModels,
66
- Mappers as MySQLManagementMappers
261
+ const resetQueryPerformanceInsightDataOperationSpec: coreClient.OperationSpec = {
262
+ path:
263
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/resetQueryPerformanceInsightData",
264
+ httpMethod: "POST",
265
+ responses: {
266
+ 200: {
267
+ bodyMapper: Mappers.QueryPerformanceInsightResetDataResult
268
+ },
269
+ default: {
270
+ bodyMapper: Mappers.CloudError
271
+ }
272
+ },
273
+ queryParameters: [Parameters.apiVersion2],
274
+ urlParameters: [
275
+ Parameters.$host,
276
+ Parameters.subscriptionId,
277
+ Parameters.resourceGroupName,
278
+ Parameters.serverName
279
+ ],
280
+ headerParameters: [Parameters.accept],
281
+ serializer
282
+ };
283
+ const createRecommendedActionSessionOperationSpec: coreClient.OperationSpec = {
284
+ path:
285
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/advisors/{advisorName}/createRecommendedActionSession",
286
+ httpMethod: "POST",
287
+ responses: { 200: {}, 201: {}, 202: {}, 204: {} },
288
+ queryParameters: [Parameters.apiVersion2, Parameters.databaseName1],
289
+ urlParameters: [
290
+ Parameters.$host,
291
+ Parameters.subscriptionId,
292
+ Parameters.resourceGroupName,
293
+ Parameters.serverName,
294
+ Parameters.advisorName
295
+ ],
296
+ serializer
67
297
  };
68
- export * from "./operations";
@@ -1,68 +1,68 @@
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 Models from "./models";
12
- import * as msRest from "@azure/ms-rest-js";
13
- import { TokenCredential } from "@azure/core-auth";
14
- import * as msRestAzure from "@azure/ms-rest-azure-js";
9
+ import * as coreClient from "@azure/core-client";
10
+ import * as coreAuth from "@azure/core-auth";
11
+ import { MySQLManagementClientOptionalParams } from "./models";
15
12
 
16
- const packageName = "@azure/arm-mysql";
17
- const packageVersion = "3.4.0";
18
-
19
- export class MySQLManagementClientContext extends msRestAzure.AzureServiceClient {
20
- credentials: msRest.ServiceClientCredentials | TokenCredential;
13
+ export class MySQLManagementClientContext extends coreClient.ServiceClient {
14
+ $host: string;
21
15
  subscriptionId: string;
22
- apiVersion?: string;
23
16
 
24
17
  /**
25
- * Initializes a new instance of the MySQLManagementClient class.
26
- * @param credentials Credentials needed for the client to connect to Azure. Credentials
27
- * implementing the TokenCredential interface from the @azure/identity package are recommended. For
28
- * more information about these credentials, see
29
- * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
30
- * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
31
- * @azure/ms-rest-browserauth are also supported.
32
- * @param subscriptionId The subscription ID that identifies an Azure subscription.
33
- * @param [options] The parameter options
18
+ * Initializes a new instance of the MySQLManagementClientContext class.
19
+ * @param credentials Subscription credentials which uniquely identify client subscription.
20
+ * @param subscriptionId The ID of the target subscription.
21
+ * @param options The parameter options
34
22
  */
35
- constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MySQLManagementClientOptions) {
36
- if (credentials == undefined) {
37
- throw new Error('\'credentials\' cannot be null.');
23
+ constructor(
24
+ credentials: coreAuth.TokenCredential,
25
+ subscriptionId: string,
26
+ options?: MySQLManagementClientOptionalParams
27
+ ) {
28
+ if (credentials === undefined) {
29
+ throw new Error("'credentials' cannot be null");
38
30
  }
39
- if (subscriptionId == undefined) {
40
- throw new Error('\'subscriptionId\' cannot be null.');
31
+ if (subscriptionId === undefined) {
32
+ throw new Error("'subscriptionId' cannot be null");
41
33
  }
42
34
 
35
+ // Initializing default values for options
43
36
  if (!options) {
44
37
  options = {};
45
38
  }
46
- if(!options.userAgent) {
47
- const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
48
- options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
49
- }
39
+ const defaults: MySQLManagementClientOptionalParams = {
40
+ requestContentType: "application/json; charset=utf-8",
41
+ credential: credentials
42
+ };
50
43
 
51
- super(credentials, options);
44
+ const packageDetails = `azsdk-js-arm-mysql/5.0.0-beta.1`;
45
+ const userAgentPrefix =
46
+ options.userAgentOptions && options.userAgentOptions.userAgentPrefix
47
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
48
+ : `${packageDetails}`;
52
49
 
53
- this.apiVersion = '2017-12-01';
54
- this.acceptLanguage = 'en-US';
55
- this.longRunningOperationRetryTimeout = 30;
56
- this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
57
- this.requestContentType = "application/json; charset=utf-8";
58
- this.credentials = credentials;
50
+ if (!options.credentialScopes) {
51
+ options.credentialScopes = ["https://management.azure.com/.default"];
52
+ }
53
+ const optionsWithDefaults = {
54
+ ...defaults,
55
+ ...options,
56
+ userAgentOptions: {
57
+ userAgentPrefix
58
+ },
59
+ baseUri: options.endpoint || "https://management.azure.com"
60
+ };
61
+ super(optionsWithDefaults);
62
+ // Parameter assignments
59
63
  this.subscriptionId = subscriptionId;
60
64
 
61
- if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
62
- this.acceptLanguage = options.acceptLanguage;
63
- }
64
- if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
65
- this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
66
- }
65
+ // Assigning values to Constant parameters
66
+ this.$host = options.$host || "https://management.azure.com";
67
67
  }
68
68
  }
@@ -0,0 +1,224 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { Advisors } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
13
+ import * as Parameters from "../models/parameters";
14
+ import { MySQLManagementClientContext } from "../mySQLManagementClientContext";
15
+ import {
16
+ Advisor,
17
+ AdvisorsListByServerNextOptionalParams,
18
+ AdvisorsListByServerOptionalParams,
19
+ AdvisorsGetOptionalParams,
20
+ AdvisorsGetResponse,
21
+ AdvisorsListByServerResponse,
22
+ AdvisorsListByServerNextResponse
23
+ } from "../models";
24
+
25
+ /// <reference lib="esnext.asynciterable" />
26
+ /** Class containing Advisors operations. */
27
+ export class AdvisorsImpl implements Advisors {
28
+ private readonly client: MySQLManagementClientContext;
29
+
30
+ /**
31
+ * Initialize a new instance of the class Advisors class.
32
+ * @param client Reference to the service client
33
+ */
34
+ constructor(client: MySQLManagementClientContext) {
35
+ this.client = client;
36
+ }
37
+
38
+ /**
39
+ * List recommendation action advisors.
40
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
41
+ * @param serverName The name of the server.
42
+ * @param options The options parameters.
43
+ */
44
+ public listByServer(
45
+ resourceGroupName: string,
46
+ serverName: string,
47
+ options?: AdvisorsListByServerOptionalParams
48
+ ): PagedAsyncIterableIterator<Advisor> {
49
+ const iter = this.listByServerPagingAll(
50
+ resourceGroupName,
51
+ serverName,
52
+ options
53
+ );
54
+ return {
55
+ next() {
56
+ return iter.next();
57
+ },
58
+ [Symbol.asyncIterator]() {
59
+ return this;
60
+ },
61
+ byPage: () => {
62
+ return this.listByServerPagingPage(
63
+ resourceGroupName,
64
+ serverName,
65
+ options
66
+ );
67
+ }
68
+ };
69
+ }
70
+
71
+ private async *listByServerPagingPage(
72
+ resourceGroupName: string,
73
+ serverName: string,
74
+ options?: AdvisorsListByServerOptionalParams
75
+ ): AsyncIterableIterator<Advisor[]> {
76
+ let result = await this._listByServer(
77
+ resourceGroupName,
78
+ serverName,
79
+ options
80
+ );
81
+ yield result.value || [];
82
+ let continuationToken = result.nextLink;
83
+ while (continuationToken) {
84
+ result = await this._listByServerNext(
85
+ resourceGroupName,
86
+ serverName,
87
+ continuationToken,
88
+ options
89
+ );
90
+ continuationToken = result.nextLink;
91
+ yield result.value || [];
92
+ }
93
+ }
94
+
95
+ private async *listByServerPagingAll(
96
+ resourceGroupName: string,
97
+ serverName: string,
98
+ options?: AdvisorsListByServerOptionalParams
99
+ ): AsyncIterableIterator<Advisor> {
100
+ for await (const page of this.listByServerPagingPage(
101
+ resourceGroupName,
102
+ serverName,
103
+ options
104
+ )) {
105
+ yield* page;
106
+ }
107
+ }
108
+
109
+ /**
110
+ * Get a recommendation action advisor.
111
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
112
+ * @param serverName The name of the server.
113
+ * @param advisorName The advisor name for recommendation action.
114
+ * @param options The options parameters.
115
+ */
116
+ get(
117
+ resourceGroupName: string,
118
+ serverName: string,
119
+ advisorName: string,
120
+ options?: AdvisorsGetOptionalParams
121
+ ): Promise<AdvisorsGetResponse> {
122
+ return this.client.sendOperationRequest(
123
+ { resourceGroupName, serverName, advisorName, options },
124
+ getOperationSpec
125
+ );
126
+ }
127
+
128
+ /**
129
+ * List recommendation action advisors.
130
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
131
+ * @param serverName The name of the server.
132
+ * @param options The options parameters.
133
+ */
134
+ private _listByServer(
135
+ resourceGroupName: string,
136
+ serverName: string,
137
+ options?: AdvisorsListByServerOptionalParams
138
+ ): Promise<AdvisorsListByServerResponse> {
139
+ return this.client.sendOperationRequest(
140
+ { resourceGroupName, serverName, options },
141
+ listByServerOperationSpec
142
+ );
143
+ }
144
+
145
+ /**
146
+ * ListByServerNext
147
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
148
+ * @param serverName The name of the server.
149
+ * @param nextLink The nextLink from the previous successful call to the ListByServer method.
150
+ * @param options The options parameters.
151
+ */
152
+ private _listByServerNext(
153
+ resourceGroupName: string,
154
+ serverName: string,
155
+ nextLink: string,
156
+ options?: AdvisorsListByServerNextOptionalParams
157
+ ): Promise<AdvisorsListByServerNextResponse> {
158
+ return this.client.sendOperationRequest(
159
+ { resourceGroupName, serverName, nextLink, options },
160
+ listByServerNextOperationSpec
161
+ );
162
+ }
163
+ }
164
+ // Operation Specifications
165
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
166
+
167
+ const getOperationSpec: coreClient.OperationSpec = {
168
+ path:
169
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/advisors/{advisorName}",
170
+ httpMethod: "GET",
171
+ responses: {
172
+ 200: {
173
+ bodyMapper: Mappers.Advisor
174
+ }
175
+ },
176
+ queryParameters: [Parameters.apiVersion2],
177
+ urlParameters: [
178
+ Parameters.$host,
179
+ Parameters.subscriptionId,
180
+ Parameters.resourceGroupName,
181
+ Parameters.serverName,
182
+ Parameters.advisorName
183
+ ],
184
+ headerParameters: [Parameters.accept],
185
+ serializer
186
+ };
187
+ const listByServerOperationSpec: coreClient.OperationSpec = {
188
+ path:
189
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/advisors",
190
+ httpMethod: "GET",
191
+ responses: {
192
+ 200: {
193
+ bodyMapper: Mappers.AdvisorsResultList
194
+ }
195
+ },
196
+ queryParameters: [Parameters.apiVersion2],
197
+ urlParameters: [
198
+ Parameters.$host,
199
+ Parameters.subscriptionId,
200
+ Parameters.resourceGroupName,
201
+ Parameters.serverName
202
+ ],
203
+ headerParameters: [Parameters.accept],
204
+ serializer
205
+ };
206
+ const listByServerNextOperationSpec: coreClient.OperationSpec = {
207
+ path: "{nextLink}",
208
+ httpMethod: "GET",
209
+ responses: {
210
+ 200: {
211
+ bodyMapper: Mappers.AdvisorsResultList
212
+ }
213
+ },
214
+ queryParameters: [Parameters.apiVersion2],
215
+ urlParameters: [
216
+ Parameters.$host,
217
+ Parameters.subscriptionId,
218
+ Parameters.resourceGroupName,
219
+ Parameters.serverName,
220
+ Parameters.nextLink
221
+ ],
222
+ headerParameters: [Parameters.accept],
223
+ serializer
224
+ };