@azure/arm-cosmosdb 16.3.0-alpha.20250718.1 → 16.3.0-alpha.20250730.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 (330) hide show
  1. package/dist/browser/cosmosDBManagementClient.js +50 -5
  2. package/dist/browser/cosmosDBManagementClient.js.map +1 -1
  3. package/dist/browser/lroImpl.js +7 -3
  4. package/dist/browser/lroImpl.js.map +1 -1
  5. package/dist/browser/models/mappers.js +661 -279
  6. package/dist/browser/models/mappers.js.map +1 -1
  7. package/dist/browser/operations/cassandraClusters.js +85 -89
  8. package/dist/browser/operations/cassandraClusters.js.map +1 -1
  9. package/dist/browser/operations/cassandraDataCenters.js +43 -45
  10. package/dist/browser/operations/cassandraDataCenters.js.map +1 -1
  11. package/dist/browser/operations/cassandraResources.js +129 -113
  12. package/dist/browser/operations/cassandraResources.js.map +1 -1
  13. package/dist/browser/operations/collection.js +28 -79
  14. package/dist/browser/operations/collection.js.map +1 -1
  15. package/dist/browser/operations/collectionPartition.js +19 -53
  16. package/dist/browser/operations/collectionPartition.js.map +1 -1
  17. package/dist/browser/operations/collectionPartitionRegion.js +10 -27
  18. package/dist/browser/operations/collectionPartitionRegion.js.map +1 -1
  19. package/dist/browser/operations/collectionRegion.js +10 -27
  20. package/dist/browser/operations/collectionRegion.js.map +1 -1
  21. package/dist/browser/operations/database.js +28 -79
  22. package/dist/browser/operations/database.js.map +1 -1
  23. package/dist/browser/operations/databaseAccountRegion.js +10 -27
  24. package/dist/browser/operations/databaseAccountRegion.js.map +1 -1
  25. package/dist/browser/operations/databaseAccounts.js +123 -173
  26. package/dist/browser/operations/databaseAccounts.js.map +1 -1
  27. package/dist/browser/operations/gremlinResources.js +140 -119
  28. package/dist/browser/operations/gremlinResources.js.map +1 -1
  29. package/dist/browser/operations/locations.js +10 -27
  30. package/dist/browser/operations/locations.js.map +1 -1
  31. package/dist/browser/operations/mongoDBResources.js +202 -195
  32. package/dist/browser/operations/mongoDBResources.js.map +1 -1
  33. package/dist/browser/operations/notebookWorkspaces.js +54 -51
  34. package/dist/browser/operations/notebookWorkspaces.js.map +1 -1
  35. package/dist/browser/operations/operations.js +23 -40
  36. package/dist/browser/operations/operations.js.map +1 -1
  37. package/dist/browser/operations/partitionKeyRangeId.js +10 -27
  38. package/dist/browser/operations/partitionKeyRangeId.js.map +1 -1
  39. package/dist/browser/operations/partitionKeyRangeIdRegion.js +10 -27
  40. package/dist/browser/operations/partitionKeyRangeIdRegion.js.map +1 -1
  41. package/dist/browser/operations/percentile.js +10 -27
  42. package/dist/browser/operations/percentile.js.map +1 -1
  43. package/dist/browser/operations/percentileSourceTarget.js +10 -27
  44. package/dist/browser/operations/percentileSourceTarget.js.map +1 -1
  45. package/dist/browser/operations/percentileTarget.js +10 -27
  46. package/dist/browser/operations/percentileTarget.js.map +1 -1
  47. package/dist/browser/operations/privateEndpointConnections.js +32 -39
  48. package/dist/browser/operations/privateEndpointConnections.js.map +1 -1
  49. package/dist/browser/operations/privateLinkResources.js +10 -27
  50. package/dist/browser/operations/privateLinkResources.js.map +1 -1
  51. package/dist/browser/operations/restorableDatabaseAccounts.js +19 -53
  52. package/dist/browser/operations/restorableDatabaseAccounts.js.map +1 -1
  53. package/dist/browser/operations/restorableGremlinDatabases.js +10 -27
  54. package/dist/browser/operations/restorableGremlinDatabases.js.map +1 -1
  55. package/dist/browser/operations/restorableGremlinGraphs.js +10 -27
  56. package/dist/browser/operations/restorableGremlinGraphs.js.map +1 -1
  57. package/dist/browser/operations/restorableGremlinResources.js +10 -27
  58. package/dist/browser/operations/restorableGremlinResources.js.map +1 -1
  59. package/dist/browser/operations/restorableMongodbCollections.js +10 -27
  60. package/dist/browser/operations/restorableMongodbCollections.js.map +1 -1
  61. package/dist/browser/operations/restorableMongodbDatabases.js +10 -27
  62. package/dist/browser/operations/restorableMongodbDatabases.js.map +1 -1
  63. package/dist/browser/operations/restorableMongodbResources.js +10 -27
  64. package/dist/browser/operations/restorableMongodbResources.js.map +1 -1
  65. package/dist/browser/operations/restorableSqlContainers.js +10 -27
  66. package/dist/browser/operations/restorableSqlContainers.js.map +1 -1
  67. package/dist/browser/operations/restorableSqlDatabases.js +10 -27
  68. package/dist/browser/operations/restorableSqlDatabases.js.map +1 -1
  69. package/dist/browser/operations/restorableSqlResources.js +10 -27
  70. package/dist/browser/operations/restorableSqlResources.js.map +1 -1
  71. package/dist/browser/operations/restorableTableResources.js +10 -27
  72. package/dist/browser/operations/restorableTableResources.js.map +1 -1
  73. package/dist/browser/operations/restorableTables.js +10 -27
  74. package/dist/browser/operations/restorableTables.js.map +1 -1
  75. package/dist/browser/operations/service.js +32 -39
  76. package/dist/browser/operations/service.js.map +1 -1
  77. package/dist/browser/operations/sqlResources.js +315 -341
  78. package/dist/browser/operations/sqlResources.js.map +1 -1
  79. package/dist/browser/operations/tableResources.js +76 -63
  80. package/dist/browser/operations/tableResources.js.map +1 -1
  81. package/dist/browser/pagingHelper.js +2 -4
  82. package/dist/browser/pagingHelper.js.map +1 -1
  83. package/dist/commonjs/cosmosDBManagementClient.js +50 -5
  84. package/dist/commonjs/cosmosDBManagementClient.js.map +1 -1
  85. package/dist/commonjs/lroImpl.js +7 -3
  86. package/dist/commonjs/lroImpl.js.map +1 -1
  87. package/dist/commonjs/models/mappers.js +661 -279
  88. package/dist/commonjs/models/mappers.js.map +1 -1
  89. package/dist/commonjs/operations/cassandraClusters.js +85 -88
  90. package/dist/commonjs/operations/cassandraClusters.js.map +1 -1
  91. package/dist/commonjs/operations/cassandraDataCenters.js +43 -44
  92. package/dist/commonjs/operations/cassandraDataCenters.js.map +1 -1
  93. package/dist/commonjs/operations/cassandraResources.js +129 -112
  94. package/dist/commonjs/operations/cassandraResources.js.map +1 -1
  95. package/dist/commonjs/operations/collection.js +28 -78
  96. package/dist/commonjs/operations/collection.js.map +1 -1
  97. package/dist/commonjs/operations/collectionPartition.js +19 -52
  98. package/dist/commonjs/operations/collectionPartition.js.map +1 -1
  99. package/dist/commonjs/operations/collectionPartitionRegion.js +10 -26
  100. package/dist/commonjs/operations/collectionPartitionRegion.js.map +1 -1
  101. package/dist/commonjs/operations/collectionRegion.js +10 -26
  102. package/dist/commonjs/operations/collectionRegion.js.map +1 -1
  103. package/dist/commonjs/operations/database.js +28 -78
  104. package/dist/commonjs/operations/database.js.map +1 -1
  105. package/dist/commonjs/operations/databaseAccountRegion.js +10 -26
  106. package/dist/commonjs/operations/databaseAccountRegion.js.map +1 -1
  107. package/dist/commonjs/operations/databaseAccounts.js +123 -172
  108. package/dist/commonjs/operations/databaseAccounts.js.map +1 -1
  109. package/dist/commonjs/operations/gremlinResources.js +140 -118
  110. package/dist/commonjs/operations/gremlinResources.js.map +1 -1
  111. package/dist/commonjs/operations/locations.js +10 -26
  112. package/dist/commonjs/operations/locations.js.map +1 -1
  113. package/dist/commonjs/operations/mongoDBResources.js +202 -194
  114. package/dist/commonjs/operations/mongoDBResources.js.map +1 -1
  115. package/dist/commonjs/operations/notebookWorkspaces.js +54 -50
  116. package/dist/commonjs/operations/notebookWorkspaces.js.map +1 -1
  117. package/dist/commonjs/operations/operations.js +23 -39
  118. package/dist/commonjs/operations/operations.js.map +1 -1
  119. package/dist/commonjs/operations/partitionKeyRangeId.js +10 -26
  120. package/dist/commonjs/operations/partitionKeyRangeId.js.map +1 -1
  121. package/dist/commonjs/operations/partitionKeyRangeIdRegion.js +10 -26
  122. package/dist/commonjs/operations/partitionKeyRangeIdRegion.js.map +1 -1
  123. package/dist/commonjs/operations/percentile.js +10 -26
  124. package/dist/commonjs/operations/percentile.js.map +1 -1
  125. package/dist/commonjs/operations/percentileSourceTarget.js +10 -26
  126. package/dist/commonjs/operations/percentileSourceTarget.js.map +1 -1
  127. package/dist/commonjs/operations/percentileTarget.js +10 -26
  128. package/dist/commonjs/operations/percentileTarget.js.map +1 -1
  129. package/dist/commonjs/operations/privateEndpointConnections.js +32 -38
  130. package/dist/commonjs/operations/privateEndpointConnections.js.map +1 -1
  131. package/dist/commonjs/operations/privateLinkResources.js +10 -26
  132. package/dist/commonjs/operations/privateLinkResources.js.map +1 -1
  133. package/dist/commonjs/operations/restorableDatabaseAccounts.js +19 -52
  134. package/dist/commonjs/operations/restorableDatabaseAccounts.js.map +1 -1
  135. package/dist/commonjs/operations/restorableGremlinDatabases.js +10 -26
  136. package/dist/commonjs/operations/restorableGremlinDatabases.js.map +1 -1
  137. package/dist/commonjs/operations/restorableGremlinGraphs.js +10 -26
  138. package/dist/commonjs/operations/restorableGremlinGraphs.js.map +1 -1
  139. package/dist/commonjs/operations/restorableGremlinResources.js +10 -26
  140. package/dist/commonjs/operations/restorableGremlinResources.js.map +1 -1
  141. package/dist/commonjs/operations/restorableMongodbCollections.js +10 -26
  142. package/dist/commonjs/operations/restorableMongodbCollections.js.map +1 -1
  143. package/dist/commonjs/operations/restorableMongodbDatabases.js +10 -26
  144. package/dist/commonjs/operations/restorableMongodbDatabases.js.map +1 -1
  145. package/dist/commonjs/operations/restorableMongodbResources.js +10 -26
  146. package/dist/commonjs/operations/restorableMongodbResources.js.map +1 -1
  147. package/dist/commonjs/operations/restorableSqlContainers.js +10 -26
  148. package/dist/commonjs/operations/restorableSqlContainers.js.map +1 -1
  149. package/dist/commonjs/operations/restorableSqlDatabases.js +10 -26
  150. package/dist/commonjs/operations/restorableSqlDatabases.js.map +1 -1
  151. package/dist/commonjs/operations/restorableSqlResources.js +10 -26
  152. package/dist/commonjs/operations/restorableSqlResources.js.map +1 -1
  153. package/dist/commonjs/operations/restorableTableResources.js +10 -26
  154. package/dist/commonjs/operations/restorableTableResources.js.map +1 -1
  155. package/dist/commonjs/operations/restorableTables.js +10 -26
  156. package/dist/commonjs/operations/restorableTables.js.map +1 -1
  157. package/dist/commonjs/operations/service.js +32 -38
  158. package/dist/commonjs/operations/service.js.map +1 -1
  159. package/dist/commonjs/operations/sqlResources.js +315 -340
  160. package/dist/commonjs/operations/sqlResources.js.map +1 -1
  161. package/dist/commonjs/operations/tableResources.js +76 -62
  162. package/dist/commonjs/operations/tableResources.js.map +1 -1
  163. package/dist/commonjs/pagingHelper.js +2 -4
  164. package/dist/commonjs/pagingHelper.js.map +1 -1
  165. package/dist/commonjs/tsdoc-metadata.json +1 -1
  166. package/dist/esm/cosmosDBManagementClient.js +50 -5
  167. package/dist/esm/cosmosDBManagementClient.js.map +1 -1
  168. package/dist/esm/lroImpl.js +7 -3
  169. package/dist/esm/lroImpl.js.map +1 -1
  170. package/dist/esm/models/mappers.js +661 -279
  171. package/dist/esm/models/mappers.js.map +1 -1
  172. package/dist/esm/operations/cassandraClusters.js +85 -89
  173. package/dist/esm/operations/cassandraClusters.js.map +1 -1
  174. package/dist/esm/operations/cassandraDataCenters.js +43 -45
  175. package/dist/esm/operations/cassandraDataCenters.js.map +1 -1
  176. package/dist/esm/operations/cassandraResources.js +129 -113
  177. package/dist/esm/operations/cassandraResources.js.map +1 -1
  178. package/dist/esm/operations/collection.js +28 -79
  179. package/dist/esm/operations/collection.js.map +1 -1
  180. package/dist/esm/operations/collectionPartition.js +19 -53
  181. package/dist/esm/operations/collectionPartition.js.map +1 -1
  182. package/dist/esm/operations/collectionPartitionRegion.js +10 -27
  183. package/dist/esm/operations/collectionPartitionRegion.js.map +1 -1
  184. package/dist/esm/operations/collectionRegion.js +10 -27
  185. package/dist/esm/operations/collectionRegion.js.map +1 -1
  186. package/dist/esm/operations/database.js +28 -79
  187. package/dist/esm/operations/database.js.map +1 -1
  188. package/dist/esm/operations/databaseAccountRegion.js +10 -27
  189. package/dist/esm/operations/databaseAccountRegion.js.map +1 -1
  190. package/dist/esm/operations/databaseAccounts.js +123 -173
  191. package/dist/esm/operations/databaseAccounts.js.map +1 -1
  192. package/dist/esm/operations/gremlinResources.js +140 -119
  193. package/dist/esm/operations/gremlinResources.js.map +1 -1
  194. package/dist/esm/operations/locations.js +10 -27
  195. package/dist/esm/operations/locations.js.map +1 -1
  196. package/dist/esm/operations/mongoDBResources.js +202 -195
  197. package/dist/esm/operations/mongoDBResources.js.map +1 -1
  198. package/dist/esm/operations/notebookWorkspaces.js +54 -51
  199. package/dist/esm/operations/notebookWorkspaces.js.map +1 -1
  200. package/dist/esm/operations/operations.js +23 -40
  201. package/dist/esm/operations/operations.js.map +1 -1
  202. package/dist/esm/operations/partitionKeyRangeId.js +10 -27
  203. package/dist/esm/operations/partitionKeyRangeId.js.map +1 -1
  204. package/dist/esm/operations/partitionKeyRangeIdRegion.js +10 -27
  205. package/dist/esm/operations/partitionKeyRangeIdRegion.js.map +1 -1
  206. package/dist/esm/operations/percentile.js +10 -27
  207. package/dist/esm/operations/percentile.js.map +1 -1
  208. package/dist/esm/operations/percentileSourceTarget.js +10 -27
  209. package/dist/esm/operations/percentileSourceTarget.js.map +1 -1
  210. package/dist/esm/operations/percentileTarget.js +10 -27
  211. package/dist/esm/operations/percentileTarget.js.map +1 -1
  212. package/dist/esm/operations/privateEndpointConnections.js +32 -39
  213. package/dist/esm/operations/privateEndpointConnections.js.map +1 -1
  214. package/dist/esm/operations/privateLinkResources.js +10 -27
  215. package/dist/esm/operations/privateLinkResources.js.map +1 -1
  216. package/dist/esm/operations/restorableDatabaseAccounts.js +19 -53
  217. package/dist/esm/operations/restorableDatabaseAccounts.js.map +1 -1
  218. package/dist/esm/operations/restorableGremlinDatabases.js +10 -27
  219. package/dist/esm/operations/restorableGremlinDatabases.js.map +1 -1
  220. package/dist/esm/operations/restorableGremlinGraphs.js +10 -27
  221. package/dist/esm/operations/restorableGremlinGraphs.js.map +1 -1
  222. package/dist/esm/operations/restorableGremlinResources.js +10 -27
  223. package/dist/esm/operations/restorableGremlinResources.js.map +1 -1
  224. package/dist/esm/operations/restorableMongodbCollections.js +10 -27
  225. package/dist/esm/operations/restorableMongodbCollections.js.map +1 -1
  226. package/dist/esm/operations/restorableMongodbDatabases.js +10 -27
  227. package/dist/esm/operations/restorableMongodbDatabases.js.map +1 -1
  228. package/dist/esm/operations/restorableMongodbResources.js +10 -27
  229. package/dist/esm/operations/restorableMongodbResources.js.map +1 -1
  230. package/dist/esm/operations/restorableSqlContainers.js +10 -27
  231. package/dist/esm/operations/restorableSqlContainers.js.map +1 -1
  232. package/dist/esm/operations/restorableSqlDatabases.js +10 -27
  233. package/dist/esm/operations/restorableSqlDatabases.js.map +1 -1
  234. package/dist/esm/operations/restorableSqlResources.js +10 -27
  235. package/dist/esm/operations/restorableSqlResources.js.map +1 -1
  236. package/dist/esm/operations/restorableTableResources.js +10 -27
  237. package/dist/esm/operations/restorableTableResources.js.map +1 -1
  238. package/dist/esm/operations/restorableTables.js +10 -27
  239. package/dist/esm/operations/restorableTables.js.map +1 -1
  240. package/dist/esm/operations/service.js +32 -39
  241. package/dist/esm/operations/service.js.map +1 -1
  242. package/dist/esm/operations/sqlResources.js +315 -341
  243. package/dist/esm/operations/sqlResources.js.map +1 -1
  244. package/dist/esm/operations/tableResources.js +76 -63
  245. package/dist/esm/operations/tableResources.js.map +1 -1
  246. package/dist/esm/pagingHelper.js +2 -4
  247. package/dist/esm/pagingHelper.js.map +1 -1
  248. package/dist/react-native/cosmosDBManagementClient.js +50 -5
  249. package/dist/react-native/cosmosDBManagementClient.js.map +1 -1
  250. package/dist/react-native/lroImpl.js +7 -3
  251. package/dist/react-native/lroImpl.js.map +1 -1
  252. package/dist/react-native/models/mappers.js +661 -279
  253. package/dist/react-native/models/mappers.js.map +1 -1
  254. package/dist/react-native/operations/cassandraClusters.js +85 -89
  255. package/dist/react-native/operations/cassandraClusters.js.map +1 -1
  256. package/dist/react-native/operations/cassandraDataCenters.js +43 -45
  257. package/dist/react-native/operations/cassandraDataCenters.js.map +1 -1
  258. package/dist/react-native/operations/cassandraResources.js +129 -113
  259. package/dist/react-native/operations/cassandraResources.js.map +1 -1
  260. package/dist/react-native/operations/collection.js +28 -79
  261. package/dist/react-native/operations/collection.js.map +1 -1
  262. package/dist/react-native/operations/collectionPartition.js +19 -53
  263. package/dist/react-native/operations/collectionPartition.js.map +1 -1
  264. package/dist/react-native/operations/collectionPartitionRegion.js +10 -27
  265. package/dist/react-native/operations/collectionPartitionRegion.js.map +1 -1
  266. package/dist/react-native/operations/collectionRegion.js +10 -27
  267. package/dist/react-native/operations/collectionRegion.js.map +1 -1
  268. package/dist/react-native/operations/database.js +28 -79
  269. package/dist/react-native/operations/database.js.map +1 -1
  270. package/dist/react-native/operations/databaseAccountRegion.js +10 -27
  271. package/dist/react-native/operations/databaseAccountRegion.js.map +1 -1
  272. package/dist/react-native/operations/databaseAccounts.js +123 -173
  273. package/dist/react-native/operations/databaseAccounts.js.map +1 -1
  274. package/dist/react-native/operations/gremlinResources.js +140 -119
  275. package/dist/react-native/operations/gremlinResources.js.map +1 -1
  276. package/dist/react-native/operations/locations.js +10 -27
  277. package/dist/react-native/operations/locations.js.map +1 -1
  278. package/dist/react-native/operations/mongoDBResources.js +202 -195
  279. package/dist/react-native/operations/mongoDBResources.js.map +1 -1
  280. package/dist/react-native/operations/notebookWorkspaces.js +54 -51
  281. package/dist/react-native/operations/notebookWorkspaces.js.map +1 -1
  282. package/dist/react-native/operations/operations.js +23 -40
  283. package/dist/react-native/operations/operations.js.map +1 -1
  284. package/dist/react-native/operations/partitionKeyRangeId.js +10 -27
  285. package/dist/react-native/operations/partitionKeyRangeId.js.map +1 -1
  286. package/dist/react-native/operations/partitionKeyRangeIdRegion.js +10 -27
  287. package/dist/react-native/operations/partitionKeyRangeIdRegion.js.map +1 -1
  288. package/dist/react-native/operations/percentile.js +10 -27
  289. package/dist/react-native/operations/percentile.js.map +1 -1
  290. package/dist/react-native/operations/percentileSourceTarget.js +10 -27
  291. package/dist/react-native/operations/percentileSourceTarget.js.map +1 -1
  292. package/dist/react-native/operations/percentileTarget.js +10 -27
  293. package/dist/react-native/operations/percentileTarget.js.map +1 -1
  294. package/dist/react-native/operations/privateEndpointConnections.js +32 -39
  295. package/dist/react-native/operations/privateEndpointConnections.js.map +1 -1
  296. package/dist/react-native/operations/privateLinkResources.js +10 -27
  297. package/dist/react-native/operations/privateLinkResources.js.map +1 -1
  298. package/dist/react-native/operations/restorableDatabaseAccounts.js +19 -53
  299. package/dist/react-native/operations/restorableDatabaseAccounts.js.map +1 -1
  300. package/dist/react-native/operations/restorableGremlinDatabases.js +10 -27
  301. package/dist/react-native/operations/restorableGremlinDatabases.js.map +1 -1
  302. package/dist/react-native/operations/restorableGremlinGraphs.js +10 -27
  303. package/dist/react-native/operations/restorableGremlinGraphs.js.map +1 -1
  304. package/dist/react-native/operations/restorableGremlinResources.js +10 -27
  305. package/dist/react-native/operations/restorableGremlinResources.js.map +1 -1
  306. package/dist/react-native/operations/restorableMongodbCollections.js +10 -27
  307. package/dist/react-native/operations/restorableMongodbCollections.js.map +1 -1
  308. package/dist/react-native/operations/restorableMongodbDatabases.js +10 -27
  309. package/dist/react-native/operations/restorableMongodbDatabases.js.map +1 -1
  310. package/dist/react-native/operations/restorableMongodbResources.js +10 -27
  311. package/dist/react-native/operations/restorableMongodbResources.js.map +1 -1
  312. package/dist/react-native/operations/restorableSqlContainers.js +10 -27
  313. package/dist/react-native/operations/restorableSqlContainers.js.map +1 -1
  314. package/dist/react-native/operations/restorableSqlDatabases.js +10 -27
  315. package/dist/react-native/operations/restorableSqlDatabases.js.map +1 -1
  316. package/dist/react-native/operations/restorableSqlResources.js +10 -27
  317. package/dist/react-native/operations/restorableSqlResources.js.map +1 -1
  318. package/dist/react-native/operations/restorableTableResources.js +10 -27
  319. package/dist/react-native/operations/restorableTableResources.js.map +1 -1
  320. package/dist/react-native/operations/restorableTables.js +10 -27
  321. package/dist/react-native/operations/restorableTables.js.map +1 -1
  322. package/dist/react-native/operations/service.js +32 -39
  323. package/dist/react-native/operations/service.js.map +1 -1
  324. package/dist/react-native/operations/sqlResources.js +315 -341
  325. package/dist/react-native/operations/sqlResources.js.map +1 -1
  326. package/dist/react-native/operations/tableResources.js +76 -63
  327. package/dist/react-native/operations/tableResources.js.map +1 -1
  328. package/dist/react-native/pagingHelper.js +2 -4
  329. package/dist/react-native/pagingHelper.js.map +1 -1
  330. package/package.json +2 -2
