@azure/arm-managedops 1.0.0-alpha.20260205.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 (260) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +115 -0
  3. package/dist/browser/api/index.d.ts +2 -0
  4. package/dist/browser/api/index.js +4 -0
  5. package/dist/browser/api/index.js.map +1 -0
  6. package/dist/browser/api/managedOps/index.d.ts +3 -0
  7. package/dist/browser/api/managedOps/index.js +4 -0
  8. package/dist/browser/api/managedOps/index.js.map +1 -0
  9. package/dist/browser/api/managedOps/operations.d.ts +32 -0
  10. package/dist/browser/api/managedOps/operations.js +159 -0
  11. package/dist/browser/api/managedOps/operations.js.map +1 -0
  12. package/dist/browser/api/managedOps/options.d.ts +23 -0
  13. package/dist/browser/api/managedOps/options.js +4 -0
  14. package/dist/browser/api/managedOps/options.js.map +1 -0
  15. package/dist/browser/api/managedOpsContext.d.ts +22 -0
  16. package/dist/browser/api/managedOpsContext.js +37 -0
  17. package/dist/browser/api/managedOpsContext.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 +31 -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/classic/index.d.ts +3 -0
  28. package/dist/browser/classic/index.js +4 -0
  29. package/dist/browser/classic/index.js.map +1 -0
  30. package/dist/browser/classic/managedOps/index.d.ts +25 -0
  31. package/dist/browser/classic/managedOps/index.js +18 -0
  32. package/dist/browser/classic/managedOps/index.js.map +1 -0
  33. package/dist/browser/classic/operations/index.d.ts +11 -0
  34. package/dist/browser/classic/operations/index.js +14 -0
  35. package/dist/browser/classic/operations/index.js.map +1 -0
  36. package/dist/browser/index.d.ts +12 -0
  37. package/dist/browser/index.js +8 -0
  38. package/dist/browser/index.js.map +1 -0
  39. package/dist/browser/logger.d.ts +2 -0
  40. package/dist/browser/logger.js +5 -0
  41. package/dist/browser/logger.js.map +1 -0
  42. package/dist/browser/managedOpsClient.d.ts +18 -0
  43. package/dist/browser/managedOpsClient.js +29 -0
  44. package/dist/browser/managedOpsClient.js.map +1 -0
  45. package/dist/browser/models/index.d.ts +2 -0
  46. package/dist/browser/models/index.js +4 -0
  47. package/dist/browser/models/index.js.map +1 -0
  48. package/dist/browser/models/models.d.ts +331 -0
  49. package/dist/browser/models/models.js +314 -0
  50. package/dist/browser/models/models.js.map +1 -0
  51. package/dist/browser/package.json +3 -0
  52. package/dist/browser/restorePollerHelpers.d.ts +21 -0
  53. package/dist/browser/restorePollerHelpers.js +90 -0
  54. package/dist/browser/restorePollerHelpers.js.map +1 -0
  55. package/dist/browser/static-helpers/cloudSettingHelpers.d.ts +22 -0
  56. package/dist/browser/static-helpers/cloudSettingHelpers.js +38 -0
  57. package/dist/browser/static-helpers/cloudSettingHelpers.js.map +1 -0
  58. package/dist/browser/static-helpers/pagingHelpers.d.ts +73 -0
  59. package/dist/browser/static-helpers/pagingHelpers.js +121 -0
  60. package/dist/browser/static-helpers/pagingHelpers.js.map +1 -0
  61. package/dist/browser/static-helpers/pollingHelpers.d.ts +30 -0
  62. package/dist/browser/static-helpers/pollingHelpers.js +79 -0
  63. package/dist/browser/static-helpers/pollingHelpers.js.map +1 -0
  64. package/dist/browser/static-helpers/urlTemplate.d.ts +5 -0
  65. package/dist/browser/static-helpers/urlTemplate.js +200 -0
  66. package/dist/browser/static-helpers/urlTemplate.js.map +1 -0
  67. package/dist/commonjs/api/index.d.ts +2 -0
  68. package/dist/commonjs/api/index.js +8 -0
  69. package/dist/commonjs/api/index.js.map +1 -0
  70. package/dist/commonjs/api/managedOps/index.d.ts +3 -0
  71. package/dist/commonjs/api/managedOps/index.js +12 -0
  72. package/dist/commonjs/api/managedOps/index.js.map +1 -0
  73. package/dist/commonjs/api/managedOps/operations.d.ts +32 -0
  74. package/dist/commonjs/api/managedOps/operations.js +176 -0
  75. package/dist/commonjs/api/managedOps/operations.js.map +1 -0
  76. package/dist/commonjs/api/managedOps/options.d.ts +23 -0
  77. package/dist/commonjs/api/managedOps/options.js +5 -0
  78. package/dist/commonjs/api/managedOps/options.js.map +1 -0
  79. package/dist/commonjs/api/managedOpsContext.d.ts +22 -0
  80. package/dist/commonjs/api/managedOpsContext.js +40 -0
  81. package/dist/commonjs/api/managedOpsContext.js.map +1 -0
  82. package/dist/commonjs/api/operations/index.d.ts +3 -0
  83. package/dist/commonjs/api/operations/index.js +8 -0
  84. package/dist/commonjs/api/operations/index.js.map +1 -0
  85. package/dist/commonjs/api/operations/operations.d.ts +10 -0
  86. package/dist/commonjs/api/operations/operations.js +36 -0
  87. package/dist/commonjs/api/operations/operations.js.map +1 -0
  88. package/dist/commonjs/api/operations/options.d.ts +5 -0
  89. package/dist/commonjs/api/operations/options.js +5 -0
  90. package/dist/commonjs/api/operations/options.js.map +1 -0
  91. package/dist/commonjs/classic/index.d.ts +3 -0
  92. package/dist/commonjs/classic/index.js +5 -0
  93. package/dist/commonjs/classic/index.js.map +1 -0
  94. package/dist/commonjs/classic/managedOps/index.d.ts +25 -0
  95. package/dist/commonjs/classic/managedOps/index.js +21 -0
  96. package/dist/commonjs/classic/managedOps/index.js.map +1 -0
  97. package/dist/commonjs/classic/operations/index.d.ts +11 -0
  98. package/dist/commonjs/classic/operations/index.js +17 -0
  99. package/dist/commonjs/classic/operations/index.js.map +1 -0
  100. package/dist/commonjs/index.d.ts +12 -0
  101. package/dist/commonjs/index.js +18 -0
  102. package/dist/commonjs/index.js.map +1 -0
  103. package/dist/commonjs/logger.d.ts +2 -0
  104. package/dist/commonjs/logger.js +8 -0
  105. package/dist/commonjs/logger.js.map +1 -0
  106. package/dist/commonjs/managedOpsClient.d.ts +18 -0
  107. package/dist/commonjs/managedOpsClient.js +33 -0
  108. package/dist/commonjs/managedOpsClient.js.map +1 -0
  109. package/dist/commonjs/models/index.d.ts +2 -0
  110. package/dist/commonjs/models/index.js +12 -0
  111. package/dist/commonjs/models/index.js.map +1 -0
  112. package/dist/commonjs/models/models.d.ts +331 -0
  113. package/dist/commonjs/models/models.js +355 -0
  114. package/dist/commonjs/models/models.js.map +1 -0
  115. package/dist/commonjs/package.json +3 -0
  116. package/dist/commonjs/restorePollerHelpers.d.ts +21 -0
  117. package/dist/commonjs/restorePollerHelpers.js +93 -0
  118. package/dist/commonjs/restorePollerHelpers.js.map +1 -0
  119. package/dist/commonjs/static-helpers/cloudSettingHelpers.d.ts +22 -0
  120. package/dist/commonjs/static-helpers/cloudSettingHelpers.js +42 -0
  121. package/dist/commonjs/static-helpers/cloudSettingHelpers.js.map +1 -0
  122. package/dist/commonjs/static-helpers/pagingHelpers.d.ts +73 -0
  123. package/dist/commonjs/static-helpers/pagingHelpers.js +124 -0
  124. package/dist/commonjs/static-helpers/pagingHelpers.js.map +1 -0
  125. package/dist/commonjs/static-helpers/pollingHelpers.d.ts +30 -0
  126. package/dist/commonjs/static-helpers/pollingHelpers.js +82 -0
  127. package/dist/commonjs/static-helpers/pollingHelpers.js.map +1 -0
  128. package/dist/commonjs/static-helpers/urlTemplate.d.ts +5 -0
  129. package/dist/commonjs/static-helpers/urlTemplate.js +203 -0
  130. package/dist/commonjs/static-helpers/urlTemplate.js.map +1 -0
  131. package/dist/commonjs/tsdoc-metadata.json +11 -0
  132. package/dist/esm/api/index.d.ts +2 -0
  133. package/dist/esm/api/index.js +4 -0
  134. package/dist/esm/api/index.js.map +1 -0
  135. package/dist/esm/api/managedOps/index.d.ts +3 -0
  136. package/dist/esm/api/managedOps/index.js +4 -0
  137. package/dist/esm/api/managedOps/index.js.map +1 -0
  138. package/dist/esm/api/managedOps/operations.d.ts +32 -0
  139. package/dist/esm/api/managedOps/operations.js +159 -0
  140. package/dist/esm/api/managedOps/operations.js.map +1 -0
  141. package/dist/esm/api/managedOps/options.d.ts +23 -0
  142. package/dist/esm/api/managedOps/options.js +4 -0
  143. package/dist/esm/api/managedOps/options.js.map +1 -0
  144. package/dist/esm/api/managedOpsContext.d.ts +22 -0
  145. package/dist/esm/api/managedOpsContext.js +37 -0
  146. package/dist/esm/api/managedOpsContext.js.map +1 -0
  147. package/dist/esm/api/operations/index.d.ts +3 -0
  148. package/dist/esm/api/operations/index.js +4 -0
  149. package/dist/esm/api/operations/index.js.map +1 -0
  150. package/dist/esm/api/operations/operations.d.ts +10 -0
  151. package/dist/esm/api/operations/operations.js +31 -0
  152. package/dist/esm/api/operations/operations.js.map +1 -0
  153. package/dist/esm/api/operations/options.d.ts +5 -0
  154. package/dist/esm/api/operations/options.js +4 -0
  155. package/dist/esm/api/operations/options.js.map +1 -0
  156. package/dist/esm/classic/index.d.ts +3 -0
  157. package/dist/esm/classic/index.js +4 -0
  158. package/dist/esm/classic/index.js.map +1 -0
  159. package/dist/esm/classic/managedOps/index.d.ts +25 -0
  160. package/dist/esm/classic/managedOps/index.js +18 -0
  161. package/dist/esm/classic/managedOps/index.js.map +1 -0
  162. package/dist/esm/classic/operations/index.d.ts +11 -0
  163. package/dist/esm/classic/operations/index.js +14 -0
  164. package/dist/esm/classic/operations/index.js.map +1 -0
  165. package/dist/esm/index.d.ts +12 -0
  166. package/dist/esm/index.js +8 -0
  167. package/dist/esm/index.js.map +1 -0
  168. package/dist/esm/logger.d.ts +2 -0
  169. package/dist/esm/logger.js +5 -0
  170. package/dist/esm/logger.js.map +1 -0
  171. package/dist/esm/managedOpsClient.d.ts +18 -0
  172. package/dist/esm/managedOpsClient.js +29 -0
  173. package/dist/esm/managedOpsClient.js.map +1 -0
  174. package/dist/esm/models/index.d.ts +2 -0
  175. package/dist/esm/models/index.js +4 -0
  176. package/dist/esm/models/index.js.map +1 -0
  177. package/dist/esm/models/models.d.ts +331 -0
  178. package/dist/esm/models/models.js +314 -0
  179. package/dist/esm/models/models.js.map +1 -0
  180. package/dist/esm/package.json +3 -0
  181. package/dist/esm/restorePollerHelpers.d.ts +21 -0
  182. package/dist/esm/restorePollerHelpers.js +90 -0
  183. package/dist/esm/restorePollerHelpers.js.map +1 -0
  184. package/dist/esm/static-helpers/cloudSettingHelpers.d.ts +22 -0
  185. package/dist/esm/static-helpers/cloudSettingHelpers.js +38 -0
  186. package/dist/esm/static-helpers/cloudSettingHelpers.js.map +1 -0
  187. package/dist/esm/static-helpers/pagingHelpers.d.ts +73 -0
  188. package/dist/esm/static-helpers/pagingHelpers.js +121 -0
  189. package/dist/esm/static-helpers/pagingHelpers.js.map +1 -0
  190. package/dist/esm/static-helpers/pollingHelpers.d.ts +30 -0
  191. package/dist/esm/static-helpers/pollingHelpers.js +79 -0
  192. package/dist/esm/static-helpers/pollingHelpers.js.map +1 -0
  193. package/dist/esm/static-helpers/urlTemplate.d.ts +5 -0
  194. package/dist/esm/static-helpers/urlTemplate.js +200 -0
  195. package/dist/esm/static-helpers/urlTemplate.js.map +1 -0
  196. package/dist/react-native/api/index.d.ts +2 -0
  197. package/dist/react-native/api/index.js +4 -0
  198. package/dist/react-native/api/index.js.map +1 -0
  199. package/dist/react-native/api/managedOps/index.d.ts +3 -0
  200. package/dist/react-native/api/managedOps/index.js +4 -0
  201. package/dist/react-native/api/managedOps/index.js.map +1 -0
  202. package/dist/react-native/api/managedOps/operations.d.ts +32 -0
  203. package/dist/react-native/api/managedOps/operations.js +159 -0
  204. package/dist/react-native/api/managedOps/operations.js.map +1 -0
  205. package/dist/react-native/api/managedOps/options.d.ts +23 -0
  206. package/dist/react-native/api/managedOps/options.js +4 -0
  207. package/dist/react-native/api/managedOps/options.js.map +1 -0
  208. package/dist/react-native/api/managedOpsContext.d.ts +22 -0
  209. package/dist/react-native/api/managedOpsContext.js +37 -0
  210. package/dist/react-native/api/managedOpsContext.js.map +1 -0
  211. package/dist/react-native/api/operations/index.d.ts +3 -0
  212. package/dist/react-native/api/operations/index.js +4 -0
  213. package/dist/react-native/api/operations/index.js.map +1 -0
  214. package/dist/react-native/api/operations/operations.d.ts +10 -0
  215. package/dist/react-native/api/operations/operations.js +31 -0
  216. package/dist/react-native/api/operations/operations.js.map +1 -0
  217. package/dist/react-native/api/operations/options.d.ts +5 -0
  218. package/dist/react-native/api/operations/options.js +4 -0
  219. package/dist/react-native/api/operations/options.js.map +1 -0
  220. package/dist/react-native/classic/index.d.ts +3 -0
  221. package/dist/react-native/classic/index.js +4 -0
  222. package/dist/react-native/classic/index.js.map +1 -0
  223. package/dist/react-native/classic/managedOps/index.d.ts +25 -0
  224. package/dist/react-native/classic/managedOps/index.js +18 -0
  225. package/dist/react-native/classic/managedOps/index.js.map +1 -0
  226. package/dist/react-native/classic/operations/index.d.ts +11 -0
  227. package/dist/react-native/classic/operations/index.js +14 -0
  228. package/dist/react-native/classic/operations/index.js.map +1 -0
  229. package/dist/react-native/index.d.ts +12 -0
  230. package/dist/react-native/index.js +8 -0
  231. package/dist/react-native/index.js.map +1 -0
  232. package/dist/react-native/logger.d.ts +2 -0
  233. package/dist/react-native/logger.js +5 -0
  234. package/dist/react-native/logger.js.map +1 -0
  235. package/dist/react-native/managedOpsClient.d.ts +18 -0
  236. package/dist/react-native/managedOpsClient.js +29 -0
  237. package/dist/react-native/managedOpsClient.js.map +1 -0
  238. package/dist/react-native/models/index.d.ts +2 -0
  239. package/dist/react-native/models/index.js +4 -0
  240. package/dist/react-native/models/index.js.map +1 -0
  241. package/dist/react-native/models/models.d.ts +331 -0
  242. package/dist/react-native/models/models.js +314 -0
  243. package/dist/react-native/models/models.js.map +1 -0
  244. package/dist/react-native/package.json +3 -0
  245. package/dist/react-native/restorePollerHelpers.d.ts +21 -0
  246. package/dist/react-native/restorePollerHelpers.js +90 -0
  247. package/dist/react-native/restorePollerHelpers.js.map +1 -0
  248. package/dist/react-native/static-helpers/cloudSettingHelpers.d.ts +22 -0
  249. package/dist/react-native/static-helpers/cloudSettingHelpers.js +38 -0
  250. package/dist/react-native/static-helpers/cloudSettingHelpers.js.map +1 -0
  251. package/dist/react-native/static-helpers/pagingHelpers.d.ts +73 -0
  252. package/dist/react-native/static-helpers/pagingHelpers.js +121 -0
  253. package/dist/react-native/static-helpers/pagingHelpers.js.map +1 -0
  254. package/dist/react-native/static-helpers/pollingHelpers.d.ts +30 -0
  255. package/dist/react-native/static-helpers/pollingHelpers.js +79 -0
  256. package/dist/react-native/static-helpers/pollingHelpers.js.map +1 -0
  257. package/dist/react-native/static-helpers/urlTemplate.d.ts +5 -0
  258. package/dist/react-native/static-helpers/urlTemplate.js +200 -0
  259. package/dist/react-native/static-helpers/urlTemplate.js.map +1 -0
  260. package/package.json +216 -0
