@azure/arm-computelimit 1.0.0-alpha.20251120.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 (284) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +115 -0
  3. package/dist/browser/api/computeLimitContext.d.ts +22 -0
  4. package/dist/browser/api/computeLimitContext.js +43 -0
  5. package/dist/browser/api/computeLimitContext.js.map +1 -0
  6. package/dist/browser/api/guestSubscriptions/index.d.ts +3 -0
  7. package/dist/browser/api/guestSubscriptions/index.js +4 -0
  8. package/dist/browser/api/guestSubscriptions/index.js.map +1 -0
  9. package/dist/browser/api/guestSubscriptions/operations.d.ts +27 -0
  10. package/dist/browser/api/guestSubscriptions/operations.js +134 -0
  11. package/dist/browser/api/guestSubscriptions/operations.js.map +1 -0
  12. package/dist/browser/api/guestSubscriptions/options.d.ts +14 -0
  13. package/dist/browser/api/guestSubscriptions/options.js +4 -0
  14. package/dist/browser/api/guestSubscriptions/options.js.map +1 -0
  15. package/dist/browser/api/index.d.ts +2 -0
  16. package/dist/browser/api/index.js +4 -0
  17. package/dist/browser/api/index.js.map +1 -0
  18. package/dist/browser/api/operations/index.d.ts +3 -0
  19. package/dist/browser/api/operations/index.js +4 -0
  20. package/dist/browser/api/operations/index.js.map +1 -0
  21. package/dist/browser/api/operations/operations.d.ts +10 -0
  22. package/dist/browser/api/operations/operations.js +34 -0
  23. package/dist/browser/api/operations/operations.js.map +1 -0
  24. package/dist/browser/api/operations/options.d.ts +5 -0
  25. package/dist/browser/api/operations/options.js +4 -0
  26. package/dist/browser/api/operations/options.js.map +1 -0
  27. package/dist/browser/api/sharedLimits/index.d.ts +3 -0
  28. package/dist/browser/api/sharedLimits/index.js +4 -0
  29. package/dist/browser/api/sharedLimits/index.js.map +1 -0
  30. package/dist/browser/api/sharedLimits/operations.d.ts +27 -0
  31. package/dist/browser/api/sharedLimits/operations.js +134 -0
  32. package/dist/browser/api/sharedLimits/operations.js.map +1 -0
  33. package/dist/browser/api/sharedLimits/options.d.ts +14 -0
  34. package/dist/browser/api/sharedLimits/options.js +4 -0
  35. package/dist/browser/api/sharedLimits/options.js.map +1 -0
  36. package/dist/browser/classic/guestSubscriptions/index.d.ts +22 -0
  37. package/dist/browser/classic/guestSubscriptions/index.js +17 -0
  38. package/dist/browser/classic/guestSubscriptions/index.js.map +1 -0
  39. package/dist/browser/classic/index.d.ts +4 -0
  40. package/dist/browser/classic/index.js +4 -0
  41. package/dist/browser/classic/index.js.map +1 -0
  42. package/dist/browser/classic/operations/index.d.ts +11 -0
  43. package/dist/browser/classic/operations/index.js +14 -0
  44. package/dist/browser/classic/operations/index.js.map +1 -0
  45. package/dist/browser/classic/sharedLimits/index.d.ts +22 -0
  46. package/dist/browser/classic/sharedLimits/index.js +17 -0
  47. package/dist/browser/classic/sharedLimits/index.js.map +1 -0
  48. package/dist/browser/computeLimitClient.d.ts +21 -0
  49. package/dist/browser/computeLimitClient.js +33 -0
  50. package/dist/browser/computeLimitClient.js.map +1 -0
  51. package/dist/browser/index.d.ts +12 -0
  52. package/dist/browser/index.js +7 -0
  53. package/dist/browser/index.js.map +1 -0
  54. package/dist/browser/logger.d.ts +2 -0
  55. package/dist/browser/logger.js +5 -0
  56. package/dist/browser/logger.js.map +1 -0
  57. package/dist/browser/models/index.d.ts +2 -0
  58. package/dist/browser/models/index.js +4 -0
  59. package/dist/browser/models/index.js.map +1 -0
  60. package/dist/browser/models/models.d.ts +244 -0
  61. package/dist/browser/models/models.js +244 -0
  62. package/dist/browser/models/models.js.map +1 -0
  63. package/dist/browser/package.json +3 -0
  64. package/dist/browser/static-helpers/cloudSettingHelpers.d.ts +22 -0
  65. package/dist/browser/static-helpers/cloudSettingHelpers.js +38 -0
  66. package/dist/browser/static-helpers/cloudSettingHelpers.js.map +1 -0
  67. package/dist/browser/static-helpers/pagingHelpers.d.ts +72 -0
  68. package/dist/browser/static-helpers/pagingHelpers.js +118 -0
  69. package/dist/browser/static-helpers/pagingHelpers.js.map +1 -0
  70. package/dist/browser/static-helpers/urlTemplate.d.ts +5 -0
  71. package/dist/browser/static-helpers/urlTemplate.js +185 -0
  72. package/dist/browser/static-helpers/urlTemplate.js.map +1 -0
  73. package/dist/commonjs/api/computeLimitContext.d.ts +22 -0
  74. package/dist/commonjs/api/computeLimitContext.js +46 -0
  75. package/dist/commonjs/api/computeLimitContext.js.map +1 -0
  76. package/dist/commonjs/api/guestSubscriptions/index.d.ts +3 -0
  77. package/dist/commonjs/api/guestSubscriptions/index.js +11 -0
  78. package/dist/commonjs/api/guestSubscriptions/index.js.map +1 -0
  79. package/dist/commonjs/api/guestSubscriptions/operations.d.ts +27 -0
  80. package/dist/commonjs/api/guestSubscriptions/operations.js +148 -0
  81. package/dist/commonjs/api/guestSubscriptions/operations.js.map +1 -0
  82. package/dist/commonjs/api/guestSubscriptions/options.d.ts +14 -0
  83. package/dist/commonjs/api/guestSubscriptions/options.js +5 -0
  84. package/dist/commonjs/api/guestSubscriptions/options.js.map +1 -0
  85. package/dist/commonjs/api/index.d.ts +2 -0
  86. package/dist/commonjs/api/index.js +8 -0
  87. package/dist/commonjs/api/index.js.map +1 -0
  88. package/dist/commonjs/api/operations/index.d.ts +3 -0
  89. package/dist/commonjs/api/operations/index.js +8 -0
  90. package/dist/commonjs/api/operations/index.js.map +1 -0
  91. package/dist/commonjs/api/operations/operations.d.ts +10 -0
  92. package/dist/commonjs/api/operations/operations.js +39 -0
  93. package/dist/commonjs/api/operations/operations.js.map +1 -0
  94. package/dist/commonjs/api/operations/options.d.ts +5 -0
  95. package/dist/commonjs/api/operations/options.js +5 -0
  96. package/dist/commonjs/api/operations/options.js.map +1 -0
  97. package/dist/commonjs/api/sharedLimits/index.d.ts +3 -0
  98. package/dist/commonjs/api/sharedLimits/index.js +11 -0
  99. package/dist/commonjs/api/sharedLimits/index.js.map +1 -0
  100. package/dist/commonjs/api/sharedLimits/operations.d.ts +27 -0
  101. package/dist/commonjs/api/sharedLimits/operations.js +148 -0
  102. package/dist/commonjs/api/sharedLimits/operations.js.map +1 -0
  103. package/dist/commonjs/api/sharedLimits/options.d.ts +14 -0
  104. package/dist/commonjs/api/sharedLimits/options.js +5 -0
  105. package/dist/commonjs/api/sharedLimits/options.js.map +1 -0
  106. package/dist/commonjs/classic/guestSubscriptions/index.d.ts +22 -0
  107. package/dist/commonjs/classic/guestSubscriptions/index.js +20 -0
  108. package/dist/commonjs/classic/guestSubscriptions/index.js.map +1 -0
  109. package/dist/commonjs/classic/index.d.ts +4 -0
  110. package/dist/commonjs/classic/index.js +5 -0
  111. package/dist/commonjs/classic/index.js.map +1 -0
  112. package/dist/commonjs/classic/operations/index.d.ts +11 -0
  113. package/dist/commonjs/classic/operations/index.js +17 -0
  114. package/dist/commonjs/classic/operations/index.js.map +1 -0
  115. package/dist/commonjs/classic/sharedLimits/index.d.ts +22 -0
  116. package/dist/commonjs/classic/sharedLimits/index.js +20 -0
  117. package/dist/commonjs/classic/sharedLimits/index.js.map +1 -0
  118. package/dist/commonjs/computeLimitClient.d.ts +21 -0
  119. package/dist/commonjs/computeLimitClient.js +37 -0
  120. package/dist/commonjs/computeLimitClient.js.map +1 -0
  121. package/dist/commonjs/index.d.ts +12 -0
  122. package/dist/commonjs/index.js +16 -0
  123. package/dist/commonjs/index.js.map +1 -0
  124. package/dist/commonjs/logger.d.ts +2 -0
  125. package/dist/commonjs/logger.js +8 -0
  126. package/dist/commonjs/logger.js.map +1 -0
  127. package/dist/commonjs/models/index.d.ts +2 -0
  128. package/dist/commonjs/models/index.js +12 -0
  129. package/dist/commonjs/models/index.js.map +1 -0
  130. package/dist/commonjs/models/models.d.ts +244 -0
  131. package/dist/commonjs/models/models.js +276 -0
  132. package/dist/commonjs/models/models.js.map +1 -0
  133. package/dist/commonjs/package.json +3 -0
  134. package/dist/commonjs/static-helpers/cloudSettingHelpers.d.ts +22 -0
  135. package/dist/commonjs/static-helpers/cloudSettingHelpers.js +42 -0
  136. package/dist/commonjs/static-helpers/cloudSettingHelpers.js.map +1 -0
  137. package/dist/commonjs/static-helpers/pagingHelpers.d.ts +72 -0
  138. package/dist/commonjs/static-helpers/pagingHelpers.js +121 -0
  139. package/dist/commonjs/static-helpers/pagingHelpers.js.map +1 -0
  140. package/dist/commonjs/static-helpers/urlTemplate.d.ts +5 -0
  141. package/dist/commonjs/static-helpers/urlTemplate.js +188 -0
  142. package/dist/commonjs/static-helpers/urlTemplate.js.map +1 -0
  143. package/dist/commonjs/tsdoc-metadata.json +11 -0
  144. package/dist/esm/api/computeLimitContext.d.ts +22 -0
  145. package/dist/esm/api/computeLimitContext.js +43 -0
  146. package/dist/esm/api/computeLimitContext.js.map +1 -0
  147. package/dist/esm/api/guestSubscriptions/index.d.ts +3 -0
  148. package/dist/esm/api/guestSubscriptions/index.js +4 -0
  149. package/dist/esm/api/guestSubscriptions/index.js.map +1 -0
  150. package/dist/esm/api/guestSubscriptions/operations.d.ts +27 -0
  151. package/dist/esm/api/guestSubscriptions/operations.js +134 -0
  152. package/dist/esm/api/guestSubscriptions/operations.js.map +1 -0
  153. package/dist/esm/api/guestSubscriptions/options.d.ts +14 -0
  154. package/dist/esm/api/guestSubscriptions/options.js +4 -0
  155. package/dist/esm/api/guestSubscriptions/options.js.map +1 -0
  156. package/dist/esm/api/index.d.ts +2 -0
  157. package/dist/esm/api/index.js +4 -0
  158. package/dist/esm/api/index.js.map +1 -0
  159. package/dist/esm/api/operations/index.d.ts +3 -0
  160. package/dist/esm/api/operations/index.js +4 -0
  161. package/dist/esm/api/operations/index.js.map +1 -0
  162. package/dist/esm/api/operations/operations.d.ts +10 -0
  163. package/dist/esm/api/operations/operations.js +34 -0
  164. package/dist/esm/api/operations/operations.js.map +1 -0
  165. package/dist/esm/api/operations/options.d.ts +5 -0
  166. package/dist/esm/api/operations/options.js +4 -0
  167. package/dist/esm/api/operations/options.js.map +1 -0
  168. package/dist/esm/api/sharedLimits/index.d.ts +3 -0
  169. package/dist/esm/api/sharedLimits/index.js +4 -0
  170. package/dist/esm/api/sharedLimits/index.js.map +1 -0
  171. package/dist/esm/api/sharedLimits/operations.d.ts +27 -0
  172. package/dist/esm/api/sharedLimits/operations.js +134 -0
  173. package/dist/esm/api/sharedLimits/operations.js.map +1 -0
  174. package/dist/esm/api/sharedLimits/options.d.ts +14 -0
  175. package/dist/esm/api/sharedLimits/options.js +4 -0
  176. package/dist/esm/api/sharedLimits/options.js.map +1 -0
  177. package/dist/esm/classic/guestSubscriptions/index.d.ts +22 -0
  178. package/dist/esm/classic/guestSubscriptions/index.js +17 -0
  179. package/dist/esm/classic/guestSubscriptions/index.js.map +1 -0
  180. package/dist/esm/classic/index.d.ts +4 -0
  181. package/dist/esm/classic/index.js +4 -0
  182. package/dist/esm/classic/index.js.map +1 -0
  183. package/dist/esm/classic/operations/index.d.ts +11 -0
  184. package/dist/esm/classic/operations/index.js +14 -0
  185. package/dist/esm/classic/operations/index.js.map +1 -0
  186. package/dist/esm/classic/sharedLimits/index.d.ts +22 -0
  187. package/dist/esm/classic/sharedLimits/index.js +17 -0
  188. package/dist/esm/classic/sharedLimits/index.js.map +1 -0
  189. package/dist/esm/computeLimitClient.d.ts +21 -0
  190. package/dist/esm/computeLimitClient.js +33 -0
  191. package/dist/esm/computeLimitClient.js.map +1 -0
  192. package/dist/esm/index.d.ts +12 -0
  193. package/dist/esm/index.js +7 -0
  194. package/dist/esm/index.js.map +1 -0
  195. package/dist/esm/logger.d.ts +2 -0
  196. package/dist/esm/logger.js +5 -0
  197. package/dist/esm/logger.js.map +1 -0
  198. package/dist/esm/models/index.d.ts +2 -0
  199. package/dist/esm/models/index.js +4 -0
  200. package/dist/esm/models/index.js.map +1 -0
  201. package/dist/esm/models/models.d.ts +244 -0
  202. package/dist/esm/models/models.js +244 -0
  203. package/dist/esm/models/models.js.map +1 -0
  204. package/dist/esm/package.json +3 -0
  205. package/dist/esm/static-helpers/cloudSettingHelpers.d.ts +22 -0
  206. package/dist/esm/static-helpers/cloudSettingHelpers.js +38 -0
  207. package/dist/esm/static-helpers/cloudSettingHelpers.js.map +1 -0
  208. package/dist/esm/static-helpers/pagingHelpers.d.ts +72 -0
  209. package/dist/esm/static-helpers/pagingHelpers.js +118 -0
  210. package/dist/esm/static-helpers/pagingHelpers.js.map +1 -0
  211. package/dist/esm/static-helpers/urlTemplate.d.ts +5 -0
  212. package/dist/esm/static-helpers/urlTemplate.js +185 -0
  213. package/dist/esm/static-helpers/urlTemplate.js.map +1 -0
  214. package/dist/react-native/api/computeLimitContext.d.ts +22 -0
  215. package/dist/react-native/api/computeLimitContext.js +43 -0
  216. package/dist/react-native/api/computeLimitContext.js.map +1 -0
  217. package/dist/react-native/api/guestSubscriptions/index.d.ts +3 -0
  218. package/dist/react-native/api/guestSubscriptions/index.js +4 -0
  219. package/dist/react-native/api/guestSubscriptions/index.js.map +1 -0
  220. package/dist/react-native/api/guestSubscriptions/operations.d.ts +27 -0
  221. package/dist/react-native/api/guestSubscriptions/operations.js +134 -0
  222. package/dist/react-native/api/guestSubscriptions/operations.js.map +1 -0
  223. package/dist/react-native/api/guestSubscriptions/options.d.ts +14 -0
  224. package/dist/react-native/api/guestSubscriptions/options.js +4 -0
  225. package/dist/react-native/api/guestSubscriptions/options.js.map +1 -0
  226. package/dist/react-native/api/index.d.ts +2 -0
  227. package/dist/react-native/api/index.js +4 -0
  228. package/dist/react-native/api/index.js.map +1 -0
  229. package/dist/react-native/api/operations/index.d.ts +3 -0
  230. package/dist/react-native/api/operations/index.js +4 -0
  231. package/dist/react-native/api/operations/index.js.map +1 -0
  232. package/dist/react-native/api/operations/operations.d.ts +10 -0
  233. package/dist/react-native/api/operations/operations.js +34 -0
  234. package/dist/react-native/api/operations/operations.js.map +1 -0
  235. package/dist/react-native/api/operations/options.d.ts +5 -0
  236. package/dist/react-native/api/operations/options.js +4 -0
  237. package/dist/react-native/api/operations/options.js.map +1 -0
  238. package/dist/react-native/api/sharedLimits/index.d.ts +3 -0
  239. package/dist/react-native/api/sharedLimits/index.js +4 -0
  240. package/dist/react-native/api/sharedLimits/index.js.map +1 -0
  241. package/dist/react-native/api/sharedLimits/operations.d.ts +27 -0
  242. package/dist/react-native/api/sharedLimits/operations.js +134 -0
  243. package/dist/react-native/api/sharedLimits/operations.js.map +1 -0
  244. package/dist/react-native/api/sharedLimits/options.d.ts +14 -0
  245. package/dist/react-native/api/sharedLimits/options.js +4 -0
  246. package/dist/react-native/api/sharedLimits/options.js.map +1 -0
  247. package/dist/react-native/classic/guestSubscriptions/index.d.ts +22 -0
  248. package/dist/react-native/classic/guestSubscriptions/index.js +17 -0
  249. package/dist/react-native/classic/guestSubscriptions/index.js.map +1 -0
  250. package/dist/react-native/classic/index.d.ts +4 -0
  251. package/dist/react-native/classic/index.js +4 -0
  252. package/dist/react-native/classic/index.js.map +1 -0
  253. package/dist/react-native/classic/operations/index.d.ts +11 -0
  254. package/dist/react-native/classic/operations/index.js +14 -0
  255. package/dist/react-native/classic/operations/index.js.map +1 -0
  256. package/dist/react-native/classic/sharedLimits/index.d.ts +22 -0
  257. package/dist/react-native/classic/sharedLimits/index.js +17 -0
  258. package/dist/react-native/classic/sharedLimits/index.js.map +1 -0
  259. package/dist/react-native/computeLimitClient.d.ts +21 -0
  260. package/dist/react-native/computeLimitClient.js +33 -0
  261. package/dist/react-native/computeLimitClient.js.map +1 -0
  262. package/dist/react-native/index.d.ts +12 -0
  263. package/dist/react-native/index.js +7 -0
  264. package/dist/react-native/index.js.map +1 -0
  265. package/dist/react-native/logger.d.ts +2 -0
  266. package/dist/react-native/logger.js +5 -0
  267. package/dist/react-native/logger.js.map +1 -0
  268. package/dist/react-native/models/index.d.ts +2 -0
  269. package/dist/react-native/models/index.js +4 -0
  270. package/dist/react-native/models/index.js.map +1 -0
  271. package/dist/react-native/models/models.d.ts +244 -0
  272. package/dist/react-native/models/models.js +244 -0
  273. package/dist/react-native/models/models.js.map +1 -0
  274. package/dist/react-native/package.json +3 -0
  275. package/dist/react-native/static-helpers/cloudSettingHelpers.d.ts +22 -0
  276. package/dist/react-native/static-helpers/cloudSettingHelpers.js +38 -0
  277. package/dist/react-native/static-helpers/cloudSettingHelpers.js.map +1 -0
  278. package/dist/react-native/static-helpers/pagingHelpers.d.ts +72 -0
  279. package/dist/react-native/static-helpers/pagingHelpers.js +118 -0
  280. package/dist/react-native/static-helpers/pagingHelpers.js.map +1 -0
  281. package/dist/react-native/static-helpers/urlTemplate.d.ts +5 -0
  282. package/dist/react-native/static-helpers/urlTemplate.js +185 -0
  283. package/dist/react-native/static-helpers/urlTemplate.js.map +1 -0
  284. package/package.json +233 -0
