@azure/arm-cosmosdb 16.3.0-alpha.20250620.1 → 16.3.0-alpha.20250721.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 (331) 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 +11 -11
  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
  331. /package/review/{arm-cosmosdb.api.md → arm-cosmosdb-node.api.md} +0 -0
@@ -15,6 +15,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
15
15
  /// <reference lib="esnext.asynciterable" />
16
16
  /** Class containing PartitionKeyRangeIdRegion operations. */
17
17
  class PartitionKeyRangeIdRegionImpl {
18
+ client;
18
19
  /**
19
20
  * Initialize a new instance of the class PartitionKeyRangeIdRegion class.
20
21
  * @param client Reference to the service client
@@ -46,39 +47,22 @@ class PartitionKeyRangeIdRegionImpl {
46
47
  return this;
47
48
  },
48
49
  byPage: (settings) => {
49
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
50
+ if (settings?.maxPageSize) {
50
51
  throw new Error("maxPageSize is not supported by this operation.");
51
52
  }
52
53
  return this.listMetricsPagingPage(resourceGroupName, accountName, region, databaseRid, collectionRid, partitionKeyRangeId, filter, options, settings);
53
54
  },
54
55
  };
55
56
  }
56
- listMetricsPagingPage(resourceGroupName, accountName, region, databaseRid, collectionRid, partitionKeyRangeId, filter, options, _settings) {
57
- return tslib_1.__asyncGenerator(this, arguments, function* listMetricsPagingPage_1() {
58
- let result;
59
- result = yield tslib_1.__await(this._listMetrics(resourceGroupName, accountName, region, databaseRid, collectionRid, partitionKeyRangeId, filter, options));
60
- yield yield tslib_1.__await(result.value || []);
61
- });
57
+ async *listMetricsPagingPage(resourceGroupName, accountName, region, databaseRid, collectionRid, partitionKeyRangeId, filter, options, _settings) {
58
+ let result;
59
+ result = await this._listMetrics(resourceGroupName, accountName, region, databaseRid, collectionRid, partitionKeyRangeId, filter, options);
60
+ yield result.value || [];
62
61
  }
63
- listMetricsPagingAll(resourceGroupName, accountName, region, databaseRid, collectionRid, partitionKeyRangeId, filter, options) {
64
- return tslib_1.__asyncGenerator(this, arguments, function* listMetricsPagingAll_1() {
65
- var _a, e_1, _b, _c;
66
- try {
67
- for (var _d = true, _e = tslib_1.__asyncValues(this.listMetricsPagingPage(resourceGroupName, accountName, region, databaseRid, collectionRid, partitionKeyRangeId, filter, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
68
- _c = _f.value;
69
- _d = false;
70
- const page = _c;
71
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
72
- }
73
- }
74
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
75
- finally {
76
- try {
77
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
78
- }
79
- finally { if (e_1) throw e_1.error; }
80
- }
81
- });
62
+ async *listMetricsPagingAll(resourceGroupName, accountName, region, databaseRid, collectionRid, partitionKeyRangeId, filter, options) {
63
+ for await (const page of this.listMetricsPagingPage(resourceGroupName, accountName, region, databaseRid, collectionRid, partitionKeyRangeId, filter, options)) {
64
+ yield* page;
65
+ }
82
66
  }
83
67
  /**
84
68
  * Retrieves the metrics determined by the given filter for the given partition key range id and
@@ -1 +1 @@
1
- {"version":3,"file":"partitionKeyRangeIdRegion.js","sourceRoot":"","sources":["../../../src/operations/partitionKeyRangeIdRegion.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,6DAA6D;AAC7D,MAAa,6BAA6B;IAKxC;;;OAGG;IACH,YAAY,MAAgC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;OAaG;IACI,WAAW,CAChB,iBAAyB,EACzB,WAAmB,EACnB,MAAc,EACd,WAAmB,EACnB,aAAqB,EACrB,mBAA2B,EAC3B,MAAc,EACd,OAA4D;QAE5D,MAAM,IAAI,GAAG,IAAI,CAAC,oBAAoB,CACpC,iBAAiB,EACjB,WAAW,EACX,MAAM,EACN,WAAW,EACX,aAAa,EACb,mBAAmB,EACnB,MAAM,EACN,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,C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CAAC,yBAAA,sBAAA,IAAI,CAAA,CAAA,CAAA,CAAC;gBACd,CAAC;;;;;;;;;QACH,CAAC;KAAA;IAED;;;;;;;;;;;;;OAaG;IACK,YAAY,CAClB,iBAAyB,EACzB,WAAmB,EACnB,MAAc,EACd,WAAmB,EACnB,aAAqB,EACrB,mBAA2B,EAC3B,MAAc,EACd,OAA4D;QAE5D,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC;YACE,iBAAiB;YACjB,WAAW;YACX,MAAM;YACN,WAAW;YACX,aAAa;YACb,mBAAmB;YACnB,MAAM;YACN,OAAO;SACR,EACD,wBAAwB,CACzB,CAAC;IACJ,CAAC;CACF;AAhKD,sEAgKC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,wBAAwB,GAA6B;IACzD,IAAI,EAAE,wPAAwP;IAC9P,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,yBAAyB;SAC9C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,aAAa;QACxB,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,mBAAmB;KAC/B;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 { PartitionKeyRangeIdRegion } 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 PartitionMetric,\n PartitionKeyRangeIdRegionListMetricsOptionalParams,\n PartitionKeyRangeIdRegionListMetricsResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing PartitionKeyRangeIdRegion operations. */\nexport class PartitionKeyRangeIdRegionImpl\n implements PartitionKeyRangeIdRegion\n{\n private readonly client: CosmosDBManagementClient;\n\n /**\n * Initialize a new instance of the class PartitionKeyRangeIdRegion class.\n * @param client Reference to the service client\n */\n constructor(client: CosmosDBManagementClient) {\n this.client = client;\n }\n\n /**\n * Retrieves the metrics determined by the given filter for the given partition key range id and\n * region.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param accountName Cosmos DB database account name.\n * @param region Cosmos DB region, with spaces between words and each word capitalized.\n * @param databaseRid Cosmos DB database rid.\n * @param collectionRid Cosmos DB collection rid.\n * @param partitionKeyRangeId Partition Key Range Id for which to get data.\n * @param filter An OData filter expression that describes a subset of metrics to return. The\n * parameters that can be filtered are name.value (name of the metric, can have an or of multiple\n * names), startTime, endTime, and timeGrain. The supported operator is eq.\n * @param options The options parameters.\n */\n public listMetrics(\n resourceGroupName: string,\n accountName: string,\n region: string,\n databaseRid: string,\n collectionRid: string,\n partitionKeyRangeId: string,\n filter: string,\n options?: PartitionKeyRangeIdRegionListMetricsOptionalParams,\n ): PagedAsyncIterableIterator<PartitionMetric> {\n const iter = this.listMetricsPagingAll(\n resourceGroupName,\n accountName,\n region,\n databaseRid,\n collectionRid,\n partitionKeyRangeId,\n filter,\n options,\n );\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.listMetricsPagingPage(\n resourceGroupName,\n accountName,\n region,\n databaseRid,\n collectionRid,\n partitionKeyRangeId,\n filter,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listMetricsPagingPage(\n resourceGroupName: string,\n accountName: string,\n region: string,\n databaseRid: string,\n collectionRid: string,\n partitionKeyRangeId: string,\n filter: string,\n options?: PartitionKeyRangeIdRegionListMetricsOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<PartitionMetric[]> {\n let result: PartitionKeyRangeIdRegionListMetricsResponse;\n result = await this._listMetrics(\n resourceGroupName,\n accountName,\n region,\n databaseRid,\n collectionRid,\n partitionKeyRangeId,\n filter,\n options,\n );\n yield result.value || [];\n }\n\n private async *listMetricsPagingAll(\n resourceGroupName: string,\n accountName: string,\n region: string,\n databaseRid: string,\n collectionRid: string,\n partitionKeyRangeId: string,\n filter: string,\n options?: PartitionKeyRangeIdRegionListMetricsOptionalParams,\n ): AsyncIterableIterator<PartitionMetric> {\n for await (const page of this.listMetricsPagingPage(\n resourceGroupName,\n accountName,\n region,\n databaseRid,\n collectionRid,\n partitionKeyRangeId,\n filter,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Retrieves the metrics determined by the given filter for the given partition key range id and\n * region.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param accountName Cosmos DB database account name.\n * @param region Cosmos DB region, with spaces between words and each word capitalized.\n * @param databaseRid Cosmos DB database rid.\n * @param collectionRid Cosmos DB collection rid.\n * @param partitionKeyRangeId Partition Key Range Id for which to get data.\n * @param filter An OData filter expression that describes a subset of metrics to return. The\n * parameters that can be filtered are name.value (name of the metric, can have an or of multiple\n * names), startTime, endTime, and timeGrain. The supported operator is eq.\n * @param options The options parameters.\n */\n private _listMetrics(\n resourceGroupName: string,\n accountName: string,\n region: string,\n databaseRid: string,\n collectionRid: string,\n partitionKeyRangeId: string,\n filter: string,\n options?: PartitionKeyRangeIdRegionListMetricsOptionalParams,\n ): Promise<PartitionKeyRangeIdRegionListMetricsResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n accountName,\n region,\n databaseRid,\n collectionRid,\n partitionKeyRangeId,\n filter,\n options,\n },\n listMetricsOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listMetricsOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/partitionKeyRangeId/{partitionKeyRangeId}/metrics\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PartitionMetricListResult,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.accountName,\n Parameters.databaseRid,\n Parameters.collectionRid,\n Parameters.region,\n Parameters.partitionKeyRangeId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"partitionKeyRangeIdRegion.js","sourceRoot":"","sources":["../../../src/operations/partitionKeyRangeIdRegion.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,6DAA6D;AAC7D,MAAa,6BAA6B;IAGvB,MAAM,CAA2B;IAElD;;;OAGG;IACH,YAAY,MAAgC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;OAaG;IACI,WAAW,CAChB,iBAAyB,EACzB,WAAmB,EACnB,MAAc,EACd,WAAmB,EACnB,aAAqB,EACrB,mBAA2B,EAC3B,MAAc,EACd,OAA4D;QAE5D,MAAM,IAAI,GAAG,IAAI,CAAC,oBAAoB,CACpC,iB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b,mBAAmB,EACnB,MAAM,EACN,OAAO,CACR,EAAE,CAAC;YACF,KAAK,CAAC,CAAC,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED;;;;;;;;;;;;;OAaG;IACK,YAAY,CAClB,iBAAyB,EACzB,WAAmB,EACnB,MAAc,EACd,WAAmB,EACnB,aAAqB,EACrB,mBAA2B,EAC3B,MAAc,EACd,OAA4D;QAE5D,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC;YACE,iBAAiB;YACjB,WAAW;YACX,MAAM;YACN,WAAW;YACX,aAAa;YACb,mBAAmB;YACnB,MAAM;YACN,OAAO;SACR,EACD,wBAAwB,CACzB,CAAC;IACJ,CAAC;CACF;AAhKD,sEAgKC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,wBAAwB,GAA6B;IACzD,IAAI,EAAE,wPAAwP;IAC9P,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,yBAAyB;SAC9C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,aAAa;QACxB,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,mBAAmB;KAC/B;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 { PartitionKeyRangeIdRegion } 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 PartitionMetric,\n PartitionKeyRangeIdRegionListMetricsOptionalParams,\n PartitionKeyRangeIdRegionListMetricsResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing PartitionKeyRangeIdRegion operations. */\nexport class PartitionKeyRangeIdRegionImpl\n implements PartitionKeyRangeIdRegion\n{\n private readonly client: CosmosDBManagementClient;\n\n /**\n * Initialize a new instance of the class PartitionKeyRangeIdRegion class.\n * @param client Reference to the service client\n */\n constructor(client: CosmosDBManagementClient) {\n this.client = client;\n }\n\n /**\n * Retrieves the metrics determined by the given filter for the given partition key range id and\n * region.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param accountName Cosmos DB database account name.\n * @param region Cosmos DB region, with spaces between words and each word capitalized.\n * @param databaseRid Cosmos DB database rid.\n * @param collectionRid Cosmos DB collection rid.\n * @param partitionKeyRangeId Partition Key Range Id for which to get data.\n * @param filter An OData filter expression that describes a subset of metrics to return. The\n * parameters that can be filtered are name.value (name of the metric, can have an or of multiple\n * names), startTime, endTime, and timeGrain. The supported operator is eq.\n * @param options The options parameters.\n */\n public listMetrics(\n resourceGroupName: string,\n accountName: string,\n region: string,\n databaseRid: string,\n collectionRid: string,\n partitionKeyRangeId: string,\n filter: string,\n options?: PartitionKeyRangeIdRegionListMetricsOptionalParams,\n ): PagedAsyncIterableIterator<PartitionMetric> {\n const iter = this.listMetricsPagingAll(\n resourceGroupName,\n accountName,\n region,\n databaseRid,\n collectionRid,\n partitionKeyRangeId,\n filter,\n options,\n );\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.listMetricsPagingPage(\n resourceGroupName,\n accountName,\n region,\n databaseRid,\n collectionRid,\n partitionKeyRangeId,\n filter,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listMetricsPagingPage(\n resourceGroupName: string,\n accountName: string,\n region: string,\n databaseRid: string,\n collectionRid: string,\n partitionKeyRangeId: string,\n filter: string,\n options?: PartitionKeyRangeIdRegionListMetricsOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<PartitionMetric[]> {\n let result: PartitionKeyRangeIdRegionListMetricsResponse;\n result = await this._listMetrics(\n resourceGroupName,\n accountName,\n region,\n databaseRid,\n collectionRid,\n partitionKeyRangeId,\n filter,\n options,\n );\n yield result.value || [];\n }\n\n private async *listMetricsPagingAll(\n resourceGroupName: string,\n accountName: string,\n region: string,\n databaseRid: string,\n collectionRid: string,\n partitionKeyRangeId: string,\n filter: string,\n options?: PartitionKeyRangeIdRegionListMetricsOptionalParams,\n ): AsyncIterableIterator<PartitionMetric> {\n for await (const page of this.listMetricsPagingPage(\n resourceGroupName,\n accountName,\n region,\n databaseRid,\n collectionRid,\n partitionKeyRangeId,\n filter,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Retrieves the metrics determined by the given filter for the given partition key range id and\n * region.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param accountName Cosmos DB database account name.\n * @param region Cosmos DB region, with spaces between words and each word capitalized.\n * @param databaseRid Cosmos DB database rid.\n * @param collectionRid Cosmos DB collection rid.\n * @param partitionKeyRangeId Partition Key Range Id for which to get data.\n * @param filter An OData filter expression that describes a subset of metrics to return. The\n * parameters that can be filtered are name.value (name of the metric, can have an or of multiple\n * names), startTime, endTime, and timeGrain. The supported operator is eq.\n * @param options The options parameters.\n */\n private _listMetrics(\n resourceGroupName: string,\n accountName: string,\n region: string,\n databaseRid: string,\n collectionRid: string,\n partitionKeyRangeId: string,\n filter: string,\n options?: PartitionKeyRangeIdRegionListMetricsOptionalParams,\n ): Promise<PartitionKeyRangeIdRegionListMetricsResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n accountName,\n region,\n databaseRid,\n collectionRid,\n partitionKeyRangeId,\n filter,\n options,\n },\n listMetricsOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listMetricsOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/partitionKeyRangeId/{partitionKeyRangeId}/metrics\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PartitionMetricListResult,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.accountName,\n Parameters.databaseRid,\n Parameters.collectionRid,\n Parameters.region,\n Parameters.partitionKeyRangeId,\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 Percentile operations. */
17
17
  class PercentileImpl {
18
+ client;
18
19
  /**
19
20
  * Initialize a new instance of the class Percentile class.
20
21
  * @param client Reference to the service client
@@ -42,39 +43,22 @@ class PercentileImpl {
42
43
  return this;
43
44
  },
44
45
  byPage: (settings) => {
45
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
46
+ if (settings?.maxPageSize) {
46
47
  throw new Error("maxPageSize is not supported by this operation.");
47
48
  }
48
49
  return this.listMetricsPagingPage(resourceGroupName, accountName, filter, options, settings);
49
50
  },
50
51
  };
51
52
  }
52
- listMetricsPagingPage(resourceGroupName, accountName, filter, options, _settings) {
53
- return tslib_1.__asyncGenerator(this, arguments, function* listMetricsPagingPage_1() {
54
- let result;
55
- result = yield tslib_1.__await(this._listMetrics(resourceGroupName, accountName, filter, options));
56
- yield yield tslib_1.__await(result.value || []);
57
- });
53
+ async *listMetricsPagingPage(resourceGroupName, accountName, filter, options, _settings) {
54
+ let result;
55
+ result = await this._listMetrics(resourceGroupName, accountName, filter, options);
56
+ yield result.value || [];
58
57
  }
59
- listMetricsPagingAll(resourceGroupName, accountName, filter, options) {
60
- return tslib_1.__asyncGenerator(this, arguments, function* listMetricsPagingAll_1() {
61
- var _a, e_1, _b, _c;
62
- try {
63
- for (var _d = true, _e = tslib_1.__asyncValues(this.listMetricsPagingPage(resourceGroupName, accountName, filter, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
64
- _c = _f.value;
65
- _d = false;
66
- const page = _c;
67
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
68
- }
69
- }
70
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
71
- finally {
72
- try {
73
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
74
- }
75
- finally { if (e_1) throw e_1.error; }
76
- }
77
- });
58
+ async *listMetricsPagingAll(resourceGroupName, accountName, filter, options) {
59
+ for await (const page of this.listMetricsPagingPage(resourceGroupName, accountName, filter, options)) {
60
+ yield* page;
61
+ }
78
62
  }
79
63
  /**
80
64
  * Retrieves the metrics determined by the given filter for the given database account. This url is
@@ -1 +1 @@
1
- {"version":3,"file":"percentile.js","sourceRoot":"","sources":["../../../src/operations/percentile.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAa,cAAc;IAGzB;;;OAGG;IACH,YAAY,MAAgC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;OASG;I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A,IAAI,CAAA,CAAA,CAAA,CAAC;gBACd,CAAC;;;;;;;;;QACH,CAAC;KAAA;IAED;;;;;;;;;OASG;IACK,YAAY,CAClB,iBAAyB,EACzB,WAAmB,EACnB,MAAc,EACd,OAA6C;QAE7C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,EACnD,wBAAwB,CACzB,CAAC;IACJ,CAAC;CACF;AA7GD,wCA6GC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,wBAAwB,GAA6B;IACzD,IAAI,EAAE,qJAAqJ;IAC3J,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,WAAW;KACvB;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 { Percentile } 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 PercentileMetric,\n PercentileListMetricsOptionalParams,\n PercentileListMetricsResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Percentile operations. */\nexport class PercentileImpl implements Percentile {\n private readonly client: CosmosDBManagementClient;\n\n /**\n * Initialize a new instance of the class Percentile class.\n * @param client Reference to the service client\n */\n constructor(client: CosmosDBManagementClient) {\n this.client = client;\n }\n\n /**\n * Retrieves the metrics determined by the given filter for the given database account. This url is\n * only for PBS and Replication Latency data\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param accountName Cosmos DB database account name.\n * @param filter An OData filter expression that describes a subset of metrics to return. The\n * parameters that can be filtered are name.value (name of the metric, can have an or of multiple\n * names), startTime, endTime, and timeGrain. The supported operator is eq.\n * @param options The options parameters.\n */\n public listMetrics(\n resourceGroupName: string,\n accountName: string,\n filter: string,\n options?: PercentileListMetricsOptionalParams,\n ): PagedAsyncIterableIterator<PercentileMetric> {\n const iter = this.listMetricsPagingAll(\n resourceGroupName,\n accountName,\n filter,\n options,\n );\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.listMetricsPagingPage(\n resourceGroupName,\n accountName,\n filter,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listMetricsPagingPage(\n resourceGroupName: string,\n accountName: string,\n filter: string,\n options?: PercentileListMetricsOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<PercentileMetric[]> {\n let result: PercentileListMetricsResponse;\n result = await this._listMetrics(\n resourceGroupName,\n accountName,\n filter,\n options,\n );\n yield result.value || [];\n }\n\n private async *listMetricsPagingAll(\n resourceGroupName: string,\n accountName: string,\n filter: string,\n options?: PercentileListMetricsOptionalParams,\n ): AsyncIterableIterator<PercentileMetric> {\n for await (const page of this.listMetricsPagingPage(\n resourceGroupName,\n accountName,\n filter,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Retrieves the metrics determined by the given filter for the given database account. This url is\n * only for PBS and Replication Latency data\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param accountName Cosmos DB database account name.\n * @param filter An OData filter expression that describes a subset of metrics to return. The\n * parameters that can be filtered are name.value (name of the metric, can have an or of multiple\n * names), startTime, endTime, and timeGrain. The supported operator is eq.\n * @param options The options parameters.\n */\n private _listMetrics(\n resourceGroupName: string,\n accountName: string,\n filter: string,\n options?: PercentileListMetricsOptionalParams,\n ): Promise<PercentileListMetricsResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, accountName, filter, options },\n listMetricsOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listMetricsOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/percentile/metrics\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PercentileMetricListResult,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.accountName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"percentile.js","sourceRoot":"","sources":["../../../src/operations/percentile.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAa,cAAc;IACR,MAAM,CAA2B;IAElD;;;OAGG;IACH,YAAY,MAAgC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;OASG;IACI,WAAW,CAChB,iBAAyB,EACzB,WAAmB,EACnB,MAAc,EACd,OAA6C;QAE7C,MAAM,IAAI,GAAG,IAAI,CAAC,oBAAoB,CACpC,iBA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AE,EACnD,wBAAwB,CACzB,CAAC;IACJ,CAAC;CACF;AA7GD,wCA6GC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,wBAAwB,GAA6B;IACzD,IAAI,EAAE,qJAAqJ;IAC3J,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,WAAW;KACvB;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 { Percentile } 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 PercentileMetric,\n PercentileListMetricsOptionalParams,\n PercentileListMetricsResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Percentile operations. */\nexport class PercentileImpl implements Percentile {\n private readonly client: CosmosDBManagementClient;\n\n /**\n * Initialize a new instance of the class Percentile class.\n * @param client Reference to the service client\n */\n constructor(client: CosmosDBManagementClient) {\n this.client = client;\n }\n\n /**\n * Retrieves the metrics determined by the given filter for the given database account. This url is\n * only for PBS and Replication Latency data\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param accountName Cosmos DB database account name.\n * @param filter An OData filter expression that describes a subset of metrics to return. The\n * parameters that can be filtered are name.value (name of the metric, can have an or of multiple\n * names), startTime, endTime, and timeGrain. The supported operator is eq.\n * @param options The options parameters.\n */\n public listMetrics(\n resourceGroupName: string,\n accountName: string,\n filter: string,\n options?: PercentileListMetricsOptionalParams,\n ): PagedAsyncIterableIterator<PercentileMetric> {\n const iter = this.listMetricsPagingAll(\n resourceGroupName,\n accountName,\n filter,\n options,\n );\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.listMetricsPagingPage(\n resourceGroupName,\n accountName,\n filter,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listMetricsPagingPage(\n resourceGroupName: string,\n accountName: string,\n filter: string,\n options?: PercentileListMetricsOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<PercentileMetric[]> {\n let result: PercentileListMetricsResponse;\n result = await this._listMetrics(\n resourceGroupName,\n accountName,\n filter,\n options,\n );\n yield result.value || [];\n }\n\n private async *listMetricsPagingAll(\n resourceGroupName: string,\n accountName: string,\n filter: string,\n options?: PercentileListMetricsOptionalParams,\n ): AsyncIterableIterator<PercentileMetric> {\n for await (const page of this.listMetricsPagingPage(\n resourceGroupName,\n accountName,\n filter,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Retrieves the metrics determined by the given filter for the given database account. This url is\n * only for PBS and Replication Latency data\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param accountName Cosmos DB database account name.\n * @param filter An OData filter expression that describes a subset of metrics to return. The\n * parameters that can be filtered are name.value (name of the metric, can have an or of multiple\n * names), startTime, endTime, and timeGrain. The supported operator is eq.\n * @param options The options parameters.\n */\n private _listMetrics(\n resourceGroupName: string,\n accountName: string,\n filter: string,\n options?: PercentileListMetricsOptionalParams,\n ): Promise<PercentileListMetricsResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, accountName, filter, options },\n listMetricsOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listMetricsOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/percentile/metrics\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PercentileMetricListResult,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.accountName,\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 PercentileSourceTarget operations. */
17
17
  class PercentileSourceTargetImpl {
18
+ client;
18
19
  /**
19
20
  * Initialize a new instance of the class PercentileSourceTarget class.
20
21
  * @param client Reference to the service client
@@ -46,39 +47,22 @@ class PercentileSourceTargetImpl {
46
47
  return this;
47
48
  },
48
49
  byPage: (settings) => {
49
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
50
+ if (settings?.maxPageSize) {
50
51
  throw new Error("maxPageSize is not supported by this operation.");
51
52
  }
52
53
  return this.listMetricsPagingPage(resourceGroupName, accountName, sourceRegion, targetRegion, filter, options, settings);
53
54
  },
54
55
  };
55
56
  }
56
- listMetricsPagingPage(resourceGroupName, accountName, sourceRegion, targetRegion, filter, options, _settings) {
57
- return tslib_1.__asyncGenerator(this, arguments, function* listMetricsPagingPage_1() {
58
- let result;
59
- result = yield tslib_1.__await(this._listMetrics(resourceGroupName, accountName, sourceRegion, targetRegion, filter, options));
60
- yield yield tslib_1.__await(result.value || []);
61
- });
57
+ async *listMetricsPagingPage(resourceGroupName, accountName, sourceRegion, targetRegion, filter, options, _settings) {
58
+ let result;
59
+ result = await this._listMetrics(resourceGroupName, accountName, sourceRegion, targetRegion, filter, options);
60
+ yield result.value || [];
62
61
  }
63
- listMetricsPagingAll(resourceGroupName, accountName, sourceRegion, targetRegion, filter, options) {
64
- return tslib_1.__asyncGenerator(this, arguments, function* listMetricsPagingAll_1() {
65
- var _a, e_1, _b, _c;
66
- try {
67
- for (var _d = true, _e = tslib_1.__asyncValues(this.listMetricsPagingPage(resourceGroupName, accountName, sourceRegion, targetRegion, filter, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
68
- _c = _f.value;
69
- _d = false;
70
- const page = _c;
71
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
72
- }
73
- }
74
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
75
- finally {
76
- try {
77
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
78
- }
79
- finally { if (e_1) throw e_1.error; }
80
- }
81
- });
62
+ async *listMetricsPagingAll(resourceGroupName, accountName, sourceRegion, targetRegion, filter, options) {
63
+ for await (const page of this.listMetricsPagingPage(resourceGroupName, accountName, sourceRegion, targetRegion, filter, options)) {
64
+ yield* page;
65
+ }
82
66
  }
83
67
  /**
84
68
  * Retrieves the metrics determined by the given filter for the given account, source and target
@@ -1 +1 @@
1
- {"version":3,"file":"percentileSourceTarget.js","sourceRoot":"","sources":["../../../src/operations/percentileSourceTarget.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;;;;;;;;;;;;;OA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X,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,OAAO,CACR,CAAA,IAAA,uEAAE,CAAC;oBAPqB,cAOxB;oBAPwB,WAOxB;oBAPU,MAAM,IAAI,KAAA,CAAA;oBAQnB,sBAAA,KAAK,CAAC,CAAC,yBAAA,sBAAA,IAAI,CAAA,CAAA,CAAA,CAAC;gBACd,CAAC;;;;;;;;;QACH,CAAC;KAAA;IAED;;;;;;;;;;;;;OAaG;IACK,YAAY,CAClB,iBAAyB,EACzB,WAAmB,EACnB,YAAoB,EACpB,YAAoB,EACpB,MAAc,EACd,OAAyD;QAEzD,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC;YACE,iBAAiB;YACjB,WAAW;YACX,YAAY;YACZ,YAAY;YACZ,MAAM;YACN,OAAO;SACR,EACD,wBAAwB,CACzB,CAAC;IACJ,CAAC;CACF;AA5ID,gEA4IC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,wBAAwB,GAA6B;IACzD,IAAI,EAAE,6MAA6M;IACnN,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,YAAY;KACxB;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 { PercentileSourceTarget } 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 PercentileMetric,\n PercentileSourceTargetListMetricsOptionalParams,\n PercentileSourceTargetListMetricsResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing PercentileSourceTarget operations. */\nexport class PercentileSourceTargetImpl implements PercentileSourceTarget {\n private readonly client: CosmosDBManagementClient;\n\n /**\n * Initialize a new instance of the class PercentileSourceTarget class.\n * @param client Reference to the service client\n */\n constructor(client: CosmosDBManagementClient) {\n this.client = client;\n }\n\n /**\n * Retrieves the metrics determined by the given filter for the given account, source and target\n * region. This url is only for PBS and Replication Latency data\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param accountName Cosmos DB database account name.\n * @param sourceRegion Source region from which data is written. Cosmos DB region, with spaces between\n * words and each word capitalized.\n * @param targetRegion Target region to which data is written. Cosmos DB region, with spaces between\n * words and each word capitalized.\n * @param filter An OData filter expression that describes a subset of metrics to return. The\n * parameters that can be filtered are name.value (name of the metric, can have an or of multiple\n * names), startTime, endTime, and timeGrain. The supported operator is eq.\n * @param options The options parameters.\n */\n public listMetrics(\n resourceGroupName: string,\n accountName: string,\n sourceRegion: string,\n targetRegion: string,\n filter: string,\n options?: PercentileSourceTargetListMetricsOptionalParams,\n ): PagedAsyncIterableIterator<PercentileMetric> {\n const iter = this.listMetricsPagingAll(\n resourceGroupName,\n accountName,\n sourceRegion,\n targetRegion,\n filter,\n options,\n );\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.listMetricsPagingPage(\n resourceGroupName,\n accountName,\n sourceRegion,\n targetRegion,\n filter,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listMetricsPagingPage(\n resourceGroupName: string,\n accountName: string,\n sourceRegion: string,\n targetRegion: string,\n filter: string,\n options?: PercentileSourceTargetListMetricsOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<PercentileMetric[]> {\n let result: PercentileSourceTargetListMetricsResponse;\n result = await this._listMetrics(\n resourceGroupName,\n accountName,\n sourceRegion,\n targetRegion,\n filter,\n options,\n );\n yield result.value || [];\n }\n\n private async *listMetricsPagingAll(\n resourceGroupName: string,\n accountName: string,\n sourceRegion: string,\n targetRegion: string,\n filter: string,\n options?: PercentileSourceTargetListMetricsOptionalParams,\n ): AsyncIterableIterator<PercentileMetric> {\n for await (const page of this.listMetricsPagingPage(\n resourceGroupName,\n accountName,\n sourceRegion,\n targetRegion,\n filter,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Retrieves the metrics determined by the given filter for the given account, source and target\n * region. This url is only for PBS and Replication Latency data\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param accountName Cosmos DB database account name.\n * @param sourceRegion Source region from which data is written. Cosmos DB region, with spaces between\n * words and each word capitalized.\n * @param targetRegion Target region to which data is written. Cosmos DB region, with spaces between\n * words and each word capitalized.\n * @param filter An OData filter expression that describes a subset of metrics to return. The\n * parameters that can be filtered are name.value (name of the metric, can have an or of multiple\n * names), startTime, endTime, and timeGrain. The supported operator is eq.\n * @param options The options parameters.\n */\n private _listMetrics(\n resourceGroupName: string,\n accountName: string,\n sourceRegion: string,\n targetRegion: string,\n filter: string,\n options?: PercentileSourceTargetListMetricsOptionalParams,\n ): Promise<PercentileSourceTargetListMetricsResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n accountName,\n sourceRegion,\n targetRegion,\n filter,\n options,\n },\n listMetricsOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listMetricsOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sourceRegion/{sourceRegion}/targetRegion/{targetRegion}/percentile/metrics\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PercentileMetricListResult,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.accountName,\n Parameters.sourceRegion,\n Parameters.targetRegion,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"percentileSourceTarget.js","sourceRoot":"","sources":["../../../src/operations/percentileSourceTarget.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;;;;;;;;;;;;;OAaG;IACI,WAAW,CAChB,iBAAyB,EACzB,WAAmB,EACnB,YAAoB,EACpB,YAAoB,EACpB,MAAc,EACd,OAAyD;QAEzD,MAAM,IAAI,GAAG,IAAI,CAAC,oBAAoB,CACpC,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,OAAO,CACR,CAAC;QACF,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,E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G,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,wBAAwB,GAA6B;IACzD,IAAI,EAAE,6MAA6M;IACnN,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,YAAY;KACxB;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 { PercentileSourceTarget } 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 PercentileMetric,\n PercentileSourceTargetListMetricsOptionalParams,\n PercentileSourceTargetListMetricsResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing PercentileSourceTarget operations. */\nexport class PercentileSourceTargetImpl implements PercentileSourceTarget {\n private readonly client: CosmosDBManagementClient;\n\n /**\n * Initialize a new instance of the class PercentileSourceTarget class.\n * @param client Reference to the service client\n */\n constructor(client: CosmosDBManagementClient) {\n this.client = client;\n }\n\n /**\n * Retrieves the metrics determined by the given filter for the given account, source and target\n * region. This url is only for PBS and Replication Latency data\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param accountName Cosmos DB database account name.\n * @param sourceRegion Source region from which data is written. Cosmos DB region, with spaces between\n * words and each word capitalized.\n * @param targetRegion Target region to which data is written. Cosmos DB region, with spaces between\n * words and each word capitalized.\n * @param filter An OData filter expression that describes a subset of metrics to return. The\n * parameters that can be filtered are name.value (name of the metric, can have an or of multiple\n * names), startTime, endTime, and timeGrain. The supported operator is eq.\n * @param options The options parameters.\n */\n public listMetrics(\n resourceGroupName: string,\n accountName: string,\n sourceRegion: string,\n targetRegion: string,\n filter: string,\n options?: PercentileSourceTargetListMetricsOptionalParams,\n ): PagedAsyncIterableIterator<PercentileMetric> {\n const iter = this.listMetricsPagingAll(\n resourceGroupName,\n accountName,\n sourceRegion,\n targetRegion,\n filter,\n options,\n );\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.listMetricsPagingPage(\n resourceGroupName,\n accountName,\n sourceRegion,\n targetRegion,\n filter,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listMetricsPagingPage(\n resourceGroupName: string,\n accountName: string,\n sourceRegion: string,\n targetRegion: string,\n filter: string,\n options?: PercentileSourceTargetListMetricsOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<PercentileMetric[]> {\n let result: PercentileSourceTargetListMetricsResponse;\n result = await this._listMetrics(\n resourceGroupName,\n accountName,\n sourceRegion,\n targetRegion,\n filter,\n options,\n );\n yield result.value || [];\n }\n\n private async *listMetricsPagingAll(\n resourceGroupName: string,\n accountName: string,\n sourceRegion: string,\n targetRegion: string,\n filter: string,\n options?: PercentileSourceTargetListMetricsOptionalParams,\n ): AsyncIterableIterator<PercentileMetric> {\n for await (const page of this.listMetricsPagingPage(\n resourceGroupName,\n accountName,\n sourceRegion,\n targetRegion,\n filter,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Retrieves the metrics determined by the given filter for the given account, source and target\n * region. This url is only for PBS and Replication Latency data\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param accountName Cosmos DB database account name.\n * @param sourceRegion Source region from which data is written. Cosmos DB region, with spaces between\n * words and each word capitalized.\n * @param targetRegion Target region to which data is written. Cosmos DB region, with spaces between\n * words and each word capitalized.\n * @param filter An OData filter expression that describes a subset of metrics to return. The\n * parameters that can be filtered are name.value (name of the metric, can have an or of multiple\n * names), startTime, endTime, and timeGrain. The supported operator is eq.\n * @param options The options parameters.\n */\n private _listMetrics(\n resourceGroupName: string,\n accountName: string,\n sourceRegion: string,\n targetRegion: string,\n filter: string,\n options?: PercentileSourceTargetListMetricsOptionalParams,\n ): Promise<PercentileSourceTargetListMetricsResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n accountName,\n sourceRegion,\n targetRegion,\n filter,\n options,\n },\n listMetricsOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listMetricsOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sourceRegion/{sourceRegion}/targetRegion/{targetRegion}/percentile/metrics\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PercentileMetricListResult,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.accountName,\n Parameters.sourceRegion,\n Parameters.targetRegion,\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 PercentileTarget operations. */
17
17
  class PercentileTargetImpl {
18
+ client;
18
19
  /**
19
20
  * Initialize a new instance of the class PercentileTarget class.
20
21
  * @param client Reference to the service client
@@ -44,39 +45,22 @@ class PercentileTargetImpl {
44
45
  return this;
45
46
  },
46
47
  byPage: (settings) => {
47
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
48
+ if (settings?.maxPageSize) {
48
49
  throw new Error("maxPageSize is not supported by this operation.");
49
50
  }
50
51
  return this.listMetricsPagingPage(resourceGroupName, accountName, targetRegion, filter, options, settings);
51
52
  },
52
53
  };
53
54
  }
54
- listMetricsPagingPage(resourceGroupName, accountName, targetRegion, filter, options, _settings) {
55
- return tslib_1.__asyncGenerator(this, arguments, function* listMetricsPagingPage_1() {
56
- let result;
57
- result = yield tslib_1.__await(this._listMetrics(resourceGroupName, accountName, targetRegion, filter, options));
58
- yield yield tslib_1.__await(result.value || []);
59
- });
55
+ async *listMetricsPagingPage(resourceGroupName, accountName, targetRegion, filter, options, _settings) {
56
+ let result;
57
+ result = await this._listMetrics(resourceGroupName, accountName, targetRegion, filter, options);
58
+ yield result.value || [];
60
59
  }
61
- listMetricsPagingAll(resourceGroupName, accountName, targetRegion, filter, options) {
62
- return tslib_1.__asyncGenerator(this, arguments, function* listMetricsPagingAll_1() {
63
- var _a, e_1, _b, _c;
64
- try {
65
- for (var _d = true, _e = tslib_1.__asyncValues(this.listMetricsPagingPage(resourceGroupName, accountName, targetRegion, filter, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
66
- _c = _f.value;
67
- _d = false;
68
- const page = _c;
69
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
70
- }
71
- }
72
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
73
- finally {
74
- try {
75
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
76
- }
77
- finally { if (e_1) throw e_1.error; }
78
- }
79
- });
60
+ async *listMetricsPagingAll(resourceGroupName, accountName, targetRegion, filter, options) {
61
+ for await (const page of this.listMetricsPagingPage(resourceGroupName, accountName, targetRegion, filter, options)) {
62
+ yield* page;
63
+ }
80
64
  }
81
65
  /**
82
66
  * Retrieves the metrics determined by the given filter for the given account target region. This url
@@ -1 +1 @@
1
- {"version":3,"file":"percentileTarget.js","sourceRoot":"","sources":["../../../src/operations/percentileTarget.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,oDAAoD;AACpD,MAAa,oBAAoB;IAG/B;;;OAGG;IACH,YAAY,MAAgC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;OAWG;IACI,WAAW,CAChB,iBAAyB,EACzB,WAAmB,EACnB,YAAoB,EACpB,MAAc,EACd,OAAmD;QAEnD,MAAM,IAAI,GAAG,IAAI,CAAC,oBAAoB,CACpC,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,MAAM,EACN,OAAO,CACR,CAAC;QACF,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,qBAAqB,CAC/B,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,MAAM,EACN,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,qBAAqB,CAClC,iBAAyB,EACzB,WAAmB,EACnB,YAAoB,EACpB,MAAc,EACd,OAAmD,EACnD,SAAwB;;YAExB,IA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AC;IAC3D,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,YAAY;KACxB;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 { PercentileTarget } 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 PercentileMetric,\n PercentileTargetListMetricsOptionalParams,\n PercentileTargetListMetricsResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing PercentileTarget operations. */\nexport class PercentileTargetImpl implements PercentileTarget {\n private readonly client: CosmosDBManagementClient;\n\n /**\n * Initialize a new instance of the class PercentileTarget class.\n * @param client Reference to the service client\n */\n constructor(client: CosmosDBManagementClient) {\n this.client = client;\n }\n\n /**\n * Retrieves the metrics determined by the given filter for the given account target region. This url\n * is only for PBS and Replication Latency data\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param accountName Cosmos DB database account name.\n * @param targetRegion Target region to which data is written. Cosmos DB region, with spaces between\n * words and each word capitalized.\n * @param filter An OData filter expression that describes a subset of metrics to return. The\n * parameters that can be filtered are name.value (name of the metric, can have an or of multiple\n * names), startTime, endTime, and timeGrain. The supported operator is eq.\n * @param options The options parameters.\n */\n public listMetrics(\n resourceGroupName: string,\n accountName: string,\n targetRegion: string,\n filter: string,\n options?: PercentileTargetListMetricsOptionalParams,\n ): PagedAsyncIterableIterator<PercentileMetric> {\n const iter = this.listMetricsPagingAll(\n resourceGroupName,\n accountName,\n targetRegion,\n filter,\n options,\n );\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.listMetricsPagingPage(\n resourceGroupName,\n accountName,\n targetRegion,\n filter,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listMetricsPagingPage(\n resourceGroupName: string,\n accountName: string,\n targetRegion: string,\n filter: string,\n options?: PercentileTargetListMetricsOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<PercentileMetric[]> {\n let result: PercentileTargetListMetricsResponse;\n result = await this._listMetrics(\n resourceGroupName,\n accountName,\n targetRegion,\n filter,\n options,\n );\n yield result.value || [];\n }\n\n private async *listMetricsPagingAll(\n resourceGroupName: string,\n accountName: string,\n targetRegion: string,\n filter: string,\n options?: PercentileTargetListMetricsOptionalParams,\n ): AsyncIterableIterator<PercentileMetric> {\n for await (const page of this.listMetricsPagingPage(\n resourceGroupName,\n accountName,\n targetRegion,\n filter,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Retrieves the metrics determined by the given filter for the given account target region. This url\n * is only for PBS and Replication Latency data\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param accountName Cosmos DB database account name.\n * @param targetRegion Target region to which data is written. Cosmos DB region, with spaces between\n * words and each word capitalized.\n * @param filter An OData filter expression that describes a subset of metrics to return. The\n * parameters that can be filtered are name.value (name of the metric, can have an or of multiple\n * names), startTime, endTime, and timeGrain. The supported operator is eq.\n * @param options The options parameters.\n */\n private _listMetrics(\n resourceGroupName: string,\n accountName: string,\n targetRegion: string,\n filter: string,\n options?: PercentileTargetListMetricsOptionalParams,\n ): Promise<PercentileTargetListMetricsResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, accountName, targetRegion, filter, options },\n listMetricsOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listMetricsOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/targetRegion/{targetRegion}/percentile/metrics\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PercentileMetricListResult,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.accountName,\n Parameters.targetRegion,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"percentileTarget.js","sourceRoot":"","sources":["../../../src/operations/percentileTarget.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,oDAAoD;AACpD,MAAa,oBAAoB;IACd,MAAM,CAA2B;IAElD;;;OAGG;IACH,YAAY,MAAgC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;OAWG;IACI,WAAW,CAChB,iBAAyB,EACzB,WAAmB,EACnB,YAAoB,EACpB,MAAc,EACd,OAAmD;QAEnD,MAAM,IAAI,GAAG,IAAI,CAAC,oBAAoB,CACpC,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,MAAM,EACN,OAAO,CACR,CAAC;QACF,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,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ACvL,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,YAAY;KACxB;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 { PercentileTarget } 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 PercentileMetric,\n PercentileTargetListMetricsOptionalParams,\n PercentileTargetListMetricsResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing PercentileTarget operations. */\nexport class PercentileTargetImpl implements PercentileTarget {\n private readonly client: CosmosDBManagementClient;\n\n /**\n * Initialize a new instance of the class PercentileTarget class.\n * @param client Reference to the service client\n */\n constructor(client: CosmosDBManagementClient) {\n this.client = client;\n }\n\n /**\n * Retrieves the metrics determined by the given filter for the given account target region. This url\n * is only for PBS and Replication Latency data\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param accountName Cosmos DB database account name.\n * @param targetRegion Target region to which data is written. Cosmos DB region, with spaces between\n * words and each word capitalized.\n * @param filter An OData filter expression that describes a subset of metrics to return. The\n * parameters that can be filtered are name.value (name of the metric, can have an or of multiple\n * names), startTime, endTime, and timeGrain. The supported operator is eq.\n * @param options The options parameters.\n */\n public listMetrics(\n resourceGroupName: string,\n accountName: string,\n targetRegion: string,\n filter: string,\n options?: PercentileTargetListMetricsOptionalParams,\n ): PagedAsyncIterableIterator<PercentileMetric> {\n const iter = this.listMetricsPagingAll(\n resourceGroupName,\n accountName,\n targetRegion,\n filter,\n options,\n );\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.listMetricsPagingPage(\n resourceGroupName,\n accountName,\n targetRegion,\n filter,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listMetricsPagingPage(\n resourceGroupName: string,\n accountName: string,\n targetRegion: string,\n filter: string,\n options?: PercentileTargetListMetricsOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<PercentileMetric[]> {\n let result: PercentileTargetListMetricsResponse;\n result = await this._listMetrics(\n resourceGroupName,\n accountName,\n targetRegion,\n filter,\n options,\n );\n yield result.value || [];\n }\n\n private async *listMetricsPagingAll(\n resourceGroupName: string,\n accountName: string,\n targetRegion: string,\n filter: string,\n options?: PercentileTargetListMetricsOptionalParams,\n ): AsyncIterableIterator<PercentileMetric> {\n for await (const page of this.listMetricsPagingPage(\n resourceGroupName,\n accountName,\n targetRegion,\n filter,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Retrieves the metrics determined by the given filter for the given account target region. This url\n * is only for PBS and Replication Latency data\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param accountName Cosmos DB database account name.\n * @param targetRegion Target region to which data is written. Cosmos DB region, with spaces between\n * words and each word capitalized.\n * @param filter An OData filter expression that describes a subset of metrics to return. The\n * parameters that can be filtered are name.value (name of the metric, can have an or of multiple\n * names), startTime, endTime, and timeGrain. The supported operator is eq.\n * @param options The options parameters.\n */\n private _listMetrics(\n resourceGroupName: string,\n accountName: string,\n targetRegion: string,\n filter: string,\n options?: PercentileTargetListMetricsOptionalParams,\n ): Promise<PercentileTargetListMetricsResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, accountName, targetRegion, filter, options },\n listMetricsOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listMetricsOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/targetRegion/{targetRegion}/percentile/metrics\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PercentileMetricListResult,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.accountName,\n Parameters.targetRegion,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
@@ -17,6 +17,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
17
17
  /// <reference lib="esnext.asynciterable" />
18
18
  /** Class containing PrivateEndpointConnections operations. */
19
19
  class PrivateEndpointConnectionsImpl {
20
+ client;
20
21
  /**
21
22
  * Initialize a new instance of the class PrivateEndpointConnections class.
22
23
  * @param client Reference to the service client
@@ -40,39 +41,22 @@ class PrivateEndpointConnectionsImpl {
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.listByDatabaseAccountPagingPage(resourceGroupName, accountName, options, settings);
47
48
  },
48
49
  };
49
50
  }
50
- listByDatabaseAccountPagingPage(resourceGroupName, accountName, options, _settings) {
51
- return tslib_1.__asyncGenerator(this, arguments, function* listByDatabaseAccountPagingPage_1() {
52
- let result;
53
- result = yield tslib_1.__await(this._listByDatabaseAccount(resourceGroupName, accountName, options));
54
- yield yield tslib_1.__await(result.value || []);
55
- });
51
+ async *listByDatabaseAccountPagingPage(resourceGroupName, accountName, options, _settings) {
52
+ let result;
53
+ result = await this._listByDatabaseAccount(resourceGroupName, accountName, options);
54
+ yield result.value || [];
56
55
  }
57
- listByDatabaseAccountPagingAll(resourceGroupName, accountName, options) {
58
- return tslib_1.__asyncGenerator(this, arguments, function* listByDatabaseAccountPagingAll_1() {
59
- var _a, e_1, _b, _c;
60
- try {
61
- for (var _d = true, _e = tslib_1.__asyncValues(this.listByDatabaseAccountPagingPage(resourceGroupName, accountName, 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 *listByDatabaseAccountPagingAll(resourceGroupName, accountName, options) {
57
+ for await (const page of this.listByDatabaseAccountPagingPage(resourceGroupName, accountName, options)) {
58
+ yield* page;
59
+ }
76
60
  }
77
61
  /**
78
62
  * List all private endpoint connections on a Cosmos DB account.
@@ -111,14 +95,19 @@ class PrivateEndpointConnectionsImpl {
111
95
  return this.client.sendOperationRequest(args, spec);
112
96
  };
113
97
  const sendOperationFn = async (args, spec) => {
114
- var _a;
115
98
  let currentRawResponse = undefined;
116
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
99
+ const providedCallback = args.options?.onResponse;
117
100
  const callback = (rawResponse, flatResponse) => {
118
101
  currentRawResponse = rawResponse;
119
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
102
+ providedCallback?.(rawResponse, flatResponse);
103
+ };
104
+ const updatedArgs = {
105
+ ...args,
106
+ options: {
107
+ ...args.options,
108
+ onResponse: callback,
109
+ },
120
110
  };
121
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
122
111
  const flatResponse = await directSendOperation(updatedArgs, spec);
123
112
  return {
124
113
  flatResponse,
@@ -141,8 +130,8 @@ class PrivateEndpointConnectionsImpl {
141
130
  spec: createOrUpdateOperationSpec,
142
131
  });
143
132
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
144
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
145
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
133
+ restoreFrom: options?.resumeFrom,
134
+ intervalInMs: options?.updateIntervalInMs,
146
135
  });
147
136
  await poller.poll();
148
137
  return poller;
@@ -171,14 +160,19 @@ class PrivateEndpointConnectionsImpl {
171
160
  return this.client.sendOperationRequest(args, spec);
172
161
  };
173
162
  const sendOperationFn = async (args, spec) => {
174
- var _a;
175
163
  let currentRawResponse = undefined;
176
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
164
+ const providedCallback = args.options?.onResponse;
177
165
  const callback = (rawResponse, flatResponse) => {
178
166
  currentRawResponse = rawResponse;
179
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
167
+ providedCallback?.(rawResponse, flatResponse);
168
+ };
169
+ const updatedArgs = {
170
+ ...args,
171
+ options: {
172
+ ...args.options,
173
+ onResponse: callback,
174
+ },
180
175
  };
181
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
182
176
  const flatResponse = await directSendOperation(updatedArgs, spec);
183
177
  return {
184
178
  flatResponse,
@@ -200,8 +194,8 @@ class PrivateEndpointConnectionsImpl {
200
194
  spec: deleteOperationSpec,
201
195
  });
202
196
  const poller = await (0, core_lro_1.createHttpPoller)(lro, {
203
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
204
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
197
+ restoreFrom: options?.resumeFrom,
198
+ intervalInMs: options?.updateIntervalInMs,
205
199
  });
206
200
  await poller.poll();
207
201
  return poller;