@@ -0,0 +1,355 @@
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.KnownProvisioningState = 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.managedOpSerializer = managedOpSerializer;
16
+ exports.managedOpDeserializer = managedOpDeserializer;
17
+ exports.managedOpsPropertiesSerializer = managedOpsPropertiesSerializer;
18
+ exports.managedOpsPropertiesDeserializer = managedOpsPropertiesDeserializer;
19
+ exports.skuDeserializer = skuDeserializer;
20
+ exports.desiredConfigurationSerializer = desiredConfigurationSerializer;
21
+ exports.desiredConfigurationDeserializer = desiredConfigurationDeserializer;
22
+ exports.changeTrackingConfigurationSerializer = changeTrackingConfigurationSerializer;
23
+ exports.changeTrackingConfigurationDeserializer = changeTrackingConfigurationDeserializer;
24
+ exports.azureMonitorConfigurationSerializer = azureMonitorConfigurationSerializer;
25
+ exports.azureMonitorConfigurationDeserializer = azureMonitorConfigurationDeserializer;
26
+ exports.serviceInformationDeserializer = serviceInformationDeserializer;
27
+ exports.changeTrackingInformationDeserializer = changeTrackingInformationDeserializer;
28
+ exports.azureMonitorInformationDeserializer = azureMonitorInformationDeserializer;
29
+ exports.updateManagerInformationDeserializer = updateManagerInformationDeserializer;
30
+ exports.guestConfigurationInformationDeserializer = guestConfigurationInformationDeserializer;
31
+ exports.defenderForServersInformationDeserializer = defenderForServersInformationDeserializer;
32
+ exports.defenderCspmInformationDeserializer = defenderCspmInformationDeserializer;
33
+ exports.policyAssignmentPropertiesDeserializer = policyAssignmentPropertiesDeserializer;
34
+ exports.proxyResourceSerializer = proxyResourceSerializer;
35
+ exports.proxyResourceDeserializer = proxyResourceDeserializer;
36
+ exports.resourceSerializer = resourceSerializer;
37
+ exports.resourceDeserializer = resourceDeserializer;
38
+ exports.systemDataDeserializer = systemDataDeserializer;
39
+ exports._managedOpListResultDeserializer = _managedOpListResultDeserializer;
40
+ exports.managedOpArraySerializer = managedOpArraySerializer;
41
+ exports.managedOpArrayDeserializer = managedOpArrayDeserializer;
42
+ exports.managedOpUpdateSerializer = managedOpUpdateSerializer;
43
+ exports.managedOpUpdatePropertiesSerializer = managedOpUpdatePropertiesSerializer;
44
+ function _operationListResultDeserializer(item) {
45
+ return {
46
+ value: operationArrayDeserializer(item["value"]),
47
+ nextLink: item["nextLink"],
48
+ };
49
+ }
50
+ function operationArrayDeserializer(result) {
51
+ return result.map((item) => {
52
+ return operationDeserializer(item);
53
+ });
54
+ }
55
+ function operationDeserializer(item) {
56
+ return {
57
+ name: item["name"],
58
+ isDataAction: item["isDataAction"],
59
+ display: !item["display"] ? item["display"] : operationDisplayDeserializer(item["display"]),
60
+ origin: item["origin"],
61
+ actionType: item["actionType"],
62
+ };
63
+ }
64
+ function operationDisplayDeserializer(item) {
65
+ return {
66
+ provider: item["provider"],
67
+ resource: item["resource"],
68
+ operation: item["operation"],
69
+ description: item["description"],
70
+ };
71
+ }
72
+ /** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" */
73
+ var KnownOrigin;
74
+ (function (KnownOrigin) {
75
+ /** Indicates the operation is initiated by a user. */
76
+ KnownOrigin["User"] = "user";
77
+ /** Indicates the operation is initiated by a system. */
78
+ KnownOrigin["System"] = "system";
79
+ /** Indicates the operation is initiated by a user or system. */
80
+ KnownOrigin["UserSystem"] = "user,system";
81
+ })(KnownOrigin || (exports.KnownOrigin = KnownOrigin = {}));
82
+ /** Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */
83
+ var KnownActionType;
84
+ (function (KnownActionType) {
85
+ /** Actions are for internal-only APIs. */
86
+ KnownActionType["Internal"] = "Internal";
87
+ })(KnownActionType || (exports.KnownActionType = KnownActionType = {}));
88
+ function errorResponseDeserializer(item) {
89
+ return {
90
+ error: !item["error"] ? item["error"] : errorDetailDeserializer(item["error"]),
91
+ };
92
+ }
93
+ function errorDetailDeserializer(item) {
94
+ return {
95
+ code: item["code"],
96
+ message: item["message"],
97
+ target: item["target"],
98
+ details: !item["details"] ? item["details"] : errorDetailArrayDeserializer(item["details"]),
99
+ additionalInfo: !item["additionalInfo"]
100
+ ? item["additionalInfo"]
101
+ : errorAdditionalInfoArrayDeserializer(item["additionalInfo"]),
102
+ };
103
+ }
104
+ function errorDetailArrayDeserializer(result) {
105
+ return result.map((item) => {
106
+ return errorDetailDeserializer(item);
107
+ });
108
+ }
109
+ function errorAdditionalInfoArrayDeserializer(result) {
110
+ return result.map((item) => {
111
+ return errorAdditionalInfoDeserializer(item);
112
+ });
113
+ }
114
+ function errorAdditionalInfoDeserializer(item) {
115
+ return {
116
+ type: item["type"],
117
+ info: item["info"],
118
+ };
119
+ }
120
+ function managedOpSerializer(item) {
121
+ return {
122
+ properties: !item["properties"]
123
+ ? item["properties"]
124
+ : managedOpsPropertiesSerializer(item["properties"]),
125
+ };
126
+ }
127
+ function managedOpDeserializer(item) {
128
+ return {
129
+ id: item["id"],
130
+ name: item["name"],
131
+ type: item["type"],
132
+ systemData: !item["systemData"]
133
+ ? item["systemData"]
134
+ : systemDataDeserializer(item["systemData"]),
135
+ properties: !item["properties"]
136
+ ? item["properties"]
137
+ : managedOpsPropertiesDeserializer(item["properties"]),
138
+ };
139
+ }
140
+ function managedOpsPropertiesSerializer(item) {
141
+ return { desiredConfiguration: desiredConfigurationSerializer(item["desiredConfiguration"]) };
142
+ }
143
+ function managedOpsPropertiesDeserializer(item) {
144
+ return {
145
+ sku: !item["sku"] ? item["sku"] : skuDeserializer(item["sku"]),
146
+ provisioningState: item["provisioningState"],
147
+ desiredConfiguration: desiredConfigurationDeserializer(item["desiredConfiguration"]),
148
+ services: !item["services"]
149
+ ? item["services"]
150
+ : serviceInformationDeserializer(item["services"]),
151
+ policyAssignmentProperties: !item["policyAssignmentProperties"]
152
+ ? item["policyAssignmentProperties"]
153
+ : policyAssignmentPropertiesDeserializer(item["policyAssignmentProperties"]),
154
+ };
155
+ }
156
+ function skuDeserializer(item) {
157
+ return {
158
+ name: item["name"],
159
+ tier: item["tier"],
160
+ };
161
+ }
162
+ /** The provisioning state of a resource. */
163
+ var KnownProvisioningState;
164
+ (function (KnownProvisioningState) {
165
+ /** Resource has been created. */
166
+ KnownProvisioningState["Succeeded"] = "Succeeded";
167
+ /** Resource creation failed. */
168
+ KnownProvisioningState["Failed"] = "Failed";
169
+ /** Resource creation was canceled. */
170
+ KnownProvisioningState["Canceled"] = "Canceled";
171
+ /** The resource has begun provisioning. */
172
+ KnownProvisioningState["Provisioning"] = "Provisioning";
173
+ /** The resource is being deleted. */
174
+ KnownProvisioningState["Deleting"] = "Deleting";
175
+ })(KnownProvisioningState || (exports.KnownProvisioningState = KnownProvisioningState = {}));
176
+ function desiredConfigurationSerializer(item) {
177
+ return {
178
+ changeTrackingAndInventory: changeTrackingConfigurationSerializer(item["changeTrackingAndInventory"]),
179
+ azureMonitorInsights: azureMonitorConfigurationSerializer(item["azureMonitorInsights"]),
180
+ userAssignedManagedIdentityId: item["userAssignedManagedIdentityId"],
181
+ defenderForServers: item["defenderForServers"],
182
+ defenderCspm: item["defenderCspm"],
183
+ };
184
+ }
185
+ function desiredConfigurationDeserializer(item) {
186
+ return {
187
+ changeTrackingAndInventory: changeTrackingConfigurationDeserializer(item["changeTrackingAndInventory"]),
188
+ azureMonitorInsights: azureMonitorConfigurationDeserializer(item["azureMonitorInsights"]),
189
+ userAssignedManagedIdentityId: item["userAssignedManagedIdentityId"],
190
+ defenderForServers: item["defenderForServers"],
191
+ defenderCspm: item["defenderCspm"],
192
+ };
193
+ }
194
+ function changeTrackingConfigurationSerializer(item) {
195
+ return { logAnalyticsWorkspaceId: item["logAnalyticsWorkspaceId"] };
196
+ }
197
+ function changeTrackingConfigurationDeserializer(item) {
198
+ return {
199
+ logAnalyticsWorkspaceId: item["logAnalyticsWorkspaceId"],
200
+ };
201
+ }
202
+ function azureMonitorConfigurationSerializer(item) {
203
+ return { azureMonitorWorkspaceId: item["azureMonitorWorkspaceId"] };
204
+ }
205
+ function azureMonitorConfigurationDeserializer(item) {
206
+ return {
207
+ azureMonitorWorkspaceId: item["azureMonitorWorkspaceId"],
208
+ };
209
+ }
210
+ function serviceInformationDeserializer(item) {
211
+ return {
212
+ changeTrackingAndInventory: !item["changeTrackingAndInventory"]
213
+ ? item["changeTrackingAndInventory"]
214
+ : changeTrackingInformationDeserializer(item["changeTrackingAndInventory"]),
215
+ azureMonitorInsights: !item["azureMonitorInsights"]
216
+ ? item["azureMonitorInsights"]
217
+ : azureMonitorInformationDeserializer(item["azureMonitorInsights"]),
218
+ azureUpdateManager: !item["azureUpdateManager"]
219
+ ? item["azureUpdateManager"]
220
+ : updateManagerInformationDeserializer(item["azureUpdateManager"]),
221
+ azurePolicyAndMachineConfiguration: !item["azurePolicyAndMachineConfiguration"]
222
+ ? item["azurePolicyAndMachineConfiguration"]
223
+ : guestConfigurationInformationDeserializer(item["azurePolicyAndMachineConfiguration"]),
224
+ defenderForServers: !item["defenderForServers"]
225
+ ? item["defenderForServers"]
226
+ : defenderForServersInformationDeserializer(item["defenderForServers"]),
227
+ defenderCspm: !item["defenderCspm"]
228
+ ? item["defenderCspm"]
229
+ : defenderCspmInformationDeserializer(item["defenderCspm"]),
230
+ };
231
+ }
232
+ function changeTrackingInformationDeserializer(item) {
233
+ return {
234
+ dcrId: item["dcrId"],
235
+ enablementStatus: item["enablementStatus"],
236
+ };
237
+ }
238
+ function azureMonitorInformationDeserializer(item) {
239
+ return {
240
+ dcrId: item["dcrId"],
241
+ enablementStatus: item["enablementStatus"],
242
+ };
243
+ }
244
+ function updateManagerInformationDeserializer(item) {
245
+ return {
246
+ enablementStatus: item["enablementStatus"],
247
+ };
248
+ }
249
+ function guestConfigurationInformationDeserializer(item) {
250
+ return {
251
+ enablementStatus: item["enablementStatus"],
252
+ };
253
+ }
254
+ function defenderForServersInformationDeserializer(item) {
255
+ return {
256
+ enablementStatus: item["enablementStatus"],
257
+ };
258
+ }
259
+ function defenderCspmInformationDeserializer(item) {
260
+ return {
261
+ enablementStatus: item["enablementStatus"],
262
+ };
263
+ }
264
+ function policyAssignmentPropertiesDeserializer(item) {
265
+ return {
266
+ policyInitiativeAssignmentId: item["policyInitiativeAssignmentId"],
267
+ };
268
+ }
269
+ function proxyResourceSerializer(item) {
270
+ return item;
271
+ }
272
+ function proxyResourceDeserializer(item) {
273
+ return {
274
+ id: item["id"],
275
+ name: item["name"],
276
+ type: item["type"],
277
+ systemData: !item["systemData"]
278
+ ? item["systemData"]
279
+ : systemDataDeserializer(item["systemData"]),
280
+ };
281
+ }
282
+ function resourceSerializer(item) {
283
+ return item;
284
+ }
285
+ function resourceDeserializer(item) {
286
+ return {
287
+ id: item["id"],
288
+ name: item["name"],
289
+ type: item["type"],
290
+ systemData: !item["systemData"]
291
+ ? item["systemData"]
292
+ : systemDataDeserializer(item["systemData"]),
293
+ };
294
+ }
295
+ function systemDataDeserializer(item) {
296
+ return {
297
+ createdBy: item["createdBy"],
298
+ createdByType: item["createdByType"],
299
+ createdAt: !item["createdAt"] ? item["createdAt"] : new Date(item["createdAt"]),
300
+ lastModifiedBy: item["lastModifiedBy"],
301
+ lastModifiedByType: item["lastModifiedByType"],
302
+ lastModifiedAt: !item["lastModifiedAt"]
303
+ ? item["lastModifiedAt"]
304
+ : new Date(item["lastModifiedAt"]),
305
+ };
306
+ }
307
+ /** The kind of entity that created the resource. */
308
+ var KnownCreatedByType;
309
+ (function (KnownCreatedByType) {
310
+ /** The entity was created by a user. */
311
+ KnownCreatedByType["User"] = "User";
312
+ /** The entity was created by an application. */
313
+ KnownCreatedByType["Application"] = "Application";
314
+ /** The entity was created by a managed identity. */
315
+ KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
316
+ /** The entity was created by a key. */
317
+ KnownCreatedByType["Key"] = "Key";
318
+ })(KnownCreatedByType || (exports.KnownCreatedByType = KnownCreatedByType = {}));
319
+ function _managedOpListResultDeserializer(item) {
320
+ return {
321
+ value: managedOpArrayDeserializer(item["value"]),
322
+ nextLink: item["nextLink"],
323
+ };
324
+ }
325
+ function managedOpArraySerializer(result) {
326
+ return result.map((item) => {
327
+ return managedOpSerializer(item);
328
+ });
329
+ }
330
+ function managedOpArrayDeserializer(result) {
331
+ return result.map((item) => {
332
+ return managedOpDeserializer(item);
333
+ });
334
+ }
335
+ function managedOpUpdateSerializer(item) {
336
+ return {
337
+ properties: !item["properties"]
338
+ ? item["properties"]
339
+ : managedOpUpdatePropertiesSerializer(item["properties"]),
340
+ };
341
+ }
342
+ function managedOpUpdatePropertiesSerializer(item) {
343
+ return {
344
+ desiredConfiguration: !item["desiredConfiguration"]
345
+ ? item["desiredConfiguration"]
346
+ : desiredConfigurationSerializer(item["desiredConfiguration"]),
347
+ };
348
+ }
349
+ /** Known values of {@link Versions} that the service accepts. */
350
+ var KnownVersions;
351
+ (function (KnownVersions) {
352
+ /** 2025-07-28-preview */
353
+ KnownVersions["V20250728Preview"] = "2025-07-28-preview";
354
+ })(KnownVersions || (exports.KnownVersions = KnownVersions = {}));
355
+ //# 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;;;AAgBlC,4EAKC;AAED,gEAIC;AAgBD,sDAQC;AAcD,oEAOC;AA4CD,8DAIC;AAgBD,0DAUC;AAED,oEAIC;AAED,oFAIC;AAUD,0EAKC;AAQD,kDAMC;AAED,sDAYC;AAgBD,wEAEC;AAED,4EAYC;AAUD,0CAKC;AA2CD,wEAUC;AAED,4EAUC;AAQD,sFAEC;AAED,0FAIC;AAQD,kFAEC;AAED,sFAIC;AAkBD,wEAqBC;AAUD,sFAKC;AAUD,kFAKC;AAQD,oFAIC;AAQD,8FAMC;AAQD,8FAMC;AAQD,kFAIC;AAQD,wFAIC;AAKD,0DAEC;AAED,8DASC;AAcD,gDAEC;AAED,oDASC;AAkBD,wDAWC;AAkCD,4EAKC;AAED,4DAIC;AAED,gEAIC;AAQD,8DAMC;AAQD,kFAMC;AAvmBD,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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AY,aAGX;AAHD,WAAY,aAAa;IACvB,yBAAyB;IACzB,wDAAuC,CAAA;AACzC,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * This file contains only generated model types and their (de)serializers.\n * Disable the following rules for internal models with '_' prefix and deserializers which require 'any' for raw JSON input.\n */\n/* eslint-disable @typescript-eslint/naming-convention */\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 an 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/** The Managed Operations resource. */\nexport interface ManagedOp extends ProxyResource {\n /** The resource-specific properties for this resource. */\n properties?: ManagedOpsProperties;\n}\n\nexport function managedOpSerializer(item: ManagedOp): any {\n return {\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : managedOpsPropertiesSerializer(item[\"properties\"]),\n };\n}\n\nexport function managedOpDeserializer(item: any): ManagedOp {\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 : managedOpsPropertiesDeserializer(item[\"properties\"]),\n };\n}\n\n/** Properties of the ManagedOps resource. */\nexport interface ManagedOpsProperties {\n /** Product plan details of this resource. */\n readonly sku?: Sku;\n /** Provisioning state of the resource. */\n readonly provisioningState?: ProvisioningState;\n /** Desired configuration input by the user. */\n desiredConfiguration: DesiredConfiguration;\n /** Services provisioned by this resource. */\n readonly services?: ServiceInformation;\n /** Policy assignments created for managing services. */\n readonly policyAssignmentProperties?: PolicyAssignmentProperties;\n}\n\nexport function managedOpsPropertiesSerializer(item: ManagedOpsProperties): any {\n return { desiredConfiguration: desiredConfigurationSerializer(item[\"desiredConfiguration\"]) };\n}\n\nexport function managedOpsPropertiesDeserializer(item: any): ManagedOpsProperties {\n return {\n sku: !item[\"sku\"] ? item[\"sku\"] : skuDeserializer(item[\"sku\"]),\n provisioningState: item[\"provisioningState\"],\n desiredConfiguration: desiredConfigurationDeserializer(item[\"desiredConfiguration\"]),\n services: !item[\"services\"]\n ? item[\"services\"]\n : serviceInformationDeserializer(item[\"services\"]),\n policyAssignmentProperties: !item[\"policyAssignmentProperties\"]\n ? item[\"policyAssignmentProperties\"]\n : policyAssignmentPropertiesDeserializer(item[\"policyAssignmentProperties\"]),\n };\n}\n\n/** Specifies the service plan for this resource. */\nexport interface Sku {\n /** Name of the SKU. */\n name: string;\n /** Pricing tier of the SKU. */\n tier: string;\n}\n\nexport function skuDeserializer(item: any): Sku {\n return {\n name: item[\"name\"],\n tier: item[\"tier\"],\n };\n}\n\n/** The provisioning state of a resource. */\nexport enum KnownProvisioningState {\n /** Resource has been created. */\n Succeeded = \"Succeeded\",\n /** Resource creation failed. */\n Failed = \"Failed\",\n /** Resource creation was canceled. */\n Canceled = \"Canceled\",\n /** The resource has begun provisioning. */\n Provisioning = \"Provisioning\",\n /** The resource is being deleted. */\n Deleting = \"Deleting\",\n}\n\n/**\n * The provisioning state of a resource. \\\n * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState,\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 * **Provisioning**: The resource has begun provisioning. \\\n * **Deleting**: The resource is being deleted.\n */\nexport type ProvisioningState = string;\n\n/** Desired configuration input by the user. */\nexport interface DesiredConfiguration {\n /** Configuration for the Change Tracking and Inventory service. */\n changeTrackingAndInventory: ChangeTrackingConfiguration;\n /** Configuration for the Azure Monitor Insights service. */\n azureMonitorInsights: AzureMonitorConfiguration;\n /** User assigned Managed Identity used to perform operations on machines managed by Ops360. */\n userAssignedManagedIdentityId: string;\n /** Desired enablement state of the Defender For Servers service. */\n defenderForServers?: string;\n /** Desired enablement state of the Defender Cloud Security Posture Management (CSPM) service. */\n defenderCspm?: string;\n}\n\nexport function desiredConfigurationSerializer(item: DesiredConfiguration): any {\n return {\n changeTrackingAndInventory: changeTrackingConfigurationSerializer(\n item[\"changeTrackingAndInventory\"],\n ),\n azureMonitorInsights: azureMonitorConfigurationSerializer(item[\"azureMonitorInsights\"]),\n userAssignedManagedIdentityId: item[\"userAssignedManagedIdentityId\"],\n defenderForServers: item[\"defenderForServers\"],\n defenderCspm: item[\"defenderCspm\"],\n };\n}\n\nexport function desiredConfigurationDeserializer(item: any): DesiredConfiguration {\n return {\n changeTrackingAndInventory: changeTrackingConfigurationDeserializer(\n item[\"changeTrackingAndInventory\"],\n ),\n azureMonitorInsights: azureMonitorConfigurationDeserializer(item[\"azureMonitorInsights\"]),\n userAssignedManagedIdentityId: item[\"userAssignedManagedIdentityId\"],\n defenderForServers: item[\"defenderForServers\"],\n defenderCspm: item[\"defenderCspm\"],\n };\n}\n\n/** Configuration for the Change Tracking and Inventory service. */\nexport interface ChangeTrackingConfiguration {\n /** Log analytics workspace resource ID used by the service. */\n logAnalyticsWorkspaceId: string;\n}\n\nexport function changeTrackingConfigurationSerializer(item: ChangeTrackingConfiguration): any {\n return { logAnalyticsWorkspaceId: item[\"logAnalyticsWorkspaceId\"] };\n}\n\nexport function changeTrackingConfigurationDeserializer(item: any): ChangeTrackingConfiguration {\n return {\n logAnalyticsWorkspaceId: item[\"logAnalyticsWorkspaceId\"],\n };\n}\n\n/** Configuration for the Azure Monitor Insights service. */\nexport interface AzureMonitorConfiguration {\n /** Azure monitor workspace resource ID used by the service. */\n azureMonitorWorkspaceId: string;\n}\n\nexport function azureMonitorConfigurationSerializer(item: AzureMonitorConfiguration): any {\n return { azureMonitorWorkspaceId: item[\"azureMonitorWorkspaceId\"] };\n}\n\nexport function azureMonitorConfigurationDeserializer(item: any): AzureMonitorConfiguration {\n return {\n azureMonitorWorkspaceId: item[\"azureMonitorWorkspaceId\"],\n };\n}\n\n/** Services provisioned by this resource. */\nexport interface ServiceInformation {\n /** Change Tracking and Inventory service information. */\n readonly changeTrackingAndInventory?: ChangeTrackingInformation;\n /** Azure Monitor Insights service information. */\n readonly azureMonitorInsights?: AzureMonitorInformation;\n /** Azure Update Manager service information. */\n readonly azureUpdateManager?: UpdateManagerInformation;\n /** Azure Policy and Machine Configuration service information. */\n readonly azurePolicyAndMachineConfiguration?: GuestConfigurationInformation;\n /** Defender for Servers service information. */\n readonly defenderForServers?: DefenderForServersInformation;\n /** Defender for Cloud's Cloud security posture management (CSPM) service information. */\n readonly defenderCspm?: DefenderCspmInformation;\n}\n\nexport function serviceInformationDeserializer(item: any): ServiceInformation {\n return {\n changeTrackingAndInventory: !item[\"changeTrackingAndInventory\"]\n ? item[\"changeTrackingAndInventory\"]\n : changeTrackingInformationDeserializer(item[\"changeTrackingAndInventory\"]),\n azureMonitorInsights: !item[\"azureMonitorInsights\"]\n ? item[\"azureMonitorInsights\"]\n : azureMonitorInformationDeserializer(item[\"azureMonitorInsights\"]),\n azureUpdateManager: !item[\"azureUpdateManager\"]\n ? item[\"azureUpdateManager\"]\n : updateManagerInformationDeserializer(item[\"azureUpdateManager\"]),\n azurePolicyAndMachineConfiguration: !item[\"azurePolicyAndMachineConfiguration\"]\n ? item[\"azurePolicyAndMachineConfiguration\"]\n : guestConfigurationInformationDeserializer(item[\"azurePolicyAndMachineConfiguration\"]),\n defenderForServers: !item[\"defenderForServers\"]\n ? item[\"defenderForServers\"]\n : defenderForServersInformationDeserializer(item[\"defenderForServers\"]),\n defenderCspm: !item[\"defenderCspm\"]\n ? item[\"defenderCspm\"]\n : defenderCspmInformationDeserializer(item[\"defenderCspm\"]),\n };\n}\n\n/** Change Tracking and Inventory service information. */\nexport interface ChangeTrackingInformation {\n /** ID of Data Collection Rule (DCR) associated with this service. */\n dcrId: string;\n /** Indicates whether the service is enabled. */\n enablementStatus: string;\n}\n\nexport function changeTrackingInformationDeserializer(item: any): ChangeTrackingInformation {\n return {\n dcrId: item[\"dcrId\"],\n enablementStatus: item[\"enablementStatus\"],\n };\n}\n\n/** Azure Monitor Insights service information. */\nexport interface AzureMonitorInformation {\n /** ID of Data Collection Rule (DCR) associated with this service. */\n dcrId: string;\n /** Indicates whether the service is enabled. */\n enablementStatus: string;\n}\n\nexport function azureMonitorInformationDeserializer(item: any): AzureMonitorInformation {\n return {\n dcrId: item[\"dcrId\"],\n enablementStatus: item[\"enablementStatus\"],\n };\n}\n\n/** Azure Update Manager service information. */\nexport interface UpdateManagerInformation {\n /** Indicates whether the service is enabled. */\n enablementStatus: string;\n}\n\nexport function updateManagerInformationDeserializer(item: any): UpdateManagerInformation {\n return {\n enablementStatus: item[\"enablementStatus\"],\n };\n}\n\n/** Azure Policy and Machine Configuration service information. */\nexport interface GuestConfigurationInformation {\n /** Indicates whether the service is enabled. */\n enablementStatus: string;\n}\n\nexport function guestConfigurationInformationDeserializer(\n item: any,\n): GuestConfigurationInformation {\n return {\n enablementStatus: item[\"enablementStatus\"],\n };\n}\n\n/** Defender for Servers service information. */\nexport interface DefenderForServersInformation {\n /** Indicates whether the service is enabled. */\n enablementStatus: string;\n}\n\nexport function defenderForServersInformationDeserializer(\n item: any,\n): DefenderForServersInformation {\n return {\n enablementStatus: item[\"enablementStatus\"],\n };\n}\n\n/** Defender Cloud Security Posture Management (CSPM) service information. */\nexport interface DefenderCspmInformation {\n /** Indicates whether the service is enabled. */\n enablementStatus: string;\n}\n\nexport function defenderCspmInformationDeserializer(item: any): DefenderCspmInformation {\n return {\n enablementStatus: item[\"enablementStatus\"],\n };\n}\n\n/** Policy assignments created for managing services. */\nexport interface PolicyAssignmentProperties {\n /** Policy initiative assignment ID. */\n policyInitiativeAssignmentId: string;\n}\n\nexport function policyAssignmentPropertiesDeserializer(item: any): PolicyAssignmentProperties {\n return {\n policyInitiativeAssignmentId: item[\"policyInitiativeAssignmentId\"],\n };\n}\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 ManagedOp list operation. */\nexport interface _ManagedOpListResult {\n /** The ManagedOp items on this page */\n value: ManagedOp[];\n /** The link to the next page of items */\n nextLink?: string;\n}\n\nexport function _managedOpListResultDeserializer(item: any): _ManagedOpListResult {\n return {\n value: managedOpArrayDeserializer(item[\"value\"]),\n nextLink: item[\"nextLink\"],\n };\n}\n\nexport function managedOpArraySerializer(result: Array<ManagedOp>): any[] {\n return result.map((item) => {\n return managedOpSerializer(item);\n });\n}\n\nexport function managedOpArrayDeserializer(result: Array<ManagedOp>): any[] {\n return result.map((item) => {\n return managedOpDeserializer(item);\n });\n}\n\n/** The type used for update operations of the ManagedOp. */\nexport interface ManagedOpUpdate {\n /** The resource-specific properties for this resource. */\n properties?: ManagedOpUpdateProperties;\n}\n\nexport function managedOpUpdateSerializer(item: ManagedOpUpdate): any {\n return {\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : managedOpUpdatePropertiesSerializer(item[\"properties\"]),\n };\n}\n\n/** The updatable properties of the ManagedOp. */\nexport interface ManagedOpUpdateProperties {\n /** Desired configuration input by the user. */\n desiredConfiguration?: DesiredConfiguration;\n}\n\nexport function managedOpUpdatePropertiesSerializer(item: ManagedOpUpdateProperties): any {\n return {\n desiredConfiguration: !item[\"desiredConfiguration\"]\n ? item[\"desiredConfiguration\"]\n : desiredConfigurationSerializer(item[\"desiredConfiguration\"]),\n };\n}\n\n/** Known values of {@link Versions} that the service accepts. */\nexport enum KnownVersions {\n /** 2025-07-28-preview */\n V20250728Preview = \"2025-07-28-preview\",\n}\n"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1,21 @@
1
+ import type { ManagedOpsClient } from "./managedOpsClient.js";
2
+ import type { OperationOptions, PathUncheckedResponse } from "@azure-rest/core-client";
3
+ import type { AbortSignalLike } from "@azure/abort-controller";
4
+ import type { PollerLike, OperationState } from "@azure/core-lro";
5
+ export interface RestorePollerOptions<TResult, TResponse extends PathUncheckedResponse = PathUncheckedResponse> extends OperationOptions {
6
+ /** Delay to wait until next poll, in milliseconds. */
7
+ updateIntervalInMs?: number;
8
+ /**
9
+ * The signal which can be used to abort requests.
10
+ */
11
+ abortSignal?: AbortSignalLike;
12
+ /** Deserialization function for raw response body */
13
+ processResponseBody?: (result: TResponse) => Promise<TResult>;
14
+ }
15
+ /**
16
+ * Creates a poller from the serialized state of another poller. This can be
17
+ * useful when you want to create pollers on a different host or a poller
18
+ * needs to be constructed after the original one is not in scope.
19
+ */
20
+ export declare function restorePoller<TResponse extends PathUncheckedResponse, TResult>(client: ManagedOpsClient, serializedState: string, sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>, options?: RestorePollerOptions<TResult>): PollerLike<OperationState<TResult>, TResult>;
21
+ //# sourceMappingURL=restorePollerHelpers.d.ts.map
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.restorePoller = restorePoller;
6
+ const operations_js_1 = require("./api/managedOps/operations.js");
7
+ const pollingHelpers_js_1 = require("./static-helpers/pollingHelpers.js");
8
+ const core_lro_1 = require("@azure/core-lro");
9
+ /**
10
+ * Creates a poller from the serialized state of another poller. This can be
11
+ * useful when you want to create pollers on a different host or a poller
12
+ * needs to be constructed after the original one is not in scope.
13
+ */
14
+ function restorePoller(client, serializedState, sourceOperation, options) {
15
+ const pollerConfig = (0, core_lro_1.deserializeState)(serializedState).config;
16
+ const { initialRequestUrl, requestMethod, metadata } = pollerConfig;
17
+ if (!initialRequestUrl || !requestMethod) {
18
+ throw new Error(`Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`);
19
+ }
20
+ const resourceLocationConfig = metadata?.["resourceLocationConfig"];
21
+ const { deserializer, expectedStatuses = [] } = getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};
22
+ const deserializeHelper = options?.processResponseBody ?? deserializer;
23
+ if (!deserializeHelper) {
24
+ throw new Error(`Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`);
25
+ }
26
+ return (0, pollingHelpers_js_1.getLongRunningPoller)(client["_client"] ?? client, deserializeHelper, expectedStatuses, {
27
+ updateIntervalInMs: options?.updateIntervalInMs,
28
+ abortSignal: options?.abortSignal,
29
+ resourceLocationConfig,
30
+ restoreFrom: serializedState,
31
+ initialRequestUrl,
32
+ });
33
+ }
34
+ const deserializeMap = {
35
+ "DELETE /subscriptions/{subscriptionId}/providers/Microsoft.ManagedOps/managedOps/{managedOpsName}": { deserializer: operations_js_1._$deleteDeserialize, expectedStatuses: ["202", "204", "200", "201"] },
36
+ "PATCH /subscriptions/{subscriptionId}/providers/Microsoft.ManagedOps/managedOps/{managedOpsName}": { deserializer: operations_js_1._updateDeserialize, expectedStatuses: ["200", "202", "201"] },
37
+ "PUT /subscriptions/{subscriptionId}/providers/Microsoft.ManagedOps/managedOps/{managedOpsName}": { deserializer: operations_js_1._createOrUpdateDeserialize, expectedStatuses: ["200", "201", "202"] },
38
+ };
39
+ function getDeserializationHelper(urlStr, method) {
40
+ const path = new URL(urlStr).pathname;
41
+ const pathParts = path.split("/");
42
+ // Traverse list to match the longest candidate
43
+ // matchedLen: the length of candidate path
44
+ // matchedValue: the matched status code array
45
+ let matchedLen = -1, matchedValue;
46
+ // Iterate the responseMap to find a match
47
+ for (const [key, value] of Object.entries(deserializeMap)) {
48
+ // Extracting the path from the map key which is in format
49
+ // GET /path/foo
50
+ if (!key.startsWith(method)) {
51
+ continue;
52
+ }
53
+ const candidatePath = getPathFromMapKey(key);
54
+ // Get each part of the url path
55
+ const candidateParts = candidatePath.split("/");
56
+ // track if we have found a match to return the values found.
57
+ let found = true;
58
+ for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
59
+ if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) {
60
+ const start = candidateParts[i].indexOf("}") + 1, end = candidateParts[i]?.length;
61
+ // If the current part of the candidate is a "template" part
62
+ // Try to use the suffix of pattern to match the path
63
+ // {guid} ==> $
64
+ // {guid}:export ==> :export$
65
+ const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(pathParts[j] || "");
66
+ if (!isMatched) {
67
+ found = false;
68
+ break;
69
+ }
70
+ continue;
71
+ }
72
+ // If the candidate part is not a template and
73
+ // the parts don't match mark the candidate as not found
74
+ // to move on with the next candidate path.
75
+ if (candidateParts[i] !== pathParts[j]) {
76
+ found = false;
77
+ break;
78
+ }
79
+ }
80
+ // We finished evaluating the current candidate parts
81
+ // Update the matched value if and only if we found the longer pattern
82
+ if (found && candidatePath.length > matchedLen) {
83
+ matchedLen = candidatePath.length;
84
+ matchedValue = value;
85
+ }
86
+ }
87
+ return matchedValue;
88
+ }
89
+ function getPathFromMapKey(mapKey) {
90
+ const pathStart = mapKey.indexOf("/");
91
+ return mapKey.slice(pathStart);
92
+ }
93
+ //# sourceMappingURL=restorePollerHelpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"restorePollerHelpers.js","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAiClC,sCAoCC;AAlED,kEAIwC;AACxC,0EAA0E;AAI1E,8CAAmD;AAgBnD;;;;GAIG;AACH,SAAgB,aAAa,CAC3B,MAAwB,EACxB,eAAuB,EACvB,eAAiF,EACjF,OAAuC;IAEvC,MAAM,YAAY,GAAG,IAAA,2BAAgB,EAAC,eAAe,CAAC,CAAC,MAAM,CAAC;IAC9D,MAAM,EAAE,iBAAiB,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,YAAY,CAAC;IACpE,IAAI,CAAC,iBAAiB,IAAI,CAAC,aAAa,EAAE,CAAC;QACzC,MAAM,IAAI,KAAK,CACb,6BAA6B,eAAe,wBAAwB,eAAe,EAAE,IAAI,EAAE,CAC5F,CAAC;IACJ,CAAC;IACD,MAAM,sBAAsB,GAAG,QAAQ,EAAE,CAAC,wBAAwB,CAErD,CAAC;IACd,MAAM,EAAE,YAAY,EAAE,gBAAgB,GAAG,EAAE,EAAE,GAC3C,wBAAwB,CAAC,iBAAiB,EAAE,aAAa,CAAC,IAAI,EAAE,CAAC;IACnE,MAAM,iBAAiB,GAAG,OAAO,EAAE,mBAAmB,IAAI,YAAY,CAAC;IACvE,IAAI,CAAC,iBAAiB,EAAE,CAAC;Q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,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ManagedOpsClient } from \"./managedOpsClient.js\";\nimport {\n _$deleteDeserialize,\n _updateDeserialize,\n _createOrUpdateDeserialize,\n} from \"./api/managedOps/operations.js\";\nimport { getLongRunningPoller } from \"./static-helpers/pollingHelpers.js\";\nimport type { OperationOptions, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { PollerLike, OperationState, ResourceLocationConfig } from \"@azure/core-lro\";\nimport { deserializeState } from \"@azure/core-lro\";\n\nexport interface RestorePollerOptions<\n TResult,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n> extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /** Deserialization function for raw response body */\n processResponseBody?: (result: TResponse) => Promise<TResult>;\n}\n\n/**\n * Creates a poller from the serialized state of another poller. This can be\n * useful when you want to create pollers on a different host or a poller\n * needs to be constructed after the original one is not in scope.\n */\nexport function restorePoller<TResponse extends PathUncheckedResponse, TResult>(\n client: ManagedOpsClient,\n serializedState: string,\n sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>,\n options?: RestorePollerOptions<TResult>,\n): PollerLike<OperationState<TResult>, TResult> {\n const pollerConfig = deserializeState(serializedState).config;\n const { initialRequestUrl, requestMethod, metadata } = pollerConfig;\n if (!initialRequestUrl || !requestMethod) {\n throw new Error(\n `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`,\n );\n }\n const resourceLocationConfig = metadata?.[\"resourceLocationConfig\"] as\n | ResourceLocationConfig\n | undefined;\n const { deserializer, expectedStatuses = [] } =\n getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};\n const deserializeHelper = options?.processResponseBody ?? deserializer;\n if (!deserializeHelper) {\n throw new Error(\n `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`,\n );\n }\n return getLongRunningPoller(\n (client as any)[\"_client\"] ?? client,\n deserializeHelper as (result: TResponse) => Promise<TResult>,\n expectedStatuses,\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n resourceLocationConfig,\n restoreFrom: serializedState,\n initialRequestUrl,\n },\n );\n}\n\ninterface DeserializationHelper {\n deserializer: (result: PathUncheckedResponse) => Promise<any>;\n expectedStatuses: string[];\n}\n\nconst deserializeMap: Record<string, DeserializationHelper> = {\n \"DELETE /subscriptions/{subscriptionId}/providers/Microsoft.ManagedOps/managedOps/{managedOpsName}\":\n { deserializer: _$deleteDeserialize, expectedStatuses: [\"202\", \"204\", \"200\", \"201\"] },\n \"PATCH /subscriptions/{subscriptionId}/providers/Microsoft.ManagedOps/managedOps/{managedOpsName}\":\n { deserializer: _updateDeserialize, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"PUT /subscriptions/{subscriptionId}/providers/Microsoft.ManagedOps/managedOps/{managedOpsName}\":\n { deserializer: _createOrUpdateDeserialize, expectedStatuses: [\"200\", \"201\", \"202\"] },\n};\n\nfunction getDeserializationHelper(\n urlStr: string,\n method: string,\n): DeserializationHelper | undefined {\n const path = new URL(urlStr).pathname;\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: DeserializationHelper | undefined;\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(deserializeMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
@@ -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