@@ -15,6 +15,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
15
15
  /// <reference lib="esnext.asynciterable" />
16
16
  /** Class containing RestorableGremlinResources operations. */
17
17
  class RestorableGremlinResourcesImpl {
18
+ client;
18
19
  /**
19
20
  * Initialize a new instance of the class RestorableGremlinResources class.
20
21
  * @param client Reference to the service client
@@ -41,39 +42,22 @@ class RestorableGremlinResourcesImpl {
41
42
  return this;
42
43
  },
43
44
  byPage: (settings) => {
44
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
45
+ if (settings?.maxPageSize) {
45
46
  throw new Error("maxPageSize is not supported by this operation.");
46
47
  }
47
48
  return this.listPagingPage(location, instanceId, options, settings);
48
49
  },
49
50
  };
50
51
  }
51
- listPagingPage(location, instanceId, options, _settings) {
52
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
53
- let result;
54
- result = yield tslib_1.__await(this._list(location, instanceId, options));
55
- yield yield tslib_1.__await(result.value || []);
56
- });
52
+ async *listPagingPage(location, instanceId, options, _settings) {
53
+ let result;
54
+ result = await this._list(location, instanceId, options);
55
+ yield result.value || [];
57
56
  }
58
- listPagingAll(location, instanceId, options) {
59
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
60
- var _a, e_1, _b, _c;
61
- try {
62
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(location, instanceId, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
63
- _c = _f.value;
64
- _d = false;
65
- const page = _c;
66
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
67
- }
68
- }
69
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
70
- finally {
71
- try {
72
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
73
- }
74
- finally { if (e_1) throw e_1.error; }
75
- }
76
- });
57
+ async *listPagingAll(location, instanceId, options) {
58
+ for await (const page of this.listPagingPage(location, instanceId, options)) {
59
+ yield* page;
60
+ }
77
61
  }
78
62
  /**
79
63
  * Return a list of gremlin database and graphs combo that exist on the account at the given timestamp
@@ -1 +1 @@
1
- {"version":3,"file":"restorableGremlinResources.js","sourceRoot":"","sources":["../../../src/operations/restorableGremlinResources.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,8DAA8D;AAC9D,MAAa,8BAA8B;IAKzC;;;OAGG;IACH,YAAY,MAAgC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;OAQG;IACI,IAAI,CACT,QAAgB,EAChB,UAAkB,EAClB,OAAsD;QAEtD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QAC/D,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;YACtE,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,cAAc,CAC3B,QAAgB,EAChB,UAAkB,EAClB,OAAsD,EACtD,SAAwB;;YAExB,IAAI,MAA8C,CAAC;YACnD,MAAM,GAAG,sBAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA,CAAC;YACzD,4BAAM,MAAM,CAAC,KAAK,I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AAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { RestorableGremlinResources } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { CosmosDBManagementClient } from \"../cosmosDBManagementClient.js\";\nimport {\n RestorableGremlinResourcesGetResult,\n RestorableGremlinResourcesListOptionalParams,\n RestorableGremlinResourcesListResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing RestorableGremlinResources operations. */\nexport class RestorableGremlinResourcesImpl\n implements RestorableGremlinResources\n{\n private readonly client: CosmosDBManagementClient;\n\n /**\n * Initialize a new instance of the class RestorableGremlinResources class.\n * @param client Reference to the service client\n */\n constructor(client: CosmosDBManagementClient) {\n this.client = client;\n }\n\n /**\n * Return a list of gremlin database and graphs combo that exist on the account at the given timestamp\n * and location. This helps in scenarios to validate what resources exist at given timestamp and\n * location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read'\n * permission.\n * @param location Cosmos DB region, with spaces between words and each word capitalized.\n * @param instanceId The instanceId GUID of a restorable database account.\n * @param options The options parameters.\n */\n public list(\n location: string,\n instanceId: string,\n options?: RestorableGremlinResourcesListOptionalParams,\n ): PagedAsyncIterableIterator<RestorableGremlinResourcesGetResult> {\n const iter = this.listPagingAll(location, instanceId, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(location, instanceId, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n location: string,\n instanceId: string,\n options?: RestorableGremlinResourcesListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<RestorableGremlinResourcesGetResult[]> {\n let result: RestorableGremlinResourcesListResponse;\n result = await this._list(location, instanceId, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n location: string,\n instanceId: string,\n options?: RestorableGremlinResourcesListOptionalParams,\n ): AsyncIterableIterator<RestorableGremlinResourcesGetResult> {\n for await (const page of this.listPagingPage(\n location,\n instanceId,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Return a list of gremlin database and graphs combo that exist on the account at the given timestamp\n * and location. This helps in scenarios to validate what resources exist at given timestamp and\n * location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read'\n * permission.\n * @param location Cosmos DB region, with spaces between words and each word capitalized.\n * @param instanceId The instanceId GUID of a restorable database account.\n * @param options The options parameters.\n */\n private _list(\n location: string,\n instanceId: string,\n options?: RestorableGremlinResourcesListOptionalParams,\n ): Promise<RestorableGremlinResourcesListResponse> {\n return this.client.sendOperationRequest(\n { location, instanceId, options },\n listOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGremlinResources\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RestorableGremlinResourcesListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.restoreLocation,\n Parameters.restoreTimestampInUtc,\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location1,\n Parameters.instanceId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"restorableGremlinResources.js","sourceRoot":"","sources":["../../../src/operations/restorableGremlinResources.ts"],"names":[],"mappings":";AAAA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EACV,OAAO,CACR,EAAE,CAAC;YACF,KAAK,CAAC,CAAC,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED;;;;;;;;OAQG;IACK,KAAK,CACX,QAAgB,EAChB,UAAkB,EAClB,OAAsD;QAEtD,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,EACjC,iBAAiB,CAClB,CAAC;IACJ,CAAC;CACF;AAxFD,wEAwFC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,wJAAwJ;IAC9J,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE;QACf,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,eAAe;QAC1B,UAAU,CAAC,qBAAqB;KACjC;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { RestorableGremlinResources } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { CosmosDBManagementClient } from \"../cosmosDBManagementClient.js\";\nimport {\n RestorableGremlinResourcesGetResult,\n RestorableGremlinResourcesListOptionalParams,\n RestorableGremlinResourcesListResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing RestorableGremlinResources operations. */\nexport class RestorableGremlinResourcesImpl\n implements RestorableGremlinResources\n{\n private readonly client: CosmosDBManagementClient;\n\n /**\n * Initialize a new instance of the class RestorableGremlinResources class.\n * @param client Reference to the service client\n */\n constructor(client: CosmosDBManagementClient) {\n this.client = client;\n }\n\n /**\n * Return a list of gremlin database and graphs combo that exist on the account at the given timestamp\n * and location. This helps in scenarios to validate what resources exist at given timestamp and\n * location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read'\n * permission.\n * @param location Cosmos DB region, with spaces between words and each word capitalized.\n * @param instanceId The instanceId GUID of a restorable database account.\n * @param options The options parameters.\n */\n public list(\n location: string,\n instanceId: string,\n options?: RestorableGremlinResourcesListOptionalParams,\n ): PagedAsyncIterableIterator<RestorableGremlinResourcesGetResult> {\n const iter = this.listPagingAll(location, instanceId, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(location, instanceId, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n location: string,\n instanceId: string,\n options?: RestorableGremlinResourcesListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<RestorableGremlinResourcesGetResult[]> {\n let result: RestorableGremlinResourcesListResponse;\n result = await this._list(location, instanceId, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n location: string,\n instanceId: string,\n options?: RestorableGremlinResourcesListOptionalParams,\n ): AsyncIterableIterator<RestorableGremlinResourcesGetResult> {\n for await (const page of this.listPagingPage(\n location,\n instanceId,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Return a list of gremlin database and graphs combo that exist on the account at the given timestamp\n * and location. This helps in scenarios to validate what resources exist at given timestamp and\n * location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read'\n * permission.\n * @param location Cosmos DB region, with spaces between words and each word capitalized.\n * @param instanceId The instanceId GUID of a restorable database account.\n * @param options The options parameters.\n */\n private _list(\n location: string,\n instanceId: string,\n options?: RestorableGremlinResourcesListOptionalParams,\n ): Promise<RestorableGremlinResourcesListResponse> {\n return this.client.sendOperationRequest(\n { location, instanceId, options },\n listOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGremlinResources\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RestorableGremlinResourcesListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.restoreLocation,\n Parameters.restoreTimestampInUtc,\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location1,\n Parameters.instanceId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
@@ -15,6 +15,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
15
15
  /// <reference lib="esnext.asynciterable" />
16
16
  /** Class containing RestorableMongodbCollections operations. */
17
17
  class RestorableMongodbCollectionsImpl {
18
+ client;
18
19
  /**
19
20
  * Initialize a new instance of the class RestorableMongodbCollections class.
20
21
  * @param client Reference to the service client
@@ -40,39 +41,22 @@ class RestorableMongodbCollectionsImpl {
40
41
  return this;
41
42
  },
42
43
  byPage: (settings) => {
43
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
44
+ if (settings?.maxPageSize) {
44
45
  throw new Error("maxPageSize is not supported by this operation.");
45
46
  }
46
47
  return this.listPagingPage(location, instanceId, options, settings);
47
48
  },
48
49
  };
49
50
  }
50
- listPagingPage(location, instanceId, options, _settings) {
51
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
52
- let result;
53
- result = yield tslib_1.__await(this._list(location, instanceId, options));
54
- yield yield tslib_1.__await(result.value || []);
55
- });
51
+ async *listPagingPage(location, instanceId, options, _settings) {
52
+ let result;
53
+ result = await this._list(location, instanceId, options);
54
+ yield result.value || [];
56
55
  }
57
- listPagingAll(location, instanceId, options) {
58
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
59
- var _a, e_1, _b, _c;
60
- try {
61
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(location, instanceId, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
62
- _c = _f.value;
63
- _d = false;
64
- const page = _c;
65
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
66
- }
67
- }
68
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
69
- finally {
70
- try {
71
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
72
- }
73
- finally { if (e_1) throw e_1.error; }
74
- }
75
- });
56
+ async *listPagingAll(location, instanceId, options) {
57
+ for await (const page of this.listPagingPage(location, instanceId, options)) {
58
+ yield* page;
59
+ }
76
60
  }
77
61
  /**
78
62
  * Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB collections under a
@@ -1 +1 @@
1
- {"version":3,"file":"restorableMongodbCollections.js","sourceRoot":"","sources":["../../../src/operations/restorableMongodbCollections.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,gEAAgE;AAChE,MAAa,gCAAgC;IAK3C;;;OAGG;IACH,YAAY,MAAgC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,C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C;KAAA;IAED;;;;;;;OAOG;IACK,KAAK,CACX,QAAgB,EAChB,UAAkB,EAClB,OAAwD;QAExD,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,EACjC,iBAAiB,CAClB,CAAC;IACJ,CAAC;CACF;AAtFD,4EAsFC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,0JAA0J;IAChK,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,sCAAsC;SAC3D;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE;QACf,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,4BAA4B;KACxC;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { RestorableMongodbCollections } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { CosmosDBManagementClient } from \"../cosmosDBManagementClient.js\";\nimport {\n RestorableMongodbCollectionGetResult,\n RestorableMongodbCollectionsListOptionalParams,\n RestorableMongodbCollectionsListResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing RestorableMongodbCollections operations. */\nexport class RestorableMongodbCollectionsImpl\n implements RestorableMongodbCollections\n{\n private readonly client: CosmosDBManagementClient;\n\n /**\n * Initialize a new instance of the class RestorableMongodbCollections class.\n * @param client Reference to the service client\n */\n constructor(client: CosmosDBManagementClient) {\n this.client = client;\n }\n\n /**\n * Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB collections under a\n * specific database. This helps in scenario where container was accidentally deleted. This API\n * requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission\n * @param location Cosmos DB region, with spaces between words and each word capitalized.\n * @param instanceId The instanceId GUID of a restorable database account.\n * @param options The options parameters.\n */\n public list(\n location: string,\n instanceId: string,\n options?: RestorableMongodbCollectionsListOptionalParams,\n ): PagedAsyncIterableIterator<RestorableMongodbCollectionGetResult> {\n const iter = this.listPagingAll(location, instanceId, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(location, instanceId, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n location: string,\n instanceId: string,\n options?: RestorableMongodbCollectionsListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<RestorableMongodbCollectionGetResult[]> {\n let result: RestorableMongodbCollectionsListResponse;\n result = await this._list(location, instanceId, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n location: string,\n instanceId: string,\n options?: RestorableMongodbCollectionsListOptionalParams,\n ): AsyncIterableIterator<RestorableMongodbCollectionGetResult> {\n for await (const page of this.listPagingPage(\n location,\n instanceId,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB collections under a\n * specific database. This helps in scenario where container was accidentally deleted. This API\n * requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission\n * @param location Cosmos DB region, with spaces between words and each word capitalized.\n * @param instanceId The instanceId GUID of a restorable database account.\n * @param options The options parameters.\n */\n private _list(\n location: string,\n instanceId: string,\n options?: RestorableMongodbCollectionsListOptionalParams,\n ): Promise<RestorableMongodbCollectionsListResponse> {\n return this.client.sendOperationRequest(\n { location, instanceId, options },\n listOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RestorableMongodbCollectionsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.startTime,\n Parameters.endTime,\n Parameters.restorableMongodbDatabaseRid,\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location1,\n Parameters.instanceId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"restorableMongodbCollections.js","sourceRoot":"","sources":["../../../src/operations/restorableMongodbCollections.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,gEAAgE;AAChE,MAAa,gCAAgC;IAG1B,MAAM,CAA2B;IAElD;;;OAGG;IACH,YAAY,MAAgC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACI,IAAI,CACT,QAAgB,EAChB,UAAkB,EAClB,OAAwD;QAExD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE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C,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,0JAA0J;IAChK,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,sCAAsC;SAC3D;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE;QACf,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,4BAA4B;KACxC;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { RestorableMongodbCollections } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { CosmosDBManagementClient } from \"../cosmosDBManagementClient.js\";\nimport {\n RestorableMongodbCollectionGetResult,\n RestorableMongodbCollectionsListOptionalParams,\n RestorableMongodbCollectionsListResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing RestorableMongodbCollections operations. */\nexport class RestorableMongodbCollectionsImpl\n implements RestorableMongodbCollections\n{\n private readonly client: CosmosDBManagementClient;\n\n /**\n * Initialize a new instance of the class RestorableMongodbCollections class.\n * @param client Reference to the service client\n */\n constructor(client: CosmosDBManagementClient) {\n this.client = client;\n }\n\n /**\n * Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB collections under a\n * specific database. This helps in scenario where container was accidentally deleted. This API\n * requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission\n * @param location Cosmos DB region, with spaces between words and each word capitalized.\n * @param instanceId The instanceId GUID of a restorable database account.\n * @param options The options parameters.\n */\n public list(\n location: string,\n instanceId: string,\n options?: RestorableMongodbCollectionsListOptionalParams,\n ): PagedAsyncIterableIterator<RestorableMongodbCollectionGetResult> {\n const iter = this.listPagingAll(location, instanceId, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(location, instanceId, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n location: string,\n instanceId: string,\n options?: RestorableMongodbCollectionsListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<RestorableMongodbCollectionGetResult[]> {\n let result: RestorableMongodbCollectionsListResponse;\n result = await this._list(location, instanceId, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n location: string,\n instanceId: string,\n options?: RestorableMongodbCollectionsListOptionalParams,\n ): AsyncIterableIterator<RestorableMongodbCollectionGetResult> {\n for await (const page of this.listPagingPage(\n location,\n instanceId,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB collections under a\n * specific database. This helps in scenario where container was accidentally deleted. This API\n * requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission\n * @param location Cosmos DB region, with spaces between words and each word capitalized.\n * @param instanceId The instanceId GUID of a restorable database account.\n * @param options The options parameters.\n */\n private _list(\n location: string,\n instanceId: string,\n options?: RestorableMongodbCollectionsListOptionalParams,\n ): Promise<RestorableMongodbCollectionsListResponse> {\n return this.client.sendOperationRequest(\n { location, instanceId, options },\n listOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RestorableMongodbCollectionsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.startTime,\n Parameters.endTime,\n Parameters.restorableMongodbDatabaseRid,\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location1,\n Parameters.instanceId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
@@ -15,6 +15,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
15
15
  /// <reference lib="esnext.asynciterable" />
16
16
  /** Class containing RestorableMongodbDatabases operations. */
17
17
  class RestorableMongodbDatabasesImpl {
18
+ client;
18
19
  /**
19
20
  * Initialize a new instance of the class RestorableMongodbDatabases class.
20
21
  * @param client Reference to the service client
@@ -41,39 +42,22 @@ class RestorableMongodbDatabasesImpl {
41
42
  return this;
42
43
  },
43
44
  byPage: (settings) => {
44
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
45
+ if (settings?.maxPageSize) {
45
46
  throw new Error("maxPageSize is not supported by this operation.");
46
47
  }
47
48
  return this.listPagingPage(location, instanceId, options, settings);
48
49
  },
49
50
  };
50
51
  }
51
- listPagingPage(location, instanceId, options, _settings) {
52
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
53
- let result;
54
- result = yield tslib_1.__await(this._list(location, instanceId, options));
55
- yield yield tslib_1.__await(result.value || []);
56
- });
52
+ async *listPagingPage(location, instanceId, options, _settings) {
53
+ let result;
54
+ result = await this._list(location, instanceId, options);
55
+ yield result.value || [];
57
56
  }
58
- listPagingAll(location, instanceId, options) {
59
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
60
- var _a, e_1, _b, _c;
61
- try {
62
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(location, instanceId, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
63
- _c = _f.value;
64
- _d = false;
65
- const page = _c;
66
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
67
- }
68
- }
69
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
70
- finally {
71
- try {
72
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
73
- }
74
- finally { if (e_1) throw e_1.error; }
75
- }
76
- });
57
+ async *listPagingAll(location, instanceId, options) {
58
+ for await (const page of this.listPagingPage(location, instanceId, options)) {
59
+ yield* page;
60
+ }
77
61
  }
78
62
  /**
79
63
  * Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB databases under the
@@ -1 +1 @@
1
- {"version":3,"file":"restorableMongodbDatabases.js","sourceRoot":"","sources":["../../../src/operations/restorableMongodbDatabases.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,8DAA8D;AAC9D,MAAa,8BAA8B;IAKzC;;;OAGG;IACH,YAAY,MAAgC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;OAQG;IACI,IAAI,CACT,QAAgB,EAChB,UAAkB,EAClB,OAAsD;QAEtD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QAC/D,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd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AE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,wJAAwJ;IAC9J,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { RestorableMongodbDatabases } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { CosmosDBManagementClient } from \"../cosmosDBManagementClient.js\";\nimport {\n RestorableMongodbDatabaseGetResult,\n RestorableMongodbDatabasesListOptionalParams,\n RestorableMongodbDatabasesListResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing RestorableMongodbDatabases operations. */\nexport class RestorableMongodbDatabasesImpl\n implements RestorableMongodbDatabases\n{\n private readonly client: CosmosDBManagementClient;\n\n /**\n * Initialize a new instance of the class RestorableMongodbDatabases class.\n * @param client Reference to the service client\n */\n constructor(client: CosmosDBManagementClient) {\n this.client = client;\n }\n\n /**\n * Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB databases under the\n * restorable account. This helps in scenario where database was accidentally deleted to get the\n * deletion time. This API requires\n * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission\n * @param location Cosmos DB region, with spaces between words and each word capitalized.\n * @param instanceId The instanceId GUID of a restorable database account.\n * @param options The options parameters.\n */\n public list(\n location: string,\n instanceId: string,\n options?: RestorableMongodbDatabasesListOptionalParams,\n ): PagedAsyncIterableIterator<RestorableMongodbDatabaseGetResult> {\n const iter = this.listPagingAll(location, instanceId, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(location, instanceId, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n location: string,\n instanceId: string,\n options?: RestorableMongodbDatabasesListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<RestorableMongodbDatabaseGetResult[]> {\n let result: RestorableMongodbDatabasesListResponse;\n result = await this._list(location, instanceId, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n location: string,\n instanceId: string,\n options?: RestorableMongodbDatabasesListOptionalParams,\n ): AsyncIterableIterator<RestorableMongodbDatabaseGetResult> {\n for await (const page of this.listPagingPage(\n location,\n instanceId,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB databases under the\n * restorable account. This helps in scenario where database was accidentally deleted to get the\n * deletion time. This API requires\n * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission\n * @param location Cosmos DB region, with spaces between words and each word capitalized.\n * @param instanceId The instanceId GUID of a restorable database account.\n * @param options The options parameters.\n */\n private _list(\n location: string,\n instanceId: string,\n options?: RestorableMongodbDatabasesListOptionalParams,\n ): Promise<RestorableMongodbDatabasesListResponse> {\n return this.client.sendOperationRequest(\n { location, instanceId, options },\n listOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbDatabases\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RestorableMongodbDatabasesListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location1,\n Parameters.instanceId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"restorableMongodbDatabases.js","sourceRoot":"","sources":["../../../src/operations/restorableMongodbDatabases.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,8DAA8D;AAC9D,MAAa,8BAA8B;IAGxB,MAAM,CAA2B;IAElD;;;OAGG;IACH,YAAY,MAAgC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;OAQG;IACI,IAAI,CACT,QAAgB,EAChB,UAAkB,EAClB,OAAsD;QAEtD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QAC/D,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,UAAU,E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,cAAc;QACzB,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { RestorableMongodbDatabases } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { CosmosDBManagementClient } from \"../cosmosDBManagementClient.js\";\nimport {\n RestorableMongodbDatabaseGetResult,\n RestorableMongodbDatabasesListOptionalParams,\n RestorableMongodbDatabasesListResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing RestorableMongodbDatabases operations. */\nexport class RestorableMongodbDatabasesImpl\n implements RestorableMongodbDatabases\n{\n private readonly client: CosmosDBManagementClient;\n\n /**\n * Initialize a new instance of the class RestorableMongodbDatabases class.\n * @param client Reference to the service client\n */\n constructor(client: CosmosDBManagementClient) {\n this.client = client;\n }\n\n /**\n * Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB databases under the\n * restorable account. This helps in scenario where database was accidentally deleted to get the\n * deletion time. This API requires\n * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission\n * @param location Cosmos DB region, with spaces between words and each word capitalized.\n * @param instanceId The instanceId GUID of a restorable database account.\n * @param options The options parameters.\n */\n public list(\n location: string,\n instanceId: string,\n options?: RestorableMongodbDatabasesListOptionalParams,\n ): PagedAsyncIterableIterator<RestorableMongodbDatabaseGetResult> {\n const iter = this.listPagingAll(location, instanceId, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(location, instanceId, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n location: string,\n instanceId: string,\n options?: RestorableMongodbDatabasesListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<RestorableMongodbDatabaseGetResult[]> {\n let result: RestorableMongodbDatabasesListResponse;\n result = await this._list(location, instanceId, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n location: string,\n instanceId: string,\n options?: RestorableMongodbDatabasesListOptionalParams,\n ): AsyncIterableIterator<RestorableMongodbDatabaseGetResult> {\n for await (const page of this.listPagingPage(\n location,\n instanceId,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB databases under the\n * restorable account. This helps in scenario where database was accidentally deleted to get the\n * deletion time. This API requires\n * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission\n * @param location Cosmos DB region, with spaces between words and each word capitalized.\n * @param instanceId The instanceId GUID of a restorable database account.\n * @param options The options parameters.\n */\n private _list(\n location: string,\n instanceId: string,\n options?: RestorableMongodbDatabasesListOptionalParams,\n ): Promise<RestorableMongodbDatabasesListResponse> {\n return this.client.sendOperationRequest(\n { location, instanceId, options },\n listOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbDatabases\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RestorableMongodbDatabasesListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location1,\n Parameters.instanceId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
@@ -15,6 +15,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
15
15
  /// <reference lib="esnext.asynciterable" />
16
16
  /** Class containing RestorableMongodbResources operations. */
17
17
  class RestorableMongodbResourcesImpl {
18
+ client;
18
19
  /**
19
20
  * Initialize a new instance of the class RestorableMongodbResources class.
20
21
  * @param client Reference to the service client
@@ -40,39 +41,22 @@ class RestorableMongodbResourcesImpl {
40
41
  return this;
41
42
  },
42
43
  byPage: (settings) => {
43
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
44
+ if (settings?.maxPageSize) {
44
45
  throw new Error("maxPageSize is not supported by this operation.");
45
46
  }
46
47
  return this.listPagingPage(location, instanceId, options, settings);
47
48
  },
48
49
  };
49
50
  }
50
- listPagingPage(location, instanceId, options, _settings) {
51
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
52
- let result;
53
- result = yield tslib_1.__await(this._list(location, instanceId, options));
54
- yield yield tslib_1.__await(result.value || []);
55
- });
51
+ async *listPagingPage(location, instanceId, options, _settings) {
52
+ let result;
53
+ result = await this._list(location, instanceId, options);
54
+ yield result.value || [];
56
55
  }
57
- listPagingAll(location, instanceId, options) {
58
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
59
- var _a, e_1, _b, _c;
60
- try {
61
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(location, instanceId, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
62
- _c = _f.value;
63
- _d = false;
64
- const page = _c;
65
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
66
- }
67
- }
68
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
69
- finally {
70
- try {
71
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
72
- }
73
- finally { if (e_1) throw e_1.error; }
74
- }
75
- });
56
+ async *listPagingAll(location, instanceId, options) {
57
+ for await (const page of this.listPagingPage(location, instanceId, options)) {
58
+ yield* page;
59
+ }
76
60
  }
77
61
  /**
78
62
  * Return a list of database and collection combo that exist on the account at the given timestamp and
@@ -1 +1 @@
1
- {"version":3,"file":"restorableMongodbResources.js","sourceRoot":"","sources":["../../../src/operations/restorableMongodbResources.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,8DAA8D;AAC9D,MAAa,8BAA8B;IAKzC;;;OAGG;IACH,YAAY,MAAgC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACI,IAAI,CACT,QAAgB,EAChB,UAAkB,EAClB,OAAsD;QAEtD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QAC/D,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;YACtE,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,cAAc,CAC3B,QAAgB,EAChB,UAAkB,EAClB,OAAsD,EACtD,SAAwB;;YAExB,IAAI,MAA8C,CAAC;YACnD,MAAM,GAAG,sBAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA,CAA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AC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { RestorableMongodbResources } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { CosmosDBManagementClient } from \"../cosmosDBManagementClient.js\";\nimport {\n RestorableMongodbResourcesGetResult,\n RestorableMongodbResourcesListOptionalParams,\n RestorableMongodbResourcesListResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing RestorableMongodbResources operations. */\nexport class RestorableMongodbResourcesImpl\n implements RestorableMongodbResources\n{\n private readonly client: CosmosDBManagementClient;\n\n /**\n * Initialize a new instance of the class RestorableMongodbResources class.\n * @param client Reference to the service client\n */\n constructor(client: CosmosDBManagementClient) {\n this.client = client;\n }\n\n /**\n * Return a list of database and collection combo that exist on the account at the given timestamp and\n * location. This helps in scenarios to validate what resources exist at given timestamp and location.\n * This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission.\n * @param location Cosmos DB region, with spaces between words and each word capitalized.\n * @param instanceId The instanceId GUID of a restorable database account.\n * @param options The options parameters.\n */\n public list(\n location: string,\n instanceId: string,\n options?: RestorableMongodbResourcesListOptionalParams,\n ): PagedAsyncIterableIterator<RestorableMongodbResourcesGetResult> {\n const iter = this.listPagingAll(location, instanceId, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(location, instanceId, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n location: string,\n instanceId: string,\n options?: RestorableMongodbResourcesListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<RestorableMongodbResourcesGetResult[]> {\n let result: RestorableMongodbResourcesListResponse;\n result = await this._list(location, instanceId, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n location: string,\n instanceId: string,\n options?: RestorableMongodbResourcesListOptionalParams,\n ): AsyncIterableIterator<RestorableMongodbResourcesGetResult> {\n for await (const page of this.listPagingPage(\n location,\n instanceId,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Return a list of database and collection combo that exist on the account at the given timestamp and\n * location. This helps in scenarios to validate what resources exist at given timestamp and location.\n * This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission.\n * @param location Cosmos DB region, with spaces between words and each word capitalized.\n * @param instanceId The instanceId GUID of a restorable database account.\n * @param options The options parameters.\n */\n private _list(\n location: string,\n instanceId: string,\n options?: RestorableMongodbResourcesListOptionalParams,\n ): Promise<RestorableMongodbResourcesListResponse> {\n return this.client.sendOperationRequest(\n { location, instanceId, options },\n listOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbResources\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RestorableMongodbResourcesListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.restoreLocation,\n Parameters.restoreTimestampInUtc,\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location1,\n Parameters.instanceId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"restorableMongodbResources.js","sourceRoot":"","sources":["../../../src/operations/restorableMongodbResources.ts"],"names":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,EACR,UAAU,EACV,OAAO,CACR,EAAE,CAAC;YACF,KAAK,CAAC,CAAC,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED;;;;;;;OAOG;IACK,KAAK,CACX,QAAgB,EAChB,UAAkB,EAClB,OAAsD;QAEtD,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,EACjC,iBAAiB,CAClB,CAAC;IACJ,CAAC;CACF;AAtFD,wEAsFC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,wJAAwJ;IAC9J,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE;QACf,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,eAAe;QAC1B,UAAU,CAAC,qBAAqB;KACjC;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { RestorableMongodbResources } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { CosmosDBManagementClient } from \"../cosmosDBManagementClient.js\";\nimport {\n RestorableMongodbResourcesGetResult,\n RestorableMongodbResourcesListOptionalParams,\n RestorableMongodbResourcesListResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing RestorableMongodbResources operations. */\nexport class RestorableMongodbResourcesImpl\n implements RestorableMongodbResources\n{\n private readonly client: CosmosDBManagementClient;\n\n /**\n * Initialize a new instance of the class RestorableMongodbResources class.\n * @param client Reference to the service client\n */\n constructor(client: CosmosDBManagementClient) {\n this.client = client;\n }\n\n /**\n * Return a list of database and collection combo that exist on the account at the given timestamp and\n * location. This helps in scenarios to validate what resources exist at given timestamp and location.\n * This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission.\n * @param location Cosmos DB region, with spaces between words and each word capitalized.\n * @param instanceId The instanceId GUID of a restorable database account.\n * @param options The options parameters.\n */\n public list(\n location: string,\n instanceId: string,\n options?: RestorableMongodbResourcesListOptionalParams,\n ): PagedAsyncIterableIterator<RestorableMongodbResourcesGetResult> {\n const iter = this.listPagingAll(location, instanceId, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(location, instanceId, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n location: string,\n instanceId: string,\n options?: RestorableMongodbResourcesListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<RestorableMongodbResourcesGetResult[]> {\n let result: RestorableMongodbResourcesListResponse;\n result = await this._list(location, instanceId, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n location: string,\n instanceId: string,\n options?: RestorableMongodbResourcesListOptionalParams,\n ): AsyncIterableIterator<RestorableMongodbResourcesGetResult> {\n for await (const page of this.listPagingPage(\n location,\n instanceId,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Return a list of database and collection combo that exist on the account at the given timestamp and\n * location. This helps in scenarios to validate what resources exist at given timestamp and location.\n * This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission.\n * @param location Cosmos DB region, with spaces between words and each word capitalized.\n * @param instanceId The instanceId GUID of a restorable database account.\n * @param options The options parameters.\n */\n private _list(\n location: string,\n instanceId: string,\n options?: RestorableMongodbResourcesListOptionalParams,\n ): Promise<RestorableMongodbResourcesListResponse> {\n return this.client.sendOperationRequest(\n { location, instanceId, options },\n listOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbResources\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RestorableMongodbResourcesListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.restoreLocation,\n Parameters.restoreTimestampInUtc,\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location1,\n Parameters.instanceId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
@@ -15,6 +15,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
15
15
  /// <reference lib="esnext.asynciterable" />
16
16
  /** Class containing RestorableSqlContainers operations. */
17
17
  class RestorableSqlContainersImpl {
18
+ client;
18
19
  /**
19
20
  * Initialize a new instance of the class RestorableSqlContainers class.
20
21
  * @param client Reference to the service client
@@ -40,39 +41,22 @@ class RestorableSqlContainersImpl {
40
41
  return this;
41
42
  },
42
43
  byPage: (settings) => {
43
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
44
+ if (settings?.maxPageSize) {
44
45
  throw new Error("maxPageSize is not supported by this operation.");
45
46
  }
46
47
  return this.listPagingPage(location, instanceId, options, settings);
47
48
  },
48
49
  };
49
50
  }
50
- listPagingPage(location, instanceId, options, _settings) {
51
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
52
- let result;
53
- result = yield tslib_1.__await(this._list(location, instanceId, options));
54
- yield yield tslib_1.__await(result.value || []);
55
- });
51
+ async *listPagingPage(location, instanceId, options, _settings) {
52
+ let result;
53
+ result = await this._list(location, instanceId, options);
54
+ yield result.value || [];
56
55
  }
57
- listPagingAll(location, instanceId, options) {
58
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
59
- var _a, e_1, _b, _c;
60
- try {
61
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(location, instanceId, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
62
- _c = _f.value;
63
- _d = false;
64
- const page = _c;
65
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
66
- }
67
- }
68
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
69
- finally {
70
- try {
71
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
72
- }
73
- finally { if (e_1) throw e_1.error; }
74
- }
75
- });
56
+ async *listPagingAll(location, instanceId, options) {
57
+ for await (const page of this.listPagingPage(location, instanceId, options)) {
58
+ yield* page;
59
+ }
76
60
  }
77
61
  /**
78
62
  * Show the event feed of all mutations done on all the Azure Cosmos DB SQL containers under a specific
@@ -1 +1 @@
1
- {"version":3,"file":"restorableSqlContainers.js","sourceRoot":"","sources":["../../../src/operations/restorableSqlContainers.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,2DAA2D;AAC3D,MAAa,2BAA2B;IAGtC;;;OAGG;IACH,YAAY,MAAgC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;O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;;;;OAOG;IACK,KAAK,CACX,QAAgB,EAChB,UAAkB,EAClB,OAAmD;QAEnD,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,EACjC,iBAAiB,CAClB,CAAC;IACJ,CAAC;CACF;AApFD,kEAoFC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,qJAAqJ;IAC3J,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,iCAAiC;SACtD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE;QACf,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,wBAAwB;QACnC,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,OAAO;KACnB;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { RestorableSqlContainers } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { CosmosDBManagementClient } from \"../cosmosDBManagementClient.js\";\nimport {\n RestorableSqlContainerGetResult,\n RestorableSqlContainersListOptionalParams,\n RestorableSqlContainersListResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing RestorableSqlContainers operations. */\nexport class RestorableSqlContainersImpl implements RestorableSqlContainers {\n private readonly client: CosmosDBManagementClient;\n\n /**\n * Initialize a new instance of the class RestorableSqlContainers class.\n * @param client Reference to the service client\n */\n constructor(client: CosmosDBManagementClient) {\n this.client = client;\n }\n\n /**\n * Show the event feed of all mutations done on all the Azure Cosmos DB SQL containers under a specific\n * database. This helps in scenario where container was accidentally deleted. This API requires\n * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission\n * @param location Cosmos DB region, with spaces between words and each word capitalized.\n * @param instanceId The instanceId GUID of a restorable database account.\n * @param options The options parameters.\n */\n public list(\n location: string,\n instanceId: string,\n options?: RestorableSqlContainersListOptionalParams,\n ): PagedAsyncIterableIterator<RestorableSqlContainerGetResult> {\n const iter = this.listPagingAll(location, instanceId, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(location, instanceId, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n location: string,\n instanceId: string,\n options?: RestorableSqlContainersListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<RestorableSqlContainerGetResult[]> {\n let result: RestorableSqlContainersListResponse;\n result = await this._list(location, instanceId, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n location: string,\n instanceId: string,\n options?: RestorableSqlContainersListOptionalParams,\n ): AsyncIterableIterator<RestorableSqlContainerGetResult> {\n for await (const page of this.listPagingPage(\n location,\n instanceId,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Show the event feed of all mutations done on all the Azure Cosmos DB SQL containers under a specific\n * database. This helps in scenario where container was accidentally deleted. This API requires\n * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission\n * @param location Cosmos DB region, with spaces between words and each word capitalized.\n * @param instanceId The instanceId GUID of a restorable database account.\n * @param options The options parameters.\n */\n private _list(\n location: string,\n instanceId: string,\n options?: RestorableSqlContainersListOptionalParams,\n ): Promise<RestorableSqlContainersListResponse> {\n return this.client.sendOperationRequest(\n { location, instanceId, options },\n listOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RestorableSqlContainersListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.restorableSqlDatabaseRid,\n Parameters.startTime,\n Parameters.endTime,\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location1,\n Parameters.instanceId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"restorableSqlContainers.js","sourceRoot":"","sources":["../../../src/operations/restorableSqlContainers.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,2DAA2D;AAC3D,MAAa,2BAA2B;IACrB,MAAM,CAA2B;IAElD;;;OAGG;IACH,YAAY,MAAgC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACI,IAAI,CACT,QAAgB,EAChB,UAAkB,EAClB,OAAmD;QAEnD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QAC/D,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC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iB,GAA6B;IAClD,IAAI,EAAE,qJAAqJ;IAC3J,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,iCAAiC;SACtD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE;QACf,UAAU,CAAC,UAAU;QACrB,UAAU,CAAC,wBAAwB;QACnC,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,OAAO;KACnB;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { RestorableSqlContainers } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { CosmosDBManagementClient } from \"../cosmosDBManagementClient.js\";\nimport {\n RestorableSqlContainerGetResult,\n RestorableSqlContainersListOptionalParams,\n RestorableSqlContainersListResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing RestorableSqlContainers operations. */\nexport class RestorableSqlContainersImpl implements RestorableSqlContainers {\n private readonly client: CosmosDBManagementClient;\n\n /**\n * Initialize a new instance of the class RestorableSqlContainers class.\n * @param client Reference to the service client\n */\n constructor(client: CosmosDBManagementClient) {\n this.client = client;\n }\n\n /**\n * Show the event feed of all mutations done on all the Azure Cosmos DB SQL containers under a specific\n * database. This helps in scenario where container was accidentally deleted. This API requires\n * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission\n * @param location Cosmos DB region, with spaces between words and each word capitalized.\n * @param instanceId The instanceId GUID of a restorable database account.\n * @param options The options parameters.\n */\n public list(\n location: string,\n instanceId: string,\n options?: RestorableSqlContainersListOptionalParams,\n ): PagedAsyncIterableIterator<RestorableSqlContainerGetResult> {\n const iter = this.listPagingAll(location, instanceId, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(location, instanceId, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n location: string,\n instanceId: string,\n options?: RestorableSqlContainersListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<RestorableSqlContainerGetResult[]> {\n let result: RestorableSqlContainersListResponse;\n result = await this._list(location, instanceId, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n location: string,\n instanceId: string,\n options?: RestorableSqlContainersListOptionalParams,\n ): AsyncIterableIterator<RestorableSqlContainerGetResult> {\n for await (const page of this.listPagingPage(\n location,\n instanceId,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Show the event feed of all mutations done on all the Azure Cosmos DB SQL containers under a specific\n * database. This helps in scenario where container was accidentally deleted. This API requires\n * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission\n * @param location Cosmos DB region, with spaces between words and each word capitalized.\n * @param instanceId The instanceId GUID of a restorable database account.\n * @param options The options parameters.\n */\n private _list(\n location: string,\n instanceId: string,\n options?: RestorableSqlContainersListOptionalParams,\n ): Promise<RestorableSqlContainersListResponse> {\n return this.client.sendOperationRequest(\n { location, instanceId, options },\n listOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RestorableSqlContainersListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.restorableSqlDatabaseRid,\n Parameters.startTime,\n Parameters.endTime,\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location1,\n Parameters.instanceId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
@@ -15,6 +15,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
15
15
  /// <reference lib="esnext.asynciterable" />
16
16
  /** Class containing RestorableSqlDatabases operations. */
17
17
  class RestorableSqlDatabasesImpl {
18
+ client;
18
19
  /**
19
20
  * Initialize a new instance of the class RestorableSqlDatabases class.
20
21
  * @param client Reference to the service client
@@ -41,39 +42,22 @@ class RestorableSqlDatabasesImpl {
41
42
  return this;
42
43
  },
43
44
  byPage: (settings) => {
44
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
45
+ if (settings?.maxPageSize) {
45
46
  throw new Error("maxPageSize is not supported by this operation.");
46
47
  }
47
48
  return this.listPagingPage(location, instanceId, options, settings);
48
49
  },
49
50
  };
50
51
  }
51
- listPagingPage(location, instanceId, options, _settings) {
52
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
53
- let result;
54
- result = yield tslib_1.__await(this._list(location, instanceId, options));
55
- yield yield tslib_1.__await(result.value || []);
56
- });
52
+ async *listPagingPage(location, instanceId, options, _settings) {
53
+ let result;
54
+ result = await this._list(location, instanceId, options);
55
+ yield result.value || [];
57
56
  }
58
- listPagingAll(location, instanceId, options) {
59
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
60
- var _a, e_1, _b, _c;
61
- try {
62
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(location, instanceId, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
63
- _c = _f.value;
64
- _d = false;
65
- const page = _c;
66
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
67
- }
68
- }
69
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
70
- finally {
71
- try {
72
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
73
- }
74
- finally { if (e_1) throw e_1.error; }
75
- }
76
- });
57
+ async *listPagingAll(location, instanceId, options) {
58
+ for await (const page of this.listPagingPage(location, instanceId, options)) {
59
+ yield* page;
60
+ }
77
61
  }
78
62
  /**
79
63
  * Show the event feed of all mutations done on all the Azure Cosmos DB SQL databases under the
@@ -1 +1 @@
1
- {"version":3,"file":"restorableSqlDatabases.js","sourceRoot":"","sources":["../../../src/operations/restorableSqlDatabases.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,0DAA0D;AAC1D,MAAa,0BAA0B;IAGrC;;;OAGG;IACH,YAAY,MAAgC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;OAQG;IACI,IAAI,CACT,QAAgB,EAChB,UAAkB,EAClB,OAAkD;QAElD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QAC/D,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,C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YACH,UAAU,EAAE,OAAO,CAAC,gCAAgC;SACrD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,SAAS;QACpB,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { RestorableSqlDatabases } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { CosmosDBManagementClient } from \"../cosmosDBManagementClient.js\";\nimport {\n RestorableSqlDatabaseGetResult,\n RestorableSqlDatabasesListOptionalParams,\n RestorableSqlDatabasesListResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing RestorableSqlDatabases operations. */\nexport class RestorableSqlDatabasesImpl implements RestorableSqlDatabases {\n private readonly client: CosmosDBManagementClient;\n\n /**\n * Initialize a new instance of the class RestorableSqlDatabases class.\n * @param client Reference to the service client\n */\n constructor(client: CosmosDBManagementClient) {\n this.client = client;\n }\n\n /**\n * Show the event feed of all mutations done on all the Azure Cosmos DB SQL databases under the\n * restorable account. This helps in scenario where database was accidentally deleted to get the\n * deletion time. This API requires\n * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission\n * @param location Cosmos DB region, with spaces between words and each word capitalized.\n * @param instanceId The instanceId GUID of a restorable database account.\n * @param options The options parameters.\n */\n public list(\n location: string,\n instanceId: string,\n options?: RestorableSqlDatabasesListOptionalParams,\n ): PagedAsyncIterableIterator<RestorableSqlDatabaseGetResult> {\n const iter = this.listPagingAll(location, instanceId, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(location, instanceId, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n location: string,\n instanceId: string,\n options?: RestorableSqlDatabasesListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<RestorableSqlDatabaseGetResult[]> {\n let result: RestorableSqlDatabasesListResponse;\n result = await this._list(location, instanceId, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n location: string,\n instanceId: string,\n options?: RestorableSqlDatabasesListOptionalParams,\n ): AsyncIterableIterator<RestorableSqlDatabaseGetResult> {\n for await (const page of this.listPagingPage(\n location,\n instanceId,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Show the event feed of all mutations done on all the Azure Cosmos DB SQL databases under the\n * restorable account. This helps in scenario where database was accidentally deleted to get the\n * deletion time. This API requires\n * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission\n * @param location Cosmos DB region, with spaces between words and each word capitalized.\n * @param instanceId The instanceId GUID of a restorable database account.\n * @param options The options parameters.\n */\n private _list(\n location: string,\n instanceId: string,\n options?: RestorableSqlDatabasesListOptionalParams,\n ): Promise<RestorableSqlDatabasesListResponse> {\n return this.client.sendOperationRequest(\n { location, instanceId, options },\n listOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlDatabases\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RestorableSqlDatabasesListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location1,\n Parameters.instanceId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"restorableSqlDatabases.js","sourceRoot":"","sources":["../../../src/operations/restorableSqlDatabases.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,0DAA0D;AAC1D,MAAa,0BAA0B;IACpB,MAAM,CAA2B;IAElD;;;OAGG;IACH,YAAY,MAAgC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;OAQG;IACI,IAAI,CACT,QAAgB,EAChB,UAAkB,EAClB,OAAkD;QAElD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QAC/D,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;YACtE,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,cAAc,CAC3B,QAAgB,EAChB,UAAkB,EAClB,OAAkD,EAClD,SAAwB;QAExB,IAAI,MAA0C,CAAC;QAC/C,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*\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { RestorableSqlDatabases } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { CosmosDBManagementClient } from \"../cosmosDBManagementClient.js\";\nimport {\n RestorableSqlDatabaseGetResult,\n RestorableSqlDatabasesListOptionalParams,\n RestorableSqlDatabasesListResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing RestorableSqlDatabases operations. */\nexport class RestorableSqlDatabasesImpl implements RestorableSqlDatabases {\n private readonly client: CosmosDBManagementClient;\n\n /**\n * Initialize a new instance of the class RestorableSqlDatabases class.\n * @param client Reference to the service client\n */\n constructor(client: CosmosDBManagementClient) {\n this.client = client;\n }\n\n /**\n * Show the event feed of all mutations done on all the Azure Cosmos DB SQL databases under the\n * restorable account. This helps in scenario where database was accidentally deleted to get the\n * deletion time. This API requires\n * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission\n * @param location Cosmos DB region, with spaces between words and each word capitalized.\n * @param instanceId The instanceId GUID of a restorable database account.\n * @param options The options parameters.\n */\n public list(\n location: string,\n instanceId: string,\n options?: RestorableSqlDatabasesListOptionalParams,\n ): PagedAsyncIterableIterator<RestorableSqlDatabaseGetResult> {\n const iter = this.listPagingAll(location, instanceId, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(location, instanceId, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n location: string,\n instanceId: string,\n options?: RestorableSqlDatabasesListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<RestorableSqlDatabaseGetResult[]> {\n let result: RestorableSqlDatabasesListResponse;\n result = await this._list(location, instanceId, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n location: string,\n instanceId: string,\n options?: RestorableSqlDatabasesListOptionalParams,\n ): AsyncIterableIterator<RestorableSqlDatabaseGetResult> {\n for await (const page of this.listPagingPage(\n location,\n instanceId,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Show the event feed of all mutations done on all the Azure Cosmos DB SQL databases under the\n * restorable account. This helps in scenario where database was accidentally deleted to get the\n * deletion time. This API requires\n * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission\n * @param location Cosmos DB region, with spaces between words and each word capitalized.\n * @param instanceId The instanceId GUID of a restorable database account.\n * @param options The options parameters.\n */\n private _list(\n location: string,\n instanceId: string,\n options?: RestorableSqlDatabasesListOptionalParams,\n ): Promise<RestorableSqlDatabasesListResponse> {\n return this.client.sendOperationRequest(\n { location, instanceId, options },\n listOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlDatabases\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RestorableSqlDatabasesListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location1,\n Parameters.instanceId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}