@@ -0,0 +1,276 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.KnownVersions = exports.KnownCreatedByType = exports.KnownResourceProvisioningState = exports.KnownActionType = exports.KnownOrigin = void 0;
6
+ exports._operationListResultDeserializer = _operationListResultDeserializer;
7
+ exports.operationArrayDeserializer = operationArrayDeserializer;
8
+ exports.operationDeserializer = operationDeserializer;
9
+ exports.operationDisplayDeserializer = operationDisplayDeserializer;
10
+ exports.errorResponseDeserializer = errorResponseDeserializer;
11
+ exports.errorDetailDeserializer = errorDetailDeserializer;
12
+ exports.errorDetailArrayDeserializer = errorDetailArrayDeserializer;
13
+ exports.errorAdditionalInfoArrayDeserializer = errorAdditionalInfoArrayDeserializer;
14
+ exports.errorAdditionalInfoDeserializer = errorAdditionalInfoDeserializer;
15
+ exports.guestSubscriptionSerializer = guestSubscriptionSerializer;
16
+ exports.guestSubscriptionDeserializer = guestSubscriptionDeserializer;
17
+ exports.guestSubscriptionPropertiesSerializer = guestSubscriptionPropertiesSerializer;
18
+ exports.guestSubscriptionPropertiesDeserializer = guestSubscriptionPropertiesDeserializer;
19
+ exports.proxyResourceSerializer = proxyResourceSerializer;
20
+ exports.proxyResourceDeserializer = proxyResourceDeserializer;
21
+ exports.resourceSerializer = resourceSerializer;
22
+ exports.resourceDeserializer = resourceDeserializer;
23
+ exports.systemDataDeserializer = systemDataDeserializer;
24
+ exports._guestSubscriptionListResultDeserializer = _guestSubscriptionListResultDeserializer;
25
+ exports.guestSubscriptionArraySerializer = guestSubscriptionArraySerializer;
26
+ exports.guestSubscriptionArrayDeserializer = guestSubscriptionArrayDeserializer;
27
+ exports.sharedLimitSerializer = sharedLimitSerializer;
28
+ exports.sharedLimitDeserializer = sharedLimitDeserializer;
29
+ exports.sharedLimitPropertiesSerializer = sharedLimitPropertiesSerializer;
30
+ exports.sharedLimitPropertiesDeserializer = sharedLimitPropertiesDeserializer;
31
+ exports.limitNameDeserializer = limitNameDeserializer;
32
+ exports._sharedLimitListResultDeserializer = _sharedLimitListResultDeserializer;
33
+ exports.sharedLimitArraySerializer = sharedLimitArraySerializer;
34
+ exports.sharedLimitArrayDeserializer = sharedLimitArrayDeserializer;
35
+ function _operationListResultDeserializer(item) {
36
+ return {
37
+ value: operationArrayDeserializer(item["value"]),
38
+ nextLink: item["nextLink"],
39
+ };
40
+ }
41
+ function operationArrayDeserializer(result) {
42
+ return result.map((item) => {
43
+ return operationDeserializer(item);
44
+ });
45
+ }
46
+ function operationDeserializer(item) {
47
+ return {
48
+ name: item["name"],
49
+ isDataAction: item["isDataAction"],
50
+ display: !item["display"] ? item["display"] : operationDisplayDeserializer(item["display"]),
51
+ origin: item["origin"],
52
+ actionType: item["actionType"],
53
+ };
54
+ }
55
+ function operationDisplayDeserializer(item) {
56
+ return {
57
+ provider: item["provider"],
58
+ resource: item["resource"],
59
+ operation: item["operation"],
60
+ description: item["description"],
61
+ };
62
+ }
63
+ /** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" */
64
+ var KnownOrigin;
65
+ (function (KnownOrigin) {
66
+ /** Indicates the operation is initiated by a user. */
67
+ KnownOrigin["User"] = "user";
68
+ /** Indicates the operation is initiated by a system. */
69
+ KnownOrigin["System"] = "system";
70
+ /** Indicates the operation is initiated by a user or system. */
71
+ KnownOrigin["UserSystem"] = "user,system";
72
+ })(KnownOrigin || (exports.KnownOrigin = KnownOrigin = {}));
73
+ /** Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */
74
+ var KnownActionType;
75
+ (function (KnownActionType) {
76
+ /** Actions are for internal-only APIs. */
77
+ KnownActionType["Internal"] = "Internal";
78
+ })(KnownActionType || (exports.KnownActionType = KnownActionType = {}));
79
+ function errorResponseDeserializer(item) {
80
+ return {
81
+ error: !item["error"] ? item["error"] : errorDetailDeserializer(item["error"]),
82
+ };
83
+ }
84
+ function errorDetailDeserializer(item) {
85
+ return {
86
+ code: item["code"],
87
+ message: item["message"],
88
+ target: item["target"],
89
+ details: !item["details"] ? item["details"] : errorDetailArrayDeserializer(item["details"]),
90
+ additionalInfo: !item["additionalInfo"]
91
+ ? item["additionalInfo"]
92
+ : errorAdditionalInfoArrayDeserializer(item["additionalInfo"]),
93
+ };
94
+ }
95
+ function errorDetailArrayDeserializer(result) {
96
+ return result.map((item) => {
97
+ return errorDetailDeserializer(item);
98
+ });
99
+ }
100
+ function errorAdditionalInfoArrayDeserializer(result) {
101
+ return result.map((item) => {
102
+ return errorAdditionalInfoDeserializer(item);
103
+ });
104
+ }
105
+ function errorAdditionalInfoDeserializer(item) {
106
+ return {
107
+ type: item["type"],
108
+ info: item["info"],
109
+ };
110
+ }
111
+ function guestSubscriptionSerializer(item) {
112
+ return {
113
+ properties: !item["properties"]
114
+ ? item["properties"]
115
+ : guestSubscriptionPropertiesSerializer(item["properties"]),
116
+ };
117
+ }
118
+ function guestSubscriptionDeserializer(item) {
119
+ return {
120
+ id: item["id"],
121
+ name: item["name"],
122
+ type: item["type"],
123
+ systemData: !item["systemData"]
124
+ ? item["systemData"]
125
+ : systemDataDeserializer(item["systemData"]),
126
+ properties: !item["properties"]
127
+ ? item["properties"]
128
+ : guestSubscriptionPropertiesDeserializer(item["properties"]),
129
+ };
130
+ }
131
+ function guestSubscriptionPropertiesSerializer(item) {
132
+ return item;
133
+ }
134
+ function guestSubscriptionPropertiesDeserializer(item) {
135
+ return {
136
+ provisioningState: item["provisioningState"],
137
+ };
138
+ }
139
+ /** The provisioning state of a resource type. */
140
+ var KnownResourceProvisioningState;
141
+ (function (KnownResourceProvisioningState) {
142
+ /** Resource has been created. */
143
+ KnownResourceProvisioningState["Succeeded"] = "Succeeded";
144
+ /** Resource creation failed. */
145
+ KnownResourceProvisioningState["Failed"] = "Failed";
146
+ /** Resource creation was canceled. */
147
+ KnownResourceProvisioningState["Canceled"] = "Canceled";
148
+ })(KnownResourceProvisioningState || (exports.KnownResourceProvisioningState = KnownResourceProvisioningState = {}));
149
+ function proxyResourceSerializer(item) {
150
+ return item;
151
+ }
152
+ function proxyResourceDeserializer(item) {
153
+ return {
154
+ id: item["id"],
155
+ name: item["name"],
156
+ type: item["type"],
157
+ systemData: !item["systemData"]
158
+ ? item["systemData"]
159
+ : systemDataDeserializer(item["systemData"]),
160
+ };
161
+ }
162
+ function resourceSerializer(item) {
163
+ return item;
164
+ }
165
+ function resourceDeserializer(item) {
166
+ return {
167
+ id: item["id"],
168
+ name: item["name"],
169
+ type: item["type"],
170
+ systemData: !item["systemData"]
171
+ ? item["systemData"]
172
+ : systemDataDeserializer(item["systemData"]),
173
+ };
174
+ }
175
+ function systemDataDeserializer(item) {
176
+ return {
177
+ createdBy: item["createdBy"],
178
+ createdByType: item["createdByType"],
179
+ createdAt: !item["createdAt"] ? item["createdAt"] : new Date(item["createdAt"]),
180
+ lastModifiedBy: item["lastModifiedBy"],
181
+ lastModifiedByType: item["lastModifiedByType"],
182
+ lastModifiedAt: !item["lastModifiedAt"]
183
+ ? item["lastModifiedAt"]
184
+ : new Date(item["lastModifiedAt"]),
185
+ };
186
+ }
187
+ /** The kind of entity that created the resource. */
188
+ var KnownCreatedByType;
189
+ (function (KnownCreatedByType) {
190
+ /** The entity was created by a user. */
191
+ KnownCreatedByType["User"] = "User";
192
+ /** The entity was created by an application. */
193
+ KnownCreatedByType["Application"] = "Application";
194
+ /** The entity was created by a managed identity. */
195
+ KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
196
+ /** The entity was created by a key. */
197
+ KnownCreatedByType["Key"] = "Key";
198
+ })(KnownCreatedByType || (exports.KnownCreatedByType = KnownCreatedByType = {}));
199
+ function _guestSubscriptionListResultDeserializer(item) {
200
+ return {
201
+ value: guestSubscriptionArrayDeserializer(item["value"]),
202
+ nextLink: item["nextLink"],
203
+ };
204
+ }
205
+ function guestSubscriptionArraySerializer(result) {
206
+ return result.map((item) => {
207
+ return guestSubscriptionSerializer(item);
208
+ });
209
+ }
210
+ function guestSubscriptionArrayDeserializer(result) {
211
+ return result.map((item) => {
212
+ return guestSubscriptionDeserializer(item);
213
+ });
214
+ }
215
+ function sharedLimitSerializer(item) {
216
+ return {
217
+ properties: !item["properties"]
218
+ ? item["properties"]
219
+ : sharedLimitPropertiesSerializer(item["properties"]),
220
+ };
221
+ }
222
+ function sharedLimitDeserializer(item) {
223
+ return {
224
+ id: item["id"],
225
+ name: item["name"],
226
+ type: item["type"],
227
+ systemData: !item["systemData"]
228
+ ? item["systemData"]
229
+ : systemDataDeserializer(item["systemData"]),
230
+ properties: !item["properties"]
231
+ ? item["properties"]
232
+ : sharedLimitPropertiesDeserializer(item["properties"]),
233
+ };
234
+ }
235
+ function sharedLimitPropertiesSerializer(item) {
236
+ return item;
237
+ }
238
+ function sharedLimitPropertiesDeserializer(item) {
239
+ return {
240
+ resourceName: !item["resourceName"]
241
+ ? item["resourceName"]
242
+ : limitNameDeserializer(item["resourceName"]),
243
+ limit: item["limit"],
244
+ unit: item["unit"],
245
+ provisioningState: item["provisioningState"],
246
+ };
247
+ }
248
+ function limitNameDeserializer(item) {
249
+ return {
250
+ value: item["value"],
251
+ localizedValue: item["localizedValue"],
252
+ };
253
+ }
254
+ function _sharedLimitListResultDeserializer(item) {
255
+ return {
256
+ value: sharedLimitArrayDeserializer(item["value"]),
257
+ nextLink: item["nextLink"],
258
+ };
259
+ }
260
+ function sharedLimitArraySerializer(result) {
261
+ return result.map((item) => {
262
+ return sharedLimitSerializer(item);
263
+ });
264
+ }
265
+ function sharedLimitArrayDeserializer(result) {
266
+ return result.map((item) => {
267
+ return sharedLimitDeserializer(item);
268
+ });
269
+ }
270
+ /** The available API versions. */
271
+ var KnownVersions;
272
+ (function (KnownVersions) {
273
+ /** The 2025-08-15 API version. */
274
+ KnownVersions["V20250815"] = "2025-08-15";
275
+ })(KnownVersions || (exports.KnownVersions = KnownVersions = {}));
276
+ //# sourceMappingURL=models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/models/models.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAelC,4EAKC;AAED,gEAIC;AAgBD,sDAQC;AAcD,oEAOC;AA4CD,8DAIC;AAgBD,0DAUC;AAED,oEAIC;AAED,oFAIC;AAUD,0EAKC;AAQD,kEAMC;AAED,sEAYC;AAQD,sFAEC;AAED,0FAIC;AA0BD,0DAEC;AAED,8DASC;AAcD,gDAEC;AAED,oDASC;AAkBD,wDAWC;AAkCD,4FAKC;AAED,4EAIC;AAED,gFAIC;AAQD,sDAMC;AAED,0DAYC;AAcD,0EAEC;AAED,8EASC;AAUD,sDAKC;AAUD,gFAKC;AAED,gEAIC;AAED,oEAIC;AA5bD,SAAgB,gCAAgC,CAAC,IAAS;IACxD,OAAO;QACL,KAAK,EAAE,0BAA0B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAChD,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC;KAC3B,CAAC;AACJ,CAAC;AAED,SAAgB,0BAA0B,CAAC,MAAwB;IACjE,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACzB,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC;AAgBD,SAAgB,qBAAqB,CAAC,IAAS;IAC7C,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;QAClB,YAAY,E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Licensed under the MIT License.\n\n/**\n * This file contains only generated model types and (de)serializers.\n * Disable this rule for deserializer functions which require 'any' for raw JSON input.\n */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */\nexport interface _OperationListResult {\n /** The Operation items on this page */\n value: Operation[];\n /** The link to the next page of items */\n nextLink?: string;\n}\n\nexport function _operationListResultDeserializer(item: any): _OperationListResult {\n return {\n value: operationArrayDeserializer(item[\"value\"]),\n nextLink: item[\"nextLink\"],\n };\n}\n\nexport function operationArrayDeserializer(result: Array<Operation>): any[] {\n return result.map((item) => {\n return operationDeserializer(item);\n });\n}\n\n/** Details of a REST API operation, returned from the Resource Provider Operations API */\nexport interface Operation {\n /** The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\" */\n readonly name?: string;\n /** Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations. */\n readonly isDataAction?: boolean;\n /** Localized display information for this particular operation. */\n display?: OperationDisplay;\n /** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\" */\n readonly origin?: Origin;\n /** Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. */\n readonly actionType?: ActionType;\n}\n\nexport function operationDeserializer(item: any): Operation {\n return {\n name: item[\"name\"],\n isDataAction: item[\"isDataAction\"],\n display: !item[\"display\"] ? item[\"display\"] : operationDisplayDeserializer(item[\"display\"]),\n origin: item[\"origin\"],\n actionType: item[\"actionType\"],\n };\n}\n\n/** Localized display information for and operation. */\nexport interface OperationDisplay {\n /** The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\". */\n readonly provider?: string;\n /** The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\". */\n readonly resource?: string;\n /** The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\". */\n readonly operation?: string;\n /** The short, localized friendly description of the operation; suitable for tool tips and detailed views. */\n readonly description?: string;\n}\n\nexport function operationDisplayDeserializer(item: any): OperationDisplay {\n return {\n provider: item[\"provider\"],\n resource: item[\"resource\"],\n operation: item[\"operation\"],\n description: item[\"description\"],\n };\n}\n\n/** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\" */\nexport enum KnownOrigin {\n /** Indicates the operation is initiated by a user. */\n User = \"user\",\n /** Indicates the operation is initiated by a system. */\n System = \"system\",\n /** Indicates the operation is initiated by a user or system. */\n UserSystem = \"user,system\",\n}\n\n/**\n * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\" \\\n * {@link KnownOrigin} can be used interchangeably with Origin,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **user**: Indicates the operation is initiated by a user. \\\n * **system**: Indicates the operation is initiated by a system. \\\n * **user,system**: Indicates the operation is initiated by a user or system.\n */\nexport type Origin = string;\n\n/** Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. */\nexport enum KnownActionType {\n /** Actions are for internal-only APIs. */\n Internal = \"Internal\",\n}\n\n/**\n * Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. \\\n * {@link KnownActionType} can be used interchangeably with ActionType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Internal**: Actions are for internal-only APIs.\n */\nexport type ActionType = string;\n\n/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. */\nexport interface ErrorResponse {\n /** The error object. */\n error?: ErrorDetail;\n}\n\nexport function errorResponseDeserializer(item: any): ErrorResponse {\n return {\n error: !item[\"error\"] ? item[\"error\"] : errorDetailDeserializer(item[\"error\"]),\n };\n}\n\n/** The error detail. */\nexport interface ErrorDetail {\n /** The error code. */\n readonly code?: string;\n /** The error message. */\n readonly message?: string;\n /** The error target. */\n readonly target?: string;\n /** The error details. */\n readonly details?: ErrorDetail[];\n /** The error additional info. */\n readonly additionalInfo?: ErrorAdditionalInfo[];\n}\n\nexport function errorDetailDeserializer(item: any): ErrorDetail {\n return {\n code: item[\"code\"],\n message: item[\"message\"],\n target: item[\"target\"],\n details: !item[\"details\"] ? item[\"details\"] : errorDetailArrayDeserializer(item[\"details\"]),\n additionalInfo: !item[\"additionalInfo\"]\n ? item[\"additionalInfo\"]\n : errorAdditionalInfoArrayDeserializer(item[\"additionalInfo\"]),\n };\n}\n\nexport function errorDetailArrayDeserializer(result: Array<ErrorDetail>): any[] {\n return result.map((item) => {\n return errorDetailDeserializer(item);\n });\n}\n\nexport function errorAdditionalInfoArrayDeserializer(result: Array<ErrorAdditionalInfo>): any[] {\n return result.map((item) => {\n return errorAdditionalInfoDeserializer(item);\n });\n}\n\n/** The resource management error additional info. */\nexport interface ErrorAdditionalInfo {\n /** The additional info type. */\n readonly type?: string;\n /** The additional info. */\n readonly info?: any;\n}\n\nexport function errorAdditionalInfoDeserializer(item: any): ErrorAdditionalInfo {\n return {\n type: item[\"type\"],\n info: item[\"info\"],\n };\n}\n\n/** Guest subscription that consumes shared compute limits. */\nexport interface GuestSubscription extends ProxyResource {\n /** The resource-specific properties for this resource. */\n properties?: GuestSubscriptionProperties;\n}\n\nexport function guestSubscriptionSerializer(item: GuestSubscription): any {\n return {\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : guestSubscriptionPropertiesSerializer(item[\"properties\"]),\n };\n}\n\nexport function guestSubscriptionDeserializer(item: any): GuestSubscription {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : guestSubscriptionPropertiesDeserializer(item[\"properties\"]),\n };\n}\n\n/** Properties for guest subscription. */\nexport interface GuestSubscriptionProperties {\n /** The provisioning state of the resource. */\n readonly provisioningState?: ResourceProvisioningState;\n}\n\nexport function guestSubscriptionPropertiesSerializer(item: GuestSubscriptionProperties): any {\n return item;\n}\n\nexport function guestSubscriptionPropertiesDeserializer(item: any): GuestSubscriptionProperties {\n return {\n provisioningState: item[\"provisioningState\"],\n };\n}\n\n/** The provisioning state of a resource type. */\nexport enum KnownResourceProvisioningState {\n /** Resource has been created. */\n Succeeded = \"Succeeded\",\n /** Resource creation failed. */\n Failed = \"Failed\",\n /** Resource creation was canceled. */\n Canceled = \"Canceled\",\n}\n\n/**\n * The provisioning state of a resource type. \\\n * {@link KnownResourceProvisioningState} can be used interchangeably with ResourceProvisioningState,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Succeeded**: Resource has been created. \\\n * **Failed**: Resource creation failed. \\\n * **Canceled**: Resource creation was canceled.\n */\nexport type ResourceProvisioningState = string;\n\n/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */\nexport interface ProxyResource extends Resource {}\n\nexport function proxyResourceSerializer(item: ProxyResource): any {\n return item;\n}\n\nexport function proxyResourceDeserializer(item: any): ProxyResource {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n };\n}\n\n/** Common fields that are returned in the response for all Azure Resource Manager resources */\nexport interface Resource {\n /** Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} */\n readonly id?: string;\n /** The name of the resource */\n readonly name?: string;\n /** The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\" */\n readonly type?: string;\n /** Azure Resource Manager metadata containing createdBy and modifiedBy information. */\n readonly systemData?: SystemData;\n}\n\nexport function resourceSerializer(item: Resource): any {\n return item;\n}\n\nexport function resourceDeserializer(item: any): Resource {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n };\n}\n\n/** Metadata pertaining to creation and last modification of the resource. */\nexport interface SystemData {\n /** The identity that created the resource. */\n createdBy?: string;\n /** The type of identity that created the resource. */\n createdByType?: CreatedByType;\n /** The timestamp of resource creation (UTC). */\n createdAt?: Date;\n /** The identity that last modified the resource. */\n lastModifiedBy?: string;\n /** The type of identity that last modified the resource. */\n lastModifiedByType?: CreatedByType;\n /** The timestamp of resource last modification (UTC) */\n lastModifiedAt?: Date;\n}\n\nexport function systemDataDeserializer(item: any): SystemData {\n return {\n createdBy: item[\"createdBy\"],\n createdByType: item[\"createdByType\"],\n createdAt: !item[\"createdAt\"] ? item[\"createdAt\"] : new Date(item[\"createdAt\"]),\n lastModifiedBy: item[\"lastModifiedBy\"],\n lastModifiedByType: item[\"lastModifiedByType\"],\n lastModifiedAt: !item[\"lastModifiedAt\"]\n ? item[\"lastModifiedAt\"]\n : new Date(item[\"lastModifiedAt\"]),\n };\n}\n\n/** The kind of entity that created the resource. */\nexport enum KnownCreatedByType {\n /** The entity was created by a user. */\n User = \"User\",\n /** The entity was created by an application. */\n Application = \"Application\",\n /** The entity was created by a managed identity. */\n ManagedIdentity = \"ManagedIdentity\",\n /** The entity was created by a key. */\n Key = \"Key\",\n}\n\n/**\n * The kind of entity that created the resource. \\\n * {@link KnownCreatedByType} can be used interchangeably with CreatedByType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **User**: The entity was created by a user. \\\n * **Application**: The entity was created by an application. \\\n * **ManagedIdentity**: The entity was created by a managed identity. \\\n * **Key**: The entity was created by a key.\n */\nexport type CreatedByType = string;\n\n/** The response of a GuestSubscription list operation. */\nexport interface _GuestSubscriptionListResult {\n /** The GuestSubscription items on this page */\n value: GuestSubscription[];\n /** The link to the next page of items */\n nextLink?: string;\n}\n\nexport function _guestSubscriptionListResultDeserializer(item: any): _GuestSubscriptionListResult {\n return {\n value: guestSubscriptionArrayDeserializer(item[\"value\"]),\n nextLink: item[\"nextLink\"],\n };\n}\n\nexport function guestSubscriptionArraySerializer(result: Array<GuestSubscription>): any[] {\n return result.map((item) => {\n return guestSubscriptionSerializer(item);\n });\n}\n\nexport function guestSubscriptionArrayDeserializer(result: Array<GuestSubscription>): any[] {\n return result.map((item) => {\n return guestSubscriptionDeserializer(item);\n });\n}\n\n/** Compute limits shared by the subscription. */\nexport interface SharedLimit extends ProxyResource {\n /** The resource-specific properties for this resource. */\n properties?: SharedLimitProperties;\n}\n\nexport function sharedLimitSerializer(item: SharedLimit): any {\n return {\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : sharedLimitPropertiesSerializer(item[\"properties\"]),\n };\n}\n\nexport function sharedLimitDeserializer(item: any): SharedLimit {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : sharedLimitPropertiesDeserializer(item[\"properties\"]),\n };\n}\n\n/** Properties of the compute shared limit. */\nexport interface SharedLimitProperties {\n /** The limit name properties. */\n readonly resourceName?: LimitName;\n /** The maximum permitted usage of the resource. */\n readonly limit?: number;\n /** The quota units, such as Count. */\n readonly unit?: string;\n /** The provisioning state of the resource. */\n readonly provisioningState?: ResourceProvisioningState;\n}\n\nexport function sharedLimitPropertiesSerializer(item: SharedLimitProperties): any {\n return item;\n}\n\nexport function sharedLimitPropertiesDeserializer(item: any): SharedLimitProperties {\n return {\n resourceName: !item[\"resourceName\"]\n ? item[\"resourceName\"]\n : limitNameDeserializer(item[\"resourceName\"]),\n limit: item[\"limit\"],\n unit: item[\"unit\"],\n provisioningState: item[\"provisioningState\"],\n };\n}\n\n/** Properties of the limit name. */\nexport interface LimitName {\n /** The limit name. */\n value: string;\n /** The localized limit name. */\n readonly localizedValue?: string;\n}\n\nexport function limitNameDeserializer(item: any): LimitName {\n return {\n value: item[\"value\"],\n localizedValue: item[\"localizedValue\"],\n };\n}\n\n/** The response of a SharedLimit list operation. */\nexport interface _SharedLimitListResult {\n /** The SharedLimit items on this page */\n value: SharedLimit[];\n /** The link to the next page of items */\n nextLink?: string;\n}\n\nexport function _sharedLimitListResultDeserializer(item: any): _SharedLimitListResult {\n return {\n value: sharedLimitArrayDeserializer(item[\"value\"]),\n nextLink: item[\"nextLink\"],\n };\n}\n\nexport function sharedLimitArraySerializer(result: Array<SharedLimit>): any[] {\n return result.map((item) => {\n return sharedLimitSerializer(item);\n });\n}\n\nexport function sharedLimitArrayDeserializer(result: Array<SharedLimit>): any[] {\n return result.map((item) => {\n return sharedLimitDeserializer(item);\n });\n}\n\n/** The available API versions. */\nexport enum KnownVersions {\n /** The 2025-08-15 API version. */\n V20250815 = \"2025-08-15\",\n}\n"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * An enum to describe Azure Cloud environments.
3
+ * @enum {string}
4
+ */
5
+ export declare enum AzureClouds {
6
+ /** Azure public cloud, which is the default cloud for Azure SDKs. */
7
+ AZURE_PUBLIC_CLOUD = "AZURE_PUBLIC_CLOUD",
8
+ /** Azure China cloud */
9
+ AZURE_CHINA_CLOUD = "AZURE_CHINA_CLOUD",
10
+ /** Azure US government cloud */
11
+ AZURE_US_GOVERNMENT = "AZURE_US_GOVERNMENT"
12
+ }
13
+ /** The supported values for cloud setting as a string literal type */
14
+ export type AzureSupportedClouds = `${AzureClouds}`;
15
+ /**
16
+ * Gets the Azure Resource Manager endpoint URL for the specified cloud setting.
17
+ * @param cloudSetting - The Azure cloud environment setting. Use one of the AzureClouds enum values.
18
+ * @returns The ARM endpoint URL for the specified cloud, or undefined if cloudSetting is undefined.
19
+ * @throws {Error} Throws an error if an unknown cloud setting is provided.
20
+ */
21
+ export declare function getArmEndpoint(cloudSetting?: AzureSupportedClouds): string | undefined;
22
+ //# sourceMappingURL=cloudSettingHelpers.d.ts.map
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.AzureClouds = void 0;
6
+ exports.getArmEndpoint = getArmEndpoint;
7
+ /**
8
+ * An enum to describe Azure Cloud environments.
9
+ * @enum {string}
10
+ */
11
+ var AzureClouds;
12
+ (function (AzureClouds) {
13
+ /** Azure public cloud, which is the default cloud for Azure SDKs. */
14
+ AzureClouds["AZURE_PUBLIC_CLOUD"] = "AZURE_PUBLIC_CLOUD";
15
+ /** Azure China cloud */
16
+ AzureClouds["AZURE_CHINA_CLOUD"] = "AZURE_CHINA_CLOUD";
17
+ /** Azure US government cloud */
18
+ AzureClouds["AZURE_US_GOVERNMENT"] = "AZURE_US_GOVERNMENT";
19
+ })(AzureClouds || (exports.AzureClouds = AzureClouds = {}));
20
+ /**
21
+ * Gets the Azure Resource Manager endpoint URL for the specified cloud setting.
22
+ * @param cloudSetting - The Azure cloud environment setting. Use one of the AzureClouds enum values.
23
+ * @returns The ARM endpoint URL for the specified cloud, or undefined if cloudSetting is undefined.
24
+ * @throws {Error} Throws an error if an unknown cloud setting is provided.
25
+ */
26
+ function getArmEndpoint(cloudSetting) {
27
+ if (cloudSetting === undefined) {
28
+ return undefined;
29
+ }
30
+ const cloudEndpoints = {
31
+ AZURE_CHINA_CLOUD: "https://management.chinacloudapi.cn/",
32
+ AZURE_US_GOVERNMENT: "https://management.usgovcloudapi.net/",
33
+ AZURE_PUBLIC_CLOUD: "https://management.azure.com/",
34
+ };
35
+ if (cloudSetting in cloudEndpoints) {
36
+ return cloudEndpoints[cloudSetting];
37
+ }
38
+ else {
39
+ throw new Error(`Unknown cloud setting: ${cloudSetting}. Please refer to the enum AzureClouds for possible values.`);
40
+ }
41
+ }
42
+ //# sourceMappingURL=cloudSettingHelpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloudSettingHelpers.js","sourceRoot":"","sources":["../../../src/static-helpers/cloudSettingHelpers.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAwBlC,wCAgBC;AAtCD;;;GAGG;AACH,IAAY,WAOX;AAPD,WAAY,WAAW;IACrB,qEAAqE;IACrE,wDAAyC,CAAA;IACzC,wBAAwB;IACxB,sDAAuC,CAAA;IACvC,gCAAgC;IAChC,0DAA2C,CAAA;AAC7C,CAAC,EAPW,WAAW,2BAAX,WAAW,QAOtB;AAKD;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,YAAmC;IAChE,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;QAC/B,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,cAAc,GAA6C;QAC/D,iBAAiB,EAAE,sCAAsC;QACzD,mBAAmB,EAAE,uCAAuC;QAC5D,kBAAkB,EAAE,+BAA+B;KACpD,CAAC;IACF,IAAI,YAAY,IAAI,cAAc,EAAE,CAAC;QACnC,OAAO,cAAc,CAAC,YAAY,CAAC,CAAC;IACtC,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CACb,0BAA0B,YAAY,6DAA6D,CACpG,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * An enum to describe Azure Cloud environments.\n * @enum {string}\n */\nexport enum AzureClouds {\n /** Azure public cloud, which is the default cloud for Azure SDKs. */\n AZURE_PUBLIC_CLOUD = \"AZURE_PUBLIC_CLOUD\",\n /** Azure China cloud */\n AZURE_CHINA_CLOUD = \"AZURE_CHINA_CLOUD\",\n /** Azure US government cloud */\n AZURE_US_GOVERNMENT = \"AZURE_US_GOVERNMENT\",\n}\n\n/** The supported values for cloud setting as a string literal type */\nexport type AzureSupportedClouds = `${AzureClouds}`;\n\n/**\n * Gets the Azure Resource Manager endpoint URL for the specified cloud setting.\n * @param cloudSetting - The Azure cloud environment setting. Use one of the AzureClouds enum values.\n * @returns The ARM endpoint URL for the specified cloud, or undefined if cloudSetting is undefined.\n * @throws {Error} Throws an error if an unknown cloud setting is provided.\n */\nexport function getArmEndpoint(cloudSetting?: AzureSupportedClouds): string | undefined {\n if (cloudSetting === undefined) {\n return undefined;\n }\n const cloudEndpoints: Record<keyof typeof AzureClouds, string> = {\n AZURE_CHINA_CLOUD: \"https://management.chinacloudapi.cn/\",\n AZURE_US_GOVERNMENT: \"https://management.usgovcloudapi.net/\",\n AZURE_PUBLIC_CLOUD: \"https://management.azure.com/\",\n };\n if (cloudSetting in cloudEndpoints) {\n return cloudEndpoints[cloudSetting];\n } else {\n throw new Error(\n `Unknown cloud setting: ${cloudSetting}. Please refer to the enum AzureClouds for possible values.`,\n );\n }\n}\n"]}
@@ -0,0 +1,72 @@
1
+ import type { Client, PathUncheckedResponse } from "@azure-rest/core-client";
2
+ /**
3
+ * Options for the byPage method
4
+ */
5
+ export interface PageSettings {
6
+ /**
7
+ * A reference to a specific page to start iterating from.
8
+ */
9
+ continuationToken?: string;
10
+ }
11
+ /**
12
+ * An interface that describes a page of results.
13
+ */
14
+ export type ContinuablePage<TElement, TPage = TElement[]> = TPage & {
15
+ /**
16
+ * The token that keeps track of where to continue the iterator
17
+ */
18
+ continuationToken?: string;
19
+ };
20
+ /**
21
+ * An interface that allows async iterable iteration both to completion and by page.
22
+ */
23
+ export interface PagedAsyncIterableIterator<TElement, TPage = TElement[], TPageSettings extends PageSettings = PageSettings> {
24
+ /**
25
+ * The next method, part of the iteration protocol
26
+ */
27
+ next(): Promise<IteratorResult<TElement>>;
28
+ /**
29
+ * The connection to the async iterator, part of the iteration protocol
30
+ */
31
+ [Symbol.asyncIterator](): PagedAsyncIterableIterator<TElement, TPage, TPageSettings>;
32
+ /**
33
+ * Return an AsyncIterableIterator that works a page at a time
34
+ */
35
+ byPage: (settings?: TPageSettings) => AsyncIterableIterator<ContinuablePage<TElement, TPage>>;
36
+ }
37
+ /**
38
+ * An interface that describes how to communicate with the service.
39
+ */
40
+ export interface PagedResult<TElement, TPage = TElement[], TPageSettings extends PageSettings = PageSettings> {
41
+ /**
42
+ * Link to the first page of results.
43
+ */
44
+ firstPageLink?: string;
45
+ /**
46
+ * A method that returns a page of results.
47
+ */
48
+ getPage: (pageLink?: string) => Promise<{
49
+ page: TPage;
50
+ nextPageLink?: string;
51
+ } | undefined>;
52
+ /**
53
+ * a function to implement the `byPage` method on the paged async iterator.
54
+ */
55
+ byPage?: (settings?: TPageSettings) => AsyncIterableIterator<ContinuablePage<TElement, TPage>>;
56
+ /**
57
+ * A function to extract elements from a page.
58
+ */
59
+ toElements?: (page: TPage) => TElement[];
60
+ }
61
+ /**
62
+ * Options for the paging helper
63
+ */
64
+ export interface BuildPagedAsyncIteratorOptions {
65
+ itemName?: string;
66
+ nextLinkName?: string;
67
+ }
68
+ /**
69
+ * Helper to paginate results in a generic way and return a PagedAsyncIterableIterator
70
+ */
71
+ export declare function buildPagedAsyncIterator<TElement, TPage = TElement[], TPageSettings extends PageSettings = PageSettings, TResponse extends PathUncheckedResponse = PathUncheckedResponse>(client: Client, getInitialResponse: () => PromiseLike<TResponse>, processResponseBody: (result: TResponse) => PromiseLike<unknown>, expectedStatuses: string[], options?: BuildPagedAsyncIteratorOptions): PagedAsyncIterableIterator<TElement, TPage, TPageSettings>;
72
+ //# sourceMappingURL=pagingHelpers.d.ts.map
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.buildPagedAsyncIterator = buildPagedAsyncIterator;
6
+ const core_client_1 = require("@azure-rest/core-client");
7
+ const core_rest_pipeline_1 = require("@azure/core-rest-pipeline");
8
+ /**
9
+ * Helper to paginate results in a generic way and return a PagedAsyncIterableIterator
10
+ */
11
+ function buildPagedAsyncIterator(client, getInitialResponse, processResponseBody, expectedStatuses, options = {}) {
12
+ const itemName = options.itemName ?? "value";
13
+ const nextLinkName = options.nextLinkName ?? "nextLink";
14
+ const pagedResult = {
15
+ getPage: async (pageLink) => {
16
+ const result = pageLink === undefined
17
+ ? await getInitialResponse()
18
+ : await client.pathUnchecked(pageLink).get();
19
+ checkPagingRequest(result, expectedStatuses);
20
+ const results = await processResponseBody(result);
21
+ const nextLink = getNextLink(results, nextLinkName);
22
+ const values = getElements(results, itemName);
23
+ return {
24
+ page: values,
25
+ nextPageLink: nextLink,
26
+ };
27
+ },
28
+ byPage: (settings) => {
29
+ const { continuationToken } = settings ?? {};
30
+ return getPageAsyncIterator(pagedResult, {
31
+ pageLink: continuationToken,
32
+ });
33
+ },
34
+ };
35
+ return getPagedAsyncIterator(pagedResult);
36
+ }
37
+ /**
38
+ * returns an async iterator that iterates over results. It also has a `byPage`
39
+ * method that returns pages of items at once.
40
+ *
41
+ * @param pagedResult - an object that specifies how to get pages.
42
+ * @returns a paged async iterator that iterates over results.
43
+ */
44
+ function getPagedAsyncIterator(pagedResult) {
45
+ const iter = getItemAsyncIterator(pagedResult);
46
+ return {
47
+ next() {
48
+ return iter.next();
49
+ },
50
+ [Symbol.asyncIterator]() {
51
+ return this;
52
+ },
53
+ byPage: pagedResult?.byPage ??
54
+ ((settings) => {
55
+ const { continuationToken } = settings ?? {};
56
+ return getPageAsyncIterator(pagedResult, {
57
+ pageLink: continuationToken,
58
+ });
59
+ }),
60
+ };
61
+ }
62
+ async function* getItemAsyncIterator(pagedResult) {
63
+ const pages = getPageAsyncIterator(pagedResult);
64
+ for await (const page of pages) {
65
+ yield* page;
66
+ }
67
+ }
68
+ async function* getPageAsyncIterator(pagedResult, options = {}) {
69
+ const { pageLink } = options;
70
+ let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink);
71
+ if (!response) {
72
+ return;
73
+ }
74
+ let result = response.page;
75
+ result.continuationToken = response.nextPageLink;
76
+ yield result;
77
+ while (response.nextPageLink) {
78
+ response = await pagedResult.getPage(response.nextPageLink);
79
+ if (!response) {
80
+ return;
81
+ }
82
+ result = response.page;
83
+ result.continuationToken = response.nextPageLink;
84
+ yield result;
85
+ }
86
+ }
87
+ /**
88
+ * Gets for the value of nextLink in the body
89
+ */
90
+ function getNextLink(body, nextLinkName) {
91
+ if (!nextLinkName) {
92
+ return undefined;
93
+ }
94
+ const nextLink = body[nextLinkName];
95
+ if (typeof nextLink !== "string" && typeof nextLink !== "undefined" && nextLink !== null) {
96
+ throw new core_rest_pipeline_1.RestError(`Body Property ${nextLinkName} should be a string or undefined or null but got ${typeof nextLink}`);
97
+ }
98
+ if (nextLink === null) {
99
+ return undefined;
100
+ }
101
+ return nextLink;
102
+ }
103
+ /**
104
+ * Gets the elements of the current request in the body.
105
+ */
106
+ function getElements(body, itemName) {
107
+ const value = body[itemName];
108
+ if (!Array.isArray(value)) {
109
+ throw new core_rest_pipeline_1.RestError(`Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`);
110
+ }
111
+ return value ?? [];
112
+ }
113
+ /**
114
+ * Checks if a request failed
115
+ */
116
+ function checkPagingRequest(response, expectedStatuses) {
117
+ if (!expectedStatuses.includes(response.status)) {
118
+ throw (0, core_client_1.createRestError)(`Pagination failed with unexpected statusCode ${response.status}`, response);
119
+ }
120
+ }
121
+ //# sourceMappingURL=pagingHelpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagingHelpers.js","sourceRoot":"","sources":["../../../src/static-helpers/pagingHelpers.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAsFlC,0DAqCC;AAxHD,yDAA0D;AAC1D,kEAAsD;AA+EtD;;GAEG;AACH,SAAgB,uBAAuB,CAMrC,MAAc,EACd,kBAAgD,EAChD,mBAAgE,EAChE,gBAA0B,EAC1B,UAA0C,EAAE;IAE5C,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC;IAC7C,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,IAAI,UAAU,CAAC;IACxD,MAAM,WAAW,GAAgD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,QAAQ,GAAI,IAAgC,CAAC,YAAY,CAAC,CAAC;IAEjE,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,OAAO,QAAQ,KAAK,WAAW,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;QACzF,MAAM,IAAI,8BAAS,CACjB,iBAAiB,YAAY,oDAAoD,OAAO,QAAQ,EAAE,CACnG,CAAC;IACJ,CAAC;IAED,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;QACtB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAc,IAAa,EAAE,QAAgB;IAC/D,MAAM,KAAK,GAAI,IAAgC,CAAC,QAAQ,CAAQ,CAAC;IACjE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,8BAAS,CACjB,kFAAkF,QAAQ,EAAE,CAC7F,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,IAAI,EAAE,CAAC;AACrB,CAAC;AAED;;GAEG;AACH,SAAS,kBAAkB,CAAC,QAA+B,EAAE,gBAA0B;IACrF,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAChD,MAAM,IAAA,6BAAe,EACnB,gDAAgD,QAAQ,CAAC,MAAM,EAAE,EACjE,QAAQ,CACT,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Client, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError } from \"@azure-rest/core-client\";\nimport { RestError } from \"@azure/core-rest-pipeline\";\n\n/**\n * Options for the byPage method\n */\nexport interface PageSettings {\n /**\n * A reference to a specific page to start iterating from.\n */\n continuationToken?: string;\n}\n\n/**\n * An interface that describes a page of results.\n */\nexport type ContinuablePage<TElement, TPage = TElement[]> = TPage & {\n /**\n * The token that keeps track of where to continue the iterator\n */\n continuationToken?: string;\n};\n\n/**\n * An interface that allows async iterable iteration both to completion and by page.\n */\nexport interface PagedAsyncIterableIterator<\n TElement,\n TPage = TElement[],\n TPageSettings extends PageSettings = PageSettings,\n> {\n /**\n * The next method, part of the iteration protocol\n */\n next(): Promise<IteratorResult<TElement>>;\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator](): PagedAsyncIterableIterator<TElement, TPage, TPageSettings>;\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings?: TPageSettings) => AsyncIterableIterator<ContinuablePage<TElement, TPage>>;\n}\n\n/**\n * An interface that describes how to communicate with the service.\n */\nexport interface PagedResult<\n TElement,\n TPage = TElement[],\n TPageSettings extends PageSettings = PageSettings,\n> {\n /**\n * Link to the first page of results.\n */\n firstPageLink?: string;\n /**\n * A method that returns a page of results.\n */\n getPage: (pageLink?: string) => Promise<{ page: TPage; nextPageLink?: string } | undefined>;\n /**\n * a function to implement the `byPage` method on the paged async iterator.\n */\n byPage?: (settings?: TPageSettings) => AsyncIterableIterator<ContinuablePage<TElement, TPage>>;\n\n /**\n * A function to extract elements from a page.\n */\n toElements?: (page: TPage) => TElement[];\n}\n\n/**\n * Options for the paging helper\n */\nexport interface BuildPagedAsyncIteratorOptions {\n itemName?: string;\n nextLinkName?: string;\n}\n\n/**\n * Helper to paginate results in a generic way and return a PagedAsyncIterableIterator\n */\nexport function buildPagedAsyncIterator<\n TElement,\n TPage = TElement[],\n TPageSettings extends PageSettings = PageSettings,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n>(\n client: Client,\n getInitialResponse: () => PromiseLike<TResponse>,\n processResponseBody: (result: TResponse) => PromiseLike<unknown>,\n expectedStatuses: string[],\n options: BuildPagedAsyncIteratorOptions = {},\n): PagedAsyncIterableIterator<TElement, TPage, TPageSettings> {\n const itemName = options.itemName ?? \"value\";\n const nextLinkName = options.nextLinkName ?? \"nextLink\";\n const pagedResult: PagedResult<TElement, TPage, TPageSettings> = {\n getPage: async (pageLink?: string) => {\n const result =\n pageLink === undefined\n ? await getInitialResponse()\n : await client.pathUnchecked(pageLink).get();\n checkPagingRequest(result, expectedStatuses);\n const results = await processResponseBody(result as TResponse);\n const nextLink = getNextLink(results, nextLinkName);\n const values = getElements<TElement>(results, itemName) as TPage;\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n byPage: (settings?: TPageSettings) => {\n const { continuationToken } = settings ?? {};\n return getPageAsyncIterator(pagedResult, {\n pageLink: continuationToken,\n });\n },\n };\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * returns an async iterator that iterates over results. It also has a `byPage`\n * method that returns pages of items at once.\n *\n * @param pagedResult - an object that specifies how to get pages.\n * @returns a paged async iterator that iterates over results.\n */\n\nfunction getPagedAsyncIterator<\n TElement,\n TPage = TElement[],\n TPageSettings extends PageSettings = PageSettings,\n>(\n pagedResult: PagedResult<TElement, TPage, TPageSettings>,\n): PagedAsyncIterableIterator<TElement, TPage, TPageSettings> {\n const iter = getItemAsyncIterator<TElement, TPage, TPageSettings>(pagedResult);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage:\n pagedResult?.byPage ??\n ((settings?: TPageSettings) => {\n const { continuationToken } = settings ?? {};\n return getPageAsyncIterator(pagedResult, {\n pageLink: continuationToken,\n });\n }),\n };\n}\n\nasync function* getItemAsyncIterator<TElement, TPage, TPageSettings extends PageSettings>(\n pagedResult: PagedResult<TElement, TPage, TPageSettings>,\n): AsyncIterableIterator<TElement> {\n const pages = getPageAsyncIterator(pagedResult);\n for await (const page of pages) {\n yield* page as unknown as TElement[];\n }\n}\n\nasync function* getPageAsyncIterator<TElement, TPage, TPageSettings extends PageSettings>(\n pagedResult: PagedResult<TElement, TPage, TPageSettings>,\n options: {\n pageLink?: string;\n } = {},\n): AsyncIterableIterator<ContinuablePage<TElement, TPage>> {\n const { pageLink } = options;\n let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink);\n if (!response) {\n return;\n }\n let result = response.page as ContinuablePage<TElement, TPage>;\n result.continuationToken = response.nextPageLink;\n yield result;\n while (response.nextPageLink) {\n response = await pagedResult.getPage(response.nextPageLink);\n if (!response) {\n return;\n }\n result = response.page as ContinuablePage<TElement, TPage>;\n result.continuationToken = response.nextPageLink;\n yield result;\n }\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\" && nextLink !== null) {\n throw new RestError(\n `Body Property ${nextLinkName} should be a string or undefined or null but got ${typeof nextLink}`,\n );\n }\n\n if (nextLink === null) {\n return undefined;\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n if (!Array.isArray(value)) {\n throw new RestError(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`,\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse, expectedStatuses: string[]): void {\n if (!expectedStatuses.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response,\n );\n }\n}\n"]}
@@ -0,0 +1,5 @@
1
+ export interface UrlTemplateOptions {
2
+ allowReserved?: boolean;
3
+ }
4
+ export declare function expandUrlTemplate(template: string, context: Record<string, any>, option?: UrlTemplateOptions): string;
5
+ //# sourceMappingURL=urlTemplate.d.ts.map