@nutanix-scratch/monitoring-js-client 4.0.1-beta.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 (413) hide show
  1. package/LICENSE.txt +49 -0
  2. package/README.md +197 -0
  3. package/dist/Ntnx-Monitoring-js-client-prod.js +1 -0
  4. package/dist/Ntnx-Monitoring-js-client.js +1466 -0
  5. package/dist/es/ApiClient.d.ts +159 -0
  6. package/dist/es/ApiClient.js +1211 -0
  7. package/dist/es/Paginable.d.ts +95 -0
  8. package/dist/es/Paginable.js +287 -0
  9. package/dist/es/apis/alertemailconfiguration-endpoints.d.ts +41 -0
  10. package/dist/es/apis/alertemailconfiguration-endpoints.js +141 -0
  11. package/dist/es/apis/alerts-endpoints.d.ts +103 -0
  12. package/dist/es/apis/alerts-endpoints.js +201 -0
  13. package/dist/es/apis/audits-endpoints.d.ts +91 -0
  14. package/dist/es/apis/audits-endpoints.js +189 -0
  15. package/dist/es/apis/events-endpoints.d.ts +81 -0
  16. package/dist/es/apis/events-endpoints.js +179 -0
  17. package/dist/es/apis/managealerts-endpoints.d.ts +34 -0
  18. package/dist/es/apis/managealerts-endpoints.js +118 -0
  19. package/dist/es/apis/userdefinedpolicies-endpoints.d.ts +117 -0
  20. package/dist/es/apis/userdefinedpolicies-endpoints.js +345 -0
  21. package/dist/es/index.d.ts +198 -0
  22. package/dist/es/index.js +788 -0
  23. package/dist/es/models/common/v1/config/FQDN.d.ts +48 -0
  24. package/dist/es/models/common/v1/config/FQDN.js +242 -0
  25. package/dist/es/models/common/v1/config/Flag.d.ts +58 -0
  26. package/dist/es/models/common/v1/config/Flag.js +275 -0
  27. package/dist/es/models/common/v1/config/IPAddressOrFQDN.d.ts +72 -0
  28. package/dist/es/models/common/v1/config/IPAddressOrFQDN.js +332 -0
  29. package/dist/es/models/common/v1/config/IPv4Address.d.ts +62 -0
  30. package/dist/es/models/common/v1/config/IPv4Address.js +288 -0
  31. package/dist/es/models/common/v1/config/IPv6Address.d.ts +62 -0
  32. package/dist/es/models/common/v1/config/IPv6Address.js +288 -0
  33. package/dist/es/models/common/v1/config/KVPair.d.ts +62 -0
  34. package/dist/es/models/common/v1/config/KVPair.js +332 -0
  35. package/dist/es/models/common/v1/config/KVStringPair.d.ts +62 -0
  36. package/dist/es/models/common/v1/config/KVStringPair.js +280 -0
  37. package/dist/es/models/common/v1/config/Message.d.ts +84 -0
  38. package/dist/es/models/common/v1/config/Message.js +354 -0
  39. package/dist/es/models/common/v1/config/MessageSeverity.d.ts +19 -0
  40. package/dist/es/models/common/v1/config/MessageSeverity.js +91 -0
  41. package/dist/es/models/common/v1/config/TenantAwareModel.d.ts +50 -0
  42. package/dist/es/models/common/v1/config/TenantAwareModel.js +243 -0
  43. package/dist/es/models/common/v1/response/ApiLink.d.ts +62 -0
  44. package/dist/es/models/common/v1/response/ApiLink.js +280 -0
  45. package/dist/es/models/common/v1/response/ApiResponseMetadata.d.ts +98 -0
  46. package/dist/es/models/common/v1/response/ApiResponseMetadata.js +438 -0
  47. package/dist/es/models/common/v1/response/ExternalizableAbstractModel.d.ts +42 -0
  48. package/dist/es/models/common/v1/response/ExternalizableAbstractModel.js +270 -0
  49. package/dist/es/models/monitoring/v4/common/AlertEntityReference.d.ts +74 -0
  50. package/dist/es/models/monitoring/v4/common/AlertEntityReference.js +320 -0
  51. package/dist/es/models/monitoring/v4/common/BoolValue.d.ts +57 -0
  52. package/dist/es/models/monitoring/v4/common/BoolValue.js +246 -0
  53. package/dist/es/models/monitoring/v4/common/CauseAndResolution.d.ts +62 -0
  54. package/dist/es/models/monitoring/v4/common/CauseAndResolution.js +280 -0
  55. package/dist/es/models/monitoring/v4/common/ComparisonOperator.d.ts +19 -0
  56. package/dist/es/models/monitoring/v4/common/ComparisonOperator.js +103 -0
  57. package/dist/es/models/monitoring/v4/common/ConditionType.d.ts +19 -0
  58. package/dist/es/models/monitoring/v4/common/ConditionType.js +79 -0
  59. package/dist/es/models/monitoring/v4/common/DataType.d.ts +19 -0
  60. package/dist/es/models/monitoring/v4/common/DataType.js +97 -0
  61. package/dist/es/models/monitoring/v4/common/DoubleValue.d.ts +57 -0
  62. package/dist/es/models/monitoring/v4/common/DoubleValue.js +246 -0
  63. package/dist/es/models/monitoring/v4/common/EntityReference.d.ts +74 -0
  64. package/dist/es/models/monitoring/v4/common/EntityReference.js +321 -0
  65. package/dist/es/models/monitoring/v4/common/ImpactType.d.ts +19 -0
  66. package/dist/es/models/monitoring/v4/common/ImpactType.js +121 -0
  67. package/dist/es/models/monitoring/v4/common/IntValue.d.ts +57 -0
  68. package/dist/es/models/monitoring/v4/common/IntValue.js +247 -0
  69. package/dist/es/models/monitoring/v4/common/MetricDetail.d.ts +164 -0
  70. package/dist/es/models/monitoring/v4/common/MetricDetail.js +668 -0
  71. package/dist/es/models/monitoring/v4/common/OperationType.d.ts +19 -0
  72. package/dist/es/models/monitoring/v4/common/OperationType.js +307 -0
  73. package/dist/es/models/monitoring/v4/common/Parameter.d.ts +62 -0
  74. package/dist/es/models/monitoring/v4/common/Parameter.js +304 -0
  75. package/dist/es/models/monitoring/v4/common/Severity.d.ts +19 -0
  76. package/dist/es/models/monitoring/v4/common/Severity.js +91 -0
  77. package/dist/es/models/monitoring/v4/common/StringValue.d.ts +57 -0
  78. package/dist/es/models/monitoring/v4/common/StringValue.js +246 -0
  79. package/dist/es/models/monitoring/v4/error/AppMessage.d.ts +108 -0
  80. package/dist/es/models/monitoring/v4/error/AppMessage.js +432 -0
  81. package/dist/es/models/monitoring/v4/error/ErrorResponse.d.ts +48 -0
  82. package/dist/es/models/monitoring/v4/error/ErrorResponse.js +300 -0
  83. package/dist/es/models/monitoring/v4/error/SchemaValidationError.d.ts +98 -0
  84. package/dist/es/models/monitoring/v4/error/SchemaValidationError.js +407 -0
  85. package/dist/es/models/monitoring/v4/error/SchemaValidationErrorMessage.d.ts +74 -0
  86. package/dist/es/models/monitoring/v4/error/SchemaValidationErrorMessage.js +318 -0
  87. package/dist/es/models/monitoring/v4/serviceability/ActionType.d.ts +19 -0
  88. package/dist/es/models/monitoring/v4/serviceability/ActionType.js +85 -0
  89. package/dist/es/models/monitoring/v4/serviceability/Alert.d.ts +316 -0
  90. package/dist/es/models/monitoring/v4/serviceability/Alert.js +1232 -0
  91. package/dist/es/models/monitoring/v4/serviceability/AlertActionSpec.d.ts +59 -0
  92. package/dist/es/models/monitoring/v4/serviceability/AlertActionSpec.js +245 -0
  93. package/dist/es/models/monitoring/v4/serviceability/AlertConfigExceptionGroup.d.ts +72 -0
  94. package/dist/es/models/monitoring/v4/serviceability/AlertConfigExceptionGroup.js +337 -0
  95. package/dist/es/models/monitoring/v4/serviceability/AlertDb.d.ts +210 -0
  96. package/dist/es/models/monitoring/v4/serviceability/AlertDb.js +882 -0
  97. package/dist/es/models/monitoring/v4/serviceability/AlertDbProjection.d.ts +49 -0
  98. package/dist/es/models/monitoring/v4/serviceability/AlertDbProjection.js +300 -0
  99. package/dist/es/models/monitoring/v4/serviceability/AlertEmailConfiguration.d.ts +153 -0
  100. package/dist/es/models/monitoring/v4/serviceability/AlertEmailConfiguration.js +632 -0
  101. package/dist/es/models/monitoring/v4/serviceability/Audit.d.ts +166 -0
  102. package/dist/es/models/monitoring/v4/serviceability/Audit.js +702 -0
  103. package/dist/es/models/monitoring/v4/serviceability/AuditDb.d.ts +148 -0
  104. package/dist/es/models/monitoring/v4/serviceability/AuditDb.js +598 -0
  105. package/dist/es/models/monitoring/v4/serviceability/AuditDbProjection.d.ts +9 -0
  106. package/dist/es/models/monitoring/v4/serviceability/AuditDbProjection.js +133 -0
  107. package/dist/es/models/monitoring/v4/serviceability/AuditEntityReference.d.ts +74 -0
  108. package/dist/es/models/monitoring/v4/serviceability/AuditEntityReference.js +320 -0
  109. package/dist/es/models/monitoring/v4/serviceability/AutoResolve.d.ts +19 -0
  110. package/dist/es/models/monitoring/v4/serviceability/AutoResolve.js +91 -0
  111. package/dist/es/models/monitoring/v4/serviceability/CommunicationStatus.d.ts +94 -0
  112. package/dist/es/models/monitoring/v4/serviceability/CommunicationStatus.js +390 -0
  113. package/dist/es/models/monitoring/v4/serviceability/Condition.d.ts +92 -0
  114. package/dist/es/models/monitoring/v4/serviceability/Condition.js +357 -0
  115. package/dist/es/models/monitoring/v4/serviceability/ConflictingPolicy.d.ts +60 -0
  116. package/dist/es/models/monitoring/v4/serviceability/ConflictingPolicy.js +250 -0
  117. package/dist/es/models/monitoring/v4/serviceability/ConnectionStatus.d.ts +19 -0
  118. package/dist/es/models/monitoring/v4/serviceability/ConnectionStatus.js +97 -0
  119. package/dist/es/models/monitoring/v4/serviceability/CreateUdaPolicyApiResponse.d.ts +59 -0
  120. package/dist/es/models/monitoring/v4/serviceability/CreateUdaPolicyApiResponse.js +311 -0
  121. package/dist/es/models/monitoring/v4/serviceability/DeleteUdaPolicyApiResponse.d.ts +59 -0
  122. package/dist/es/models/monitoring/v4/serviceability/DeleteUdaPolicyApiResponse.js +313 -0
  123. package/dist/es/models/monitoring/v4/serviceability/EmailConfigurationRule.d.ts +116 -0
  124. package/dist/es/models/monitoring/v4/serviceability/EmailConfigurationRule.js +507 -0
  125. package/dist/es/models/monitoring/v4/serviceability/EmailTemplate.d.ts +62 -0
  126. package/dist/es/models/monitoring/v4/serviceability/EmailTemplate.js +283 -0
  127. package/dist/es/models/monitoring/v4/serviceability/EntityFilter.d.ts +60 -0
  128. package/dist/es/models/monitoring/v4/serviceability/EntityFilter.js +250 -0
  129. package/dist/es/models/monitoring/v4/serviceability/Event.d.ts +150 -0
  130. package/dist/es/models/monitoring/v4/serviceability/Event.js +663 -0
  131. package/dist/es/models/monitoring/v4/serviceability/EventDb.d.ts +108 -0
  132. package/dist/es/models/monitoring/v4/serviceability/EventDb.js +463 -0
  133. package/dist/es/models/monitoring/v4/serviceability/EventDbProjection.d.ts +9 -0
  134. package/dist/es/models/monitoring/v4/serviceability/EventDbProjection.js +130 -0
  135. package/dist/es/models/monitoring/v4/serviceability/EventEntityReference.d.ts +74 -0
  136. package/dist/es/models/monitoring/v4/serviceability/EventEntityReference.js +320 -0
  137. package/dist/es/models/monitoring/v4/serviceability/FindConflictingUdaPoliciesApiResponse.d.ts +59 -0
  138. package/dist/es/models/monitoring/v4/serviceability/FindConflictingUdaPoliciesApiResponse.js +333 -0
  139. package/dist/es/models/monitoring/v4/serviceability/GetAlertApiResponse.d.ts +59 -0
  140. package/dist/es/models/monitoring/v4/serviceability/GetAlertApiResponse.js +311 -0
  141. package/dist/es/models/monitoring/v4/serviceability/GetAlertEmailConfigurationApiResponse.d.ts +59 -0
  142. package/dist/es/models/monitoring/v4/serviceability/GetAlertEmailConfigurationApiResponse.js +311 -0
  143. package/dist/es/models/monitoring/v4/serviceability/GetAuditApiResponse.d.ts +59 -0
  144. package/dist/es/models/monitoring/v4/serviceability/GetAuditApiResponse.js +311 -0
  145. package/dist/es/models/monitoring/v4/serviceability/GetEventApiResponse.d.ts +59 -0
  146. package/dist/es/models/monitoring/v4/serviceability/GetEventApiResponse.js +311 -0
  147. package/dist/es/models/monitoring/v4/serviceability/GetUdaPolicyApiResponse.d.ts +59 -0
  148. package/dist/es/models/monitoring/v4/serviceability/GetUdaPolicyApiResponse.js +311 -0
  149. package/dist/es/models/monitoring/v4/serviceability/GroupEntityType.d.ts +19 -0
  150. package/dist/es/models/monitoring/v4/serviceability/GroupEntityType.js +85 -0
  151. package/dist/es/models/monitoring/v4/serviceability/GroupFilter.d.ts +75 -0
  152. package/dist/es/models/monitoring/v4/serviceability/GroupFilter.js +291 -0
  153. package/dist/es/models/monitoring/v4/serviceability/HttpProxy.d.ts +110 -0
  154. package/dist/es/models/monitoring/v4/serviceability/HttpProxy.js +445 -0
  155. package/dist/es/models/monitoring/v4/serviceability/ListAlertsApiResponse.d.ts +59 -0
  156. package/dist/es/models/monitoring/v4/serviceability/ListAlertsApiResponse.js +333 -0
  157. package/dist/es/models/monitoring/v4/serviceability/ListAuditsApiResponse.d.ts +59 -0
  158. package/dist/es/models/monitoring/v4/serviceability/ListAuditsApiResponse.js +333 -0
  159. package/dist/es/models/monitoring/v4/serviceability/ListEventsApiResponse.d.ts +59 -0
  160. package/dist/es/models/monitoring/v4/serviceability/ListEventsApiResponse.js +333 -0
  161. package/dist/es/models/monitoring/v4/serviceability/ListUdaPoliciesApiResponse.d.ts +59 -0
  162. package/dist/es/models/monitoring/v4/serviceability/ListUdaPoliciesApiResponse.js +333 -0
  163. package/dist/es/models/monitoring/v4/serviceability/ManageAlertApiResponse.d.ts +59 -0
  164. package/dist/es/models/monitoring/v4/serviceability/ManageAlertApiResponse.js +311 -0
  165. package/dist/es/models/monitoring/v4/serviceability/ManageAlertsApiResponse.d.ts +59 -0
  166. package/dist/es/models/monitoring/v4/serviceability/ManageAlertsApiResponse.js +311 -0
  167. package/dist/es/models/monitoring/v4/serviceability/ParameterizedMessage.d.ts +58 -0
  168. package/dist/es/models/monitoring/v4/serviceability/ParameterizedMessage.js +285 -0
  169. package/dist/es/models/monitoring/v4/serviceability/PolicySeverityLevel.d.ts +19 -0
  170. package/dist/es/models/monitoring/v4/serviceability/PolicySeverityLevel.js +85 -0
  171. package/dist/es/models/monitoring/v4/serviceability/ProxyType.d.ts +19 -0
  172. package/dist/es/models/monitoring/v4/serviceability/ProxyType.js +91 -0
  173. package/dist/es/models/monitoring/v4/serviceability/RelatedPolicy.d.ts +76 -0
  174. package/dist/es/models/monitoring/v4/serviceability/RelatedPolicy.js +298 -0
  175. package/dist/es/models/monitoring/v4/serviceability/RemoteTunnelDetails.d.ts +78 -0
  176. package/dist/es/models/monitoring/v4/serviceability/RemoteTunnelDetails.js +347 -0
  177. package/dist/es/models/monitoring/v4/serviceability/RootCauseAnalysis.d.ts +56 -0
  178. package/dist/es/models/monitoring/v4/serviceability/RootCauseAnalysis.js +300 -0
  179. package/dist/es/models/monitoring/v4/serviceability/RootCauseAnalysisProjection.d.ts +9 -0
  180. package/dist/es/models/monitoring/v4/serviceability/RootCauseAnalysisProjection.js +129 -0
  181. package/dist/es/models/monitoring/v4/serviceability/ServiceCenter.d.ts +88 -0
  182. package/dist/es/models/monitoring/v4/serviceability/ServiceCenter.js +367 -0
  183. package/dist/es/models/monitoring/v4/serviceability/SeverityThresholdInfo.d.ts +60 -0
  184. package/dist/es/models/monitoring/v4/serviceability/SeverityThresholdInfo.js +278 -0
  185. package/dist/es/models/monitoring/v4/serviceability/SeverityTrail.d.ts +60 -0
  186. package/dist/es/models/monitoring/v4/serviceability/SeverityTrail.js +278 -0
  187. package/dist/es/models/monitoring/v4/serviceability/Status.d.ts +19 -0
  188. package/dist/es/models/monitoring/v4/serviceability/Status.js +91 -0
  189. package/dist/es/models/monitoring/v4/serviceability/TriggerCondition.d.ts +88 -0
  190. package/dist/es/models/monitoring/v4/serviceability/TriggerCondition.js +326 -0
  191. package/dist/es/models/monitoring/v4/serviceability/UpdateAlertEmailConfigurationApiResponse.d.ts +59 -0
  192. package/dist/es/models/monitoring/v4/serviceability/UpdateAlertEmailConfigurationApiResponse.js +311 -0
  193. package/dist/es/models/monitoring/v4/serviceability/UpdateSdaPolicyApiResponse.d.ts +59 -0
  194. package/dist/es/models/monitoring/v4/serviceability/UpdateSdaPolicyApiResponse.js +311 -0
  195. package/dist/es/models/monitoring/v4/serviceability/UpdateUdaPolicyApiResponse.d.ts +59 -0
  196. package/dist/es/models/monitoring/v4/serviceability/UpdateUdaPolicyApiResponse.js +311 -0
  197. package/dist/es/models/monitoring/v4/serviceability/UserDefinedPolicy.d.ts +207 -0
  198. package/dist/es/models/monitoring/v4/serviceability/UserDefinedPolicy.js +843 -0
  199. package/dist/es/models/monitoring/v4/serviceability/UserReference.d.ts +74 -0
  200. package/dist/es/models/monitoring/v4/serviceability/UserReference.js +324 -0
  201. package/dist/es/models/prism/v4/config/TaskReference.d.ts +50 -0
  202. package/dist/es/models/prism/v4/config/TaskReference.js +249 -0
  203. package/dist/es/models/validation/ValidationError.d.ts +13 -0
  204. package/dist/es/models/validation/ValidationError.js +60 -0
  205. package/dist/es/models/validation/ValidationScopes.d.ts +9 -0
  206. package/dist/es/models/validation/ValidationScopes.js +38 -0
  207. package/dist/es/utils/ValidationUtils.d.ts +13 -0
  208. package/dist/es/utils/ValidationUtils.js +85 -0
  209. package/dist/lib/ApiClient.d.ts +159 -0
  210. package/dist/lib/ApiClient.js +1211 -0
  211. package/dist/lib/Paginable.d.ts +95 -0
  212. package/dist/lib/Paginable.js +287 -0
  213. package/dist/lib/apis/alertemailconfiguration-endpoints.d.ts +41 -0
  214. package/dist/lib/apis/alertemailconfiguration-endpoints.js +141 -0
  215. package/dist/lib/apis/alerts-endpoints.d.ts +103 -0
  216. package/dist/lib/apis/alerts-endpoints.js +201 -0
  217. package/dist/lib/apis/audits-endpoints.d.ts +91 -0
  218. package/dist/lib/apis/audits-endpoints.js +189 -0
  219. package/dist/lib/apis/events-endpoints.d.ts +81 -0
  220. package/dist/lib/apis/events-endpoints.js +179 -0
  221. package/dist/lib/apis/managealerts-endpoints.d.ts +34 -0
  222. package/dist/lib/apis/managealerts-endpoints.js +118 -0
  223. package/dist/lib/apis/userdefinedpolicies-endpoints.d.ts +117 -0
  224. package/dist/lib/apis/userdefinedpolicies-endpoints.js +345 -0
  225. package/dist/lib/index.d.ts +198 -0
  226. package/dist/lib/index.js +788 -0
  227. package/dist/lib/models/common/v1/config/FQDN.d.ts +48 -0
  228. package/dist/lib/models/common/v1/config/FQDN.js +242 -0
  229. package/dist/lib/models/common/v1/config/Flag.d.ts +58 -0
  230. package/dist/lib/models/common/v1/config/Flag.js +275 -0
  231. package/dist/lib/models/common/v1/config/IPAddressOrFQDN.d.ts +72 -0
  232. package/dist/lib/models/common/v1/config/IPAddressOrFQDN.js +332 -0
  233. package/dist/lib/models/common/v1/config/IPv4Address.d.ts +62 -0
  234. package/dist/lib/models/common/v1/config/IPv4Address.js +288 -0
  235. package/dist/lib/models/common/v1/config/IPv6Address.d.ts +62 -0
  236. package/dist/lib/models/common/v1/config/IPv6Address.js +288 -0
  237. package/dist/lib/models/common/v1/config/KVPair.d.ts +62 -0
  238. package/dist/lib/models/common/v1/config/KVPair.js +332 -0
  239. package/dist/lib/models/common/v1/config/KVStringPair.d.ts +62 -0
  240. package/dist/lib/models/common/v1/config/KVStringPair.js +280 -0
  241. package/dist/lib/models/common/v1/config/Message.d.ts +84 -0
  242. package/dist/lib/models/common/v1/config/Message.js +354 -0
  243. package/dist/lib/models/common/v1/config/MessageSeverity.d.ts +19 -0
  244. package/dist/lib/models/common/v1/config/MessageSeverity.js +91 -0
  245. package/dist/lib/models/common/v1/config/TenantAwareModel.d.ts +50 -0
  246. package/dist/lib/models/common/v1/config/TenantAwareModel.js +243 -0
  247. package/dist/lib/models/common/v1/response/ApiLink.d.ts +62 -0
  248. package/dist/lib/models/common/v1/response/ApiLink.js +280 -0
  249. package/dist/lib/models/common/v1/response/ApiResponseMetadata.d.ts +98 -0
  250. package/dist/lib/models/common/v1/response/ApiResponseMetadata.js +438 -0
  251. package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.d.ts +42 -0
  252. package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.js +270 -0
  253. package/dist/lib/models/monitoring/v4/common/AlertEntityReference.d.ts +74 -0
  254. package/dist/lib/models/monitoring/v4/common/AlertEntityReference.js +320 -0
  255. package/dist/lib/models/monitoring/v4/common/BoolValue.d.ts +57 -0
  256. package/dist/lib/models/monitoring/v4/common/BoolValue.js +246 -0
  257. package/dist/lib/models/monitoring/v4/common/CauseAndResolution.d.ts +62 -0
  258. package/dist/lib/models/monitoring/v4/common/CauseAndResolution.js +280 -0
  259. package/dist/lib/models/monitoring/v4/common/ComparisonOperator.d.ts +19 -0
  260. package/dist/lib/models/monitoring/v4/common/ComparisonOperator.js +103 -0
  261. package/dist/lib/models/monitoring/v4/common/ConditionType.d.ts +19 -0
  262. package/dist/lib/models/monitoring/v4/common/ConditionType.js +79 -0
  263. package/dist/lib/models/monitoring/v4/common/DataType.d.ts +19 -0
  264. package/dist/lib/models/monitoring/v4/common/DataType.js +97 -0
  265. package/dist/lib/models/monitoring/v4/common/DoubleValue.d.ts +57 -0
  266. package/dist/lib/models/monitoring/v4/common/DoubleValue.js +246 -0
  267. package/dist/lib/models/monitoring/v4/common/EntityReference.d.ts +74 -0
  268. package/dist/lib/models/monitoring/v4/common/EntityReference.js +321 -0
  269. package/dist/lib/models/monitoring/v4/common/ImpactType.d.ts +19 -0
  270. package/dist/lib/models/monitoring/v4/common/ImpactType.js +121 -0
  271. package/dist/lib/models/monitoring/v4/common/IntValue.d.ts +57 -0
  272. package/dist/lib/models/monitoring/v4/common/IntValue.js +247 -0
  273. package/dist/lib/models/monitoring/v4/common/MetricDetail.d.ts +164 -0
  274. package/dist/lib/models/monitoring/v4/common/MetricDetail.js +668 -0
  275. package/dist/lib/models/monitoring/v4/common/OperationType.d.ts +19 -0
  276. package/dist/lib/models/monitoring/v4/common/OperationType.js +307 -0
  277. package/dist/lib/models/monitoring/v4/common/Parameter.d.ts +62 -0
  278. package/dist/lib/models/monitoring/v4/common/Parameter.js +304 -0
  279. package/dist/lib/models/monitoring/v4/common/Severity.d.ts +19 -0
  280. package/dist/lib/models/monitoring/v4/common/Severity.js +91 -0
  281. package/dist/lib/models/monitoring/v4/common/StringValue.d.ts +57 -0
  282. package/dist/lib/models/monitoring/v4/common/StringValue.js +246 -0
  283. package/dist/lib/models/monitoring/v4/error/AppMessage.d.ts +108 -0
  284. package/dist/lib/models/monitoring/v4/error/AppMessage.js +432 -0
  285. package/dist/lib/models/monitoring/v4/error/ErrorResponse.d.ts +48 -0
  286. package/dist/lib/models/monitoring/v4/error/ErrorResponse.js +300 -0
  287. package/dist/lib/models/monitoring/v4/error/SchemaValidationError.d.ts +98 -0
  288. package/dist/lib/models/monitoring/v4/error/SchemaValidationError.js +407 -0
  289. package/dist/lib/models/monitoring/v4/error/SchemaValidationErrorMessage.d.ts +74 -0
  290. package/dist/lib/models/monitoring/v4/error/SchemaValidationErrorMessage.js +318 -0
  291. package/dist/lib/models/monitoring/v4/serviceability/ActionType.d.ts +19 -0
  292. package/dist/lib/models/monitoring/v4/serviceability/ActionType.js +85 -0
  293. package/dist/lib/models/monitoring/v4/serviceability/Alert.d.ts +316 -0
  294. package/dist/lib/models/monitoring/v4/serviceability/Alert.js +1232 -0
  295. package/dist/lib/models/monitoring/v4/serviceability/AlertActionSpec.d.ts +59 -0
  296. package/dist/lib/models/monitoring/v4/serviceability/AlertActionSpec.js +245 -0
  297. package/dist/lib/models/monitoring/v4/serviceability/AlertConfigExceptionGroup.d.ts +72 -0
  298. package/dist/lib/models/monitoring/v4/serviceability/AlertConfigExceptionGroup.js +337 -0
  299. package/dist/lib/models/monitoring/v4/serviceability/AlertDb.d.ts +210 -0
  300. package/dist/lib/models/monitoring/v4/serviceability/AlertDb.js +882 -0
  301. package/dist/lib/models/monitoring/v4/serviceability/AlertDbProjection.d.ts +49 -0
  302. package/dist/lib/models/monitoring/v4/serviceability/AlertDbProjection.js +300 -0
  303. package/dist/lib/models/monitoring/v4/serviceability/AlertEmailConfiguration.d.ts +153 -0
  304. package/dist/lib/models/monitoring/v4/serviceability/AlertEmailConfiguration.js +632 -0
  305. package/dist/lib/models/monitoring/v4/serviceability/Audit.d.ts +166 -0
  306. package/dist/lib/models/monitoring/v4/serviceability/Audit.js +702 -0
  307. package/dist/lib/models/monitoring/v4/serviceability/AuditDb.d.ts +148 -0
  308. package/dist/lib/models/monitoring/v4/serviceability/AuditDb.js +598 -0
  309. package/dist/lib/models/monitoring/v4/serviceability/AuditDbProjection.d.ts +9 -0
  310. package/dist/lib/models/monitoring/v4/serviceability/AuditDbProjection.js +133 -0
  311. package/dist/lib/models/monitoring/v4/serviceability/AuditEntityReference.d.ts +74 -0
  312. package/dist/lib/models/monitoring/v4/serviceability/AuditEntityReference.js +320 -0
  313. package/dist/lib/models/monitoring/v4/serviceability/AutoResolve.d.ts +19 -0
  314. package/dist/lib/models/monitoring/v4/serviceability/AutoResolve.js +91 -0
  315. package/dist/lib/models/monitoring/v4/serviceability/CommunicationStatus.d.ts +94 -0
  316. package/dist/lib/models/monitoring/v4/serviceability/CommunicationStatus.js +390 -0
  317. package/dist/lib/models/monitoring/v4/serviceability/Condition.d.ts +92 -0
  318. package/dist/lib/models/monitoring/v4/serviceability/Condition.js +357 -0
  319. package/dist/lib/models/monitoring/v4/serviceability/ConflictingPolicy.d.ts +60 -0
  320. package/dist/lib/models/monitoring/v4/serviceability/ConflictingPolicy.js +250 -0
  321. package/dist/lib/models/monitoring/v4/serviceability/ConnectionStatus.d.ts +19 -0
  322. package/dist/lib/models/monitoring/v4/serviceability/ConnectionStatus.js +97 -0
  323. package/dist/lib/models/monitoring/v4/serviceability/CreateUdaPolicyApiResponse.d.ts +59 -0
  324. package/dist/lib/models/monitoring/v4/serviceability/CreateUdaPolicyApiResponse.js +311 -0
  325. package/dist/lib/models/monitoring/v4/serviceability/DeleteUdaPolicyApiResponse.d.ts +59 -0
  326. package/dist/lib/models/monitoring/v4/serviceability/DeleteUdaPolicyApiResponse.js +313 -0
  327. package/dist/lib/models/monitoring/v4/serviceability/EmailConfigurationRule.d.ts +116 -0
  328. package/dist/lib/models/monitoring/v4/serviceability/EmailConfigurationRule.js +507 -0
  329. package/dist/lib/models/monitoring/v4/serviceability/EmailTemplate.d.ts +62 -0
  330. package/dist/lib/models/monitoring/v4/serviceability/EmailTemplate.js +283 -0
  331. package/dist/lib/models/monitoring/v4/serviceability/EntityFilter.d.ts +60 -0
  332. package/dist/lib/models/monitoring/v4/serviceability/EntityFilter.js +250 -0
  333. package/dist/lib/models/monitoring/v4/serviceability/Event.d.ts +150 -0
  334. package/dist/lib/models/monitoring/v4/serviceability/Event.js +663 -0
  335. package/dist/lib/models/monitoring/v4/serviceability/EventDb.d.ts +108 -0
  336. package/dist/lib/models/monitoring/v4/serviceability/EventDb.js +463 -0
  337. package/dist/lib/models/monitoring/v4/serviceability/EventDbProjection.d.ts +9 -0
  338. package/dist/lib/models/monitoring/v4/serviceability/EventDbProjection.js +130 -0
  339. package/dist/lib/models/monitoring/v4/serviceability/EventEntityReference.d.ts +74 -0
  340. package/dist/lib/models/monitoring/v4/serviceability/EventEntityReference.js +320 -0
  341. package/dist/lib/models/monitoring/v4/serviceability/FindConflictingUdaPoliciesApiResponse.d.ts +59 -0
  342. package/dist/lib/models/monitoring/v4/serviceability/FindConflictingUdaPoliciesApiResponse.js +333 -0
  343. package/dist/lib/models/monitoring/v4/serviceability/GetAlertApiResponse.d.ts +59 -0
  344. package/dist/lib/models/monitoring/v4/serviceability/GetAlertApiResponse.js +311 -0
  345. package/dist/lib/models/monitoring/v4/serviceability/GetAlertEmailConfigurationApiResponse.d.ts +59 -0
  346. package/dist/lib/models/monitoring/v4/serviceability/GetAlertEmailConfigurationApiResponse.js +311 -0
  347. package/dist/lib/models/monitoring/v4/serviceability/GetAuditApiResponse.d.ts +59 -0
  348. package/dist/lib/models/monitoring/v4/serviceability/GetAuditApiResponse.js +311 -0
  349. package/dist/lib/models/monitoring/v4/serviceability/GetEventApiResponse.d.ts +59 -0
  350. package/dist/lib/models/monitoring/v4/serviceability/GetEventApiResponse.js +311 -0
  351. package/dist/lib/models/monitoring/v4/serviceability/GetUdaPolicyApiResponse.d.ts +59 -0
  352. package/dist/lib/models/monitoring/v4/serviceability/GetUdaPolicyApiResponse.js +311 -0
  353. package/dist/lib/models/monitoring/v4/serviceability/GroupEntityType.d.ts +19 -0
  354. package/dist/lib/models/monitoring/v4/serviceability/GroupEntityType.js +85 -0
  355. package/dist/lib/models/monitoring/v4/serviceability/GroupFilter.d.ts +75 -0
  356. package/dist/lib/models/monitoring/v4/serviceability/GroupFilter.js +291 -0
  357. package/dist/lib/models/monitoring/v4/serviceability/HttpProxy.d.ts +110 -0
  358. package/dist/lib/models/monitoring/v4/serviceability/HttpProxy.js +445 -0
  359. package/dist/lib/models/monitoring/v4/serviceability/ListAlertsApiResponse.d.ts +59 -0
  360. package/dist/lib/models/monitoring/v4/serviceability/ListAlertsApiResponse.js +333 -0
  361. package/dist/lib/models/monitoring/v4/serviceability/ListAuditsApiResponse.d.ts +59 -0
  362. package/dist/lib/models/monitoring/v4/serviceability/ListAuditsApiResponse.js +333 -0
  363. package/dist/lib/models/monitoring/v4/serviceability/ListEventsApiResponse.d.ts +59 -0
  364. package/dist/lib/models/monitoring/v4/serviceability/ListEventsApiResponse.js +333 -0
  365. package/dist/lib/models/monitoring/v4/serviceability/ListUdaPoliciesApiResponse.d.ts +59 -0
  366. package/dist/lib/models/monitoring/v4/serviceability/ListUdaPoliciesApiResponse.js +333 -0
  367. package/dist/lib/models/monitoring/v4/serviceability/ManageAlertApiResponse.d.ts +59 -0
  368. package/dist/lib/models/monitoring/v4/serviceability/ManageAlertApiResponse.js +311 -0
  369. package/dist/lib/models/monitoring/v4/serviceability/ManageAlertsApiResponse.d.ts +59 -0
  370. package/dist/lib/models/monitoring/v4/serviceability/ManageAlertsApiResponse.js +311 -0
  371. package/dist/lib/models/monitoring/v4/serviceability/ParameterizedMessage.d.ts +58 -0
  372. package/dist/lib/models/monitoring/v4/serviceability/ParameterizedMessage.js +285 -0
  373. package/dist/lib/models/monitoring/v4/serviceability/PolicySeverityLevel.d.ts +19 -0
  374. package/dist/lib/models/monitoring/v4/serviceability/PolicySeverityLevel.js +85 -0
  375. package/dist/lib/models/monitoring/v4/serviceability/ProxyType.d.ts +19 -0
  376. package/dist/lib/models/monitoring/v4/serviceability/ProxyType.js +91 -0
  377. package/dist/lib/models/monitoring/v4/serviceability/RelatedPolicy.d.ts +76 -0
  378. package/dist/lib/models/monitoring/v4/serviceability/RelatedPolicy.js +298 -0
  379. package/dist/lib/models/monitoring/v4/serviceability/RemoteTunnelDetails.d.ts +78 -0
  380. package/dist/lib/models/monitoring/v4/serviceability/RemoteTunnelDetails.js +347 -0
  381. package/dist/lib/models/monitoring/v4/serviceability/RootCauseAnalysis.d.ts +56 -0
  382. package/dist/lib/models/monitoring/v4/serviceability/RootCauseAnalysis.js +300 -0
  383. package/dist/lib/models/monitoring/v4/serviceability/RootCauseAnalysisProjection.d.ts +9 -0
  384. package/dist/lib/models/monitoring/v4/serviceability/RootCauseAnalysisProjection.js +129 -0
  385. package/dist/lib/models/monitoring/v4/serviceability/ServiceCenter.d.ts +88 -0
  386. package/dist/lib/models/monitoring/v4/serviceability/ServiceCenter.js +367 -0
  387. package/dist/lib/models/monitoring/v4/serviceability/SeverityThresholdInfo.d.ts +60 -0
  388. package/dist/lib/models/monitoring/v4/serviceability/SeverityThresholdInfo.js +278 -0
  389. package/dist/lib/models/monitoring/v4/serviceability/SeverityTrail.d.ts +60 -0
  390. package/dist/lib/models/monitoring/v4/serviceability/SeverityTrail.js +278 -0
  391. package/dist/lib/models/monitoring/v4/serviceability/Status.d.ts +19 -0
  392. package/dist/lib/models/monitoring/v4/serviceability/Status.js +91 -0
  393. package/dist/lib/models/monitoring/v4/serviceability/TriggerCondition.d.ts +88 -0
  394. package/dist/lib/models/monitoring/v4/serviceability/TriggerCondition.js +326 -0
  395. package/dist/lib/models/monitoring/v4/serviceability/UpdateAlertEmailConfigurationApiResponse.d.ts +59 -0
  396. package/dist/lib/models/monitoring/v4/serviceability/UpdateAlertEmailConfigurationApiResponse.js +311 -0
  397. package/dist/lib/models/monitoring/v4/serviceability/UpdateSdaPolicyApiResponse.d.ts +59 -0
  398. package/dist/lib/models/monitoring/v4/serviceability/UpdateSdaPolicyApiResponse.js +311 -0
  399. package/dist/lib/models/monitoring/v4/serviceability/UpdateUdaPolicyApiResponse.d.ts +59 -0
  400. package/dist/lib/models/monitoring/v4/serviceability/UpdateUdaPolicyApiResponse.js +311 -0
  401. package/dist/lib/models/monitoring/v4/serviceability/UserDefinedPolicy.d.ts +207 -0
  402. package/dist/lib/models/monitoring/v4/serviceability/UserDefinedPolicy.js +843 -0
  403. package/dist/lib/models/monitoring/v4/serviceability/UserReference.d.ts +74 -0
  404. package/dist/lib/models/monitoring/v4/serviceability/UserReference.js +324 -0
  405. package/dist/lib/models/prism/v4/config/TaskReference.d.ts +50 -0
  406. package/dist/lib/models/prism/v4/config/TaskReference.js +249 -0
  407. package/dist/lib/models/validation/ValidationError.d.ts +13 -0
  408. package/dist/lib/models/validation/ValidationError.js +60 -0
  409. package/dist/lib/models/validation/ValidationScopes.d.ts +9 -0
  410. package/dist/lib/models/validation/ValidationScopes.js +38 -0
  411. package/dist/lib/utils/ValidationUtils.d.ts +13 -0
  412. package/dist/lib/utils/ValidationUtils.js +85 -0
  413. package/package.json +53 -0
@@ -0,0 +1,357 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ComparisonOperator = _interopRequireDefault(require("../common/ComparisonOperator"));
8
+ var _DoubleValue = _interopRequireDefault(require("../common/DoubleValue"));
9
+ var _IntValue = _interopRequireDefault(require("../common/IntValue"));
10
+ var _ValidationScopes = _interopRequireDefault(require("../../../validation/ValidationScopes"));
11
+ var _ValidationUtils = _interopRequireDefault(require("../../../../utils/ValidationUtils"));
12
+ var _ValidationError = _interopRequireDefault(require("../../../validation/ValidationError"));
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
15
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
16
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
17
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
18
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
19
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
20
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
21
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
22
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
23
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
24
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
25
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
26
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
27
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
28
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
29
+ function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
30
+ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
31
+ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } /*
32
+ * Nutanix Monitoring Versioned APIs
33
+ *
34
+ * OpenAPI spec version: 4.0.1-beta-1
35
+ *
36
+ * NOTE: This class is auto generated by the Open API Dev Platform.
37
+ *
38
+ * Open API Dev Platform Codegen version: 16.8.0.7344-RELEASE
39
+ *
40
+ * Do not edit the class manually.
41
+ *
42
+ */
43
+ /**
44
+ * The Condition model module.
45
+ * @module Ntnx/Condition
46
+ * @version 4.0.1-beta-1
47
+ * @class Condition
48
+ *
49
+ * @param { String } metricName The metric key. Allowed values of metrics list can be found at https://portal.nutanix.com/page/documents/details?targetId=Prism-Central-Guide-vpc_2022_9:mul-alerts-user-created-metrics-r.html
50
+ *
51
+ * @param { ComparisonOperator } operator
52
+ * @param { DoubleValue | IntValue } thresholdValue The threshold value that was used for the condition evaluation.
53
+ *
54
+ */
55
+ var _Condition_brand = /*#__PURE__*/new WeakSet();
56
+ var Condition = exports["default"] = /*#__PURE__*/function () {
57
+ /**
58
+ * Constructs a new <code>Condition</code>.
59
+ * @alias module:Ntnx/Condition
60
+ *
61
+ * @param { String } metricName The metric key. Allowed values of metrics list can be found at https://portal.nutanix.com/page/documents/details?targetId=Prism-Central-Guide-vpc_2022_9:mul-alerts-user-created-metrics-r.html
62
+ *
63
+ * @param { ComparisonOperator } operator
64
+ * @param { DoubleValue | IntValue } thresholdValue The threshold value that was used for the condition evaluation.
65
+ *
66
+ */
67
+ function Condition(metricName, operator, thresholdValue) {
68
+ _classCallCheck(this, Condition);
69
+ /*
70
+ * toJson method for a map type which supports map with primitive keys and values of object types
71
+ * @param {Object} obj
72
+ * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.
73
+ * Otherwise, just returns the input object.
74
+ */
75
+ _classPrivateMethodInitSpec(this, _Condition_brand);
76
+ this.metricName = metricName;
77
+ this.operator = operator;
78
+ this.thresholdValue = thresholdValue;
79
+ this.$objectType = "monitoring.v4.serviceability.Condition";
80
+ this.$reserved = {
81
+ '$fv': "v4.r0.b1"
82
+ };
83
+ this.$unknownFields = {};
84
+ }
85
+
86
+ /**
87
+ * Constructs a <code>Condition</code> from a plain JavaScript object, optionally creating a new instance.
88
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
89
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
90
+ * @param {module:Ntnx/Condition} obj Optional instance to populate.
91
+ * @param callFromChild {Boolean} Flag to recognise calling instance
92
+ * @return {module:Ntnx/Condition} The populated <code>Condition</code> instance.
93
+ */
94
+ return _createClass(Condition, [{
95
+ key: "getMetricName",
96
+ value:
97
+ /**
98
+ * Returns The metric key. Allowed values of metrics list can be found at https://portal.nutanix.com/page/documents/details?targetId=Prism-Central-Guide-vpc_2022_9:mul-alerts-user-created-metrics-r.html
99
+ * @return {}
100
+ */
101
+ function getMetricName() {
102
+ return this.metricName;
103
+ }
104
+
105
+ /**
106
+ * Sets The metric key. Allowed values of metrics list can be found at https://portal.nutanix.com/page/documents/details?targetId=Prism-Central-Guide-vpc_2022_9:mul-alerts-user-created-metrics-r.html
107
+ * @param {} metricName The metric key. Allowed values of metrics list can be found at https://portal.nutanix.com/page/documents/details?targetId=Prism-Central-Guide-vpc_2022_9:mul-alerts-user-created-metrics-r.html
108
+ */
109
+ }, {
110
+ key: "setMetricName",
111
+ value: function setMetricName(metricName) {
112
+ this.metricName = metricName;
113
+ }
114
+
115
+ /**
116
+ * @return {}
117
+ */
118
+ }, {
119
+ key: "getOperator",
120
+ value: function getOperator() {
121
+ return this.operator;
122
+ }
123
+
124
+ /**
125
+ * @param {} operator
126
+ */
127
+ }, {
128
+ key: "setOperator",
129
+ value: function setOperator(operator) {
130
+ this.operator = operator;
131
+ }
132
+
133
+ /**
134
+ * Returns The threshold value that was used for the condition evaluation.
135
+ * @return {}
136
+ */
137
+ }, {
138
+ key: "getThresholdValue",
139
+ value: function getThresholdValue() {
140
+ return this.thresholdValue;
141
+ }
142
+
143
+ /**
144
+ * Sets The threshold value that was used for the condition evaluation.
145
+ * @param {} thresholdValue The threshold value that was used for the condition evaluation.
146
+ */
147
+ }, {
148
+ key: "setThresholdValue",
149
+ value: function setThresholdValue(thresholdValue) {
150
+ this.thresholdValue = thresholdValue;
151
+ }
152
+ }, {
153
+ key: "get$Reserved",
154
+ value: function get$Reserved() {
155
+ return this.$reserved;
156
+ }
157
+ }, {
158
+ key: "get$ObjectType",
159
+ value: function get$ObjectType() {
160
+ return this.$objectType;
161
+ }
162
+ }, {
163
+ key: "get$UnknownFields",
164
+ value: function get$UnknownFields() {
165
+ return this.$unknownFields;
166
+ }
167
+ }, {
168
+ key: "toJson",
169
+ value: function toJson(forMutation) {
170
+ if (forMutation === false) {
171
+ return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, typeof this.getMetricName() !== 'undefined' && this.getMetricName() !== null ? {
172
+ 'metricName': this.getMetricName()
173
+ } : {}), typeof this.getOperator() !== 'undefined' && this.getOperator() !== null ? {
174
+ 'operator': this.getOperator()
175
+ } : {}), typeof this.getThresholdValue() !== 'undefined' && this.getThresholdValue() !== null ? {
176
+ 'thresholdValue': typeof this.getThresholdValue().toJson !== "undefined" ? this.getThresholdValue().toJson(false) : Array.isArray(this.getThresholdValue()) ? this.getThresholdValue().map(function (item) {
177
+ return typeof item.toJson !== "undefined" ? item.toJson(false) : item;
178
+ }) : _assertClassBrand(_Condition_brand, this, _toJsonMapType).call(this, this.getThresholdValue(), false)
179
+ } : {}), {}, {
180
+ '$reserved': this.get$Reserved(),
181
+ '$objectType': this.get$ObjectType(),
182
+ '$unknownFields': this.get$UnknownFields()
183
+ });
184
+ }
185
+ return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, typeof this.getMetricName() !== 'undefined' && this.getMetricName() !== null ? {
186
+ 'metricName': this.getMetricName()
187
+ } : {}), typeof this.getOperator() !== 'undefined' && this.getOperator() !== null ? {
188
+ 'operator': this.getOperator()
189
+ } : {}), typeof this.getThresholdValue() !== 'undefined' && this.getThresholdValue() !== null ? {
190
+ 'thresholdValue': typeof this.getThresholdValue().toJson !== "undefined" ? this.getThresholdValue().toJson() : Array.isArray(this.getThresholdValue()) ? this.getThresholdValue().map(function (item) {
191
+ return typeof item.toJson !== "undefined" ? item.toJson() : item;
192
+ }) : _assertClassBrand(_Condition_brand, this, _toJsonMapType).call(this, this.getThresholdValue())
193
+ } : {}), {}, {
194
+ '$reserved': this.get$Reserved(),
195
+ '$objectType': this.get$ObjectType(),
196
+ '$unknownFields': this.get$UnknownFields()
197
+ });
198
+ }
199
+ }, {
200
+ key: "validate",
201
+ value: function validate(scope, properties) {
202
+ var _this = this;
203
+ var propList = [];
204
+ if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _ValidationScopes["default"]) {
205
+ //cases validate() and validate(scope)
206
+ propList = ["metricName", "operator", "thresholdValue"];
207
+ } else if (arguments.length === 1) {
208
+ //case validate(properties)
209
+ propList = arguments[0];
210
+ scope = null;
211
+ } else {
212
+ //case validate(scope, properties)
213
+ propList = arguments[1];
214
+ }
215
+ var res = [];
216
+ var err = null;
217
+ propList.forEach(function (property) {
218
+ err = _this.validateProperty(property, scope);
219
+ if (err) {
220
+ res.push(err);
221
+ }
222
+ });
223
+ return new Promise(function (resolve, reject) {
224
+ if (res.length !== 0) {
225
+ reject(err);
226
+ } else {
227
+ resolve();
228
+ }
229
+ });
230
+ }
231
+ }, {
232
+ key: "validateProperty",
233
+ value: function validateProperty(scope, property) {
234
+ if (property === "metricName") {
235
+ if (typeof this.metricName === 'undefined' || this.metricName === null) {
236
+ return new _ValidationError["default"]("metricName", "undefined or null");
237
+ }
238
+ if (!_ValidationUtils["default"].validateMaxLength(this.metricName, 150)) {
239
+ return new _ValidationError["default"]("metricName", "does not satisfy required maxLength constraint: 150");
240
+ }
241
+ if (!_ValidationUtils["default"].validateMinLength(this.metricName, 1)) {
242
+ return new _ValidationError["default"]("metricName", "does not satisfy required minLength constraint: 1");
243
+ }
244
+ }
245
+ if (property === "operator") {
246
+ if (typeof this.operator === 'undefined' || this.operator === null) {
247
+ return new _ValidationError["default"]("operator", "undefined or null");
248
+ }
249
+ }
250
+ if (property === "thresholdValue") {
251
+ if (typeof this.thresholdValue === 'undefined' || this.thresholdValue === null) {
252
+ return new _ValidationError["default"]("thresholdValue", "undefined or null");
253
+ }
254
+ }
255
+ if (property === "$reserved") {
256
+ if (typeof this.$reserved === 'undefined' || this.$reserved === null) {
257
+ return new _ValidationError["default"]("$reserved", "undefined or null");
258
+ }
259
+ }
260
+ if (property === "$objectType") {
261
+ if (typeof this.$objectType === 'undefined' || this.$objectType === null) {
262
+ return new _ValidationError["default"]("$objectType", "undefined or null");
263
+ }
264
+ }
265
+ if (property === "$unknownFields") {
266
+ if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {
267
+ return new _ValidationError["default"]("$unknownFields", "undefined or null");
268
+ }
269
+ }
270
+ return new _ValidationError["default"](property, "no such property exists");
271
+ }
272
+ }], [{
273
+ key: "constructFromObject",
274
+ value: function constructFromObject(data, obj) {
275
+ var callFromChild = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
276
+ var items, item, i, itemArr, discriminator;
277
+ if (data) {
278
+ obj = obj || new Condition();
279
+ if (data.hasOwnProperty('metricName') && data.metricName !== null && data.metricName !== undefined) {
280
+ obj.setMetricName(data['metricName']);
281
+ }
282
+ if (data.hasOwnProperty('operator') && data.operator !== null && data.operator !== undefined) {
283
+ obj.setOperator(_ComparisonOperator["default"].constructFromObject(data['operator']));
284
+ }
285
+ if (data.hasOwnProperty('thresholdValue') && data.thresholdValue !== null && data.thresholdValue !== undefined) {
286
+ if (data['thresholdValue'].hasOwnProperty('$objectType')) {
287
+ discriminator = data['thresholdValue']['$objectType'];
288
+ } else {
289
+ discriminator = _typeof(data['thresholdValue']);
290
+ }
291
+ switch (discriminator) {
292
+ case 'monitoring.v4.common.DoubleValue':
293
+ obj.setThresholdValue(_DoubleValue["default"].constructFromObject(data['thresholdValue'], undefined));
294
+ break;
295
+ case 'monitoring.v4.common.IntValue':
296
+ obj.setThresholdValue(_IntValue["default"].constructFromObject(data['thresholdValue'], undefined));
297
+ break;
298
+ default:
299
+ throw "Unknown datatype " + discriminator + " in data";
300
+ }
301
+ }
302
+ if (data.hasOwnProperty('$reserved')) {
303
+ obj.$reserved = data['$reserved'];
304
+ }
305
+ if (data.hasOwnProperty('$objectType')) {
306
+ obj.$objectType = data['$objectType'];
307
+ }
308
+ if (data.hasOwnProperty('$unknownFields')) {
309
+ obj.$unknownFields = data['$unknownFields'];
310
+ }
311
+ if (!callFromChild) {
312
+ obj.$unknownFields = _objectSpread({}, data.$unknownFields);
313
+ for (var property in data) {
314
+ if (!Object.keys(obj).includes(property) && !(property[0] === "$" && property.endsWith("ItemDiscriminator"))) {
315
+ obj.$unknownFields[property] = data[property];
316
+ }
317
+ }
318
+ }
319
+ }
320
+ return obj;
321
+ }
322
+ }]);
323
+ }();
324
+ /**
325
+ * The metric key. Allowed values of metrics list can be found at https://portal.nutanix.com/page/documents/details?targetId=Prism-Central-Guide-vpc_2022_9:mul-alerts-user-created-metrics-r.html
326
+ * @memberof Condition
327
+ */
328
+ function _toJsonMapType(obj, forMutation) {
329
+ if (obj instanceof Map) {
330
+ return Object.fromEntries(Array.from(obj, function (_ref) {
331
+ var _ref2 = _slicedToArray(_ref, 2),
332
+ k = _ref2[0],
333
+ v = _ref2[1];
334
+ return [k, typeof v.toJson !== "undefined" ? v.toJson(forMutation) : v];
335
+ }));
336
+ } else if (_typeof(obj) === 'object' && obj != null && obj.constructor === Object) {
337
+ return Object.fromEntries(Array.from(Object.entries(obj), function (entry) {
338
+ return [entry[0], typeof entry[1].toJson !== "undefined" ? entry[1].toJson(forMutation) : entry[1]];
339
+ }));
340
+ }
341
+ return obj;
342
+ }
343
+ Condition.prototype.metricName = undefined;
344
+
345
+ /**
346
+ * @memberof Condition
347
+ */
348
+ Condition.prototype.operator = undefined;
349
+
350
+ /**
351
+ * The threshold value that was used for the condition evaluation.
352
+ * @memberof Condition
353
+ */
354
+ Condition.prototype.thresholdValue = undefined;
355
+ Condition.prototype.$reserved = undefined;
356
+ Condition.prototype.$objectType = undefined;
357
+ Condition.prototype.$unknownFields = undefined;
@@ -0,0 +1,60 @@
1
+ /**
2
+ * The ConflictingPolicy model module.
3
+ * @module Ntnx/ConflictingPolicy
4
+ * @version 4.0.1-beta-1
5
+ * @class ConflictingPolicy
6
+ *
7
+ * @param { String } extId Unique UUID associated with the User-Defined Alert policy which conflicts with the given policy.
8
+ */
9
+ export default class ConflictingPolicy {
10
+ /**
11
+ * Constructs a <code>ConflictingPolicy</code> from a plain JavaScript object, optionally creating a new instance.
12
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
13
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
14
+ * @param {module:Ntnx/ConflictingPolicy} obj Optional instance to populate.
15
+ * @param callFromChild {Boolean} Flag to recognise calling instance
16
+ * @return {module:Ntnx/ConflictingPolicy} The populated <code>ConflictingPolicy</code> instance.
17
+ */
18
+ static constructFromObject(data: any, obj: any, callFromChild?: boolean): any;
19
+ /**
20
+ * Constructs a new <code>ConflictingPolicy</code>.
21
+ * Details of the policy conflicting with a given User-Defined Alert policy.
22
+ * @alias module:Ntnx/ConflictingPolicy
23
+ *
24
+ * @param { String } extId Unique UUID associated with the User-Defined Alert policy which conflicts with the given policy.
25
+ */
26
+ constructor(extId: string);
27
+ extId: string;
28
+ $objectType: string;
29
+ $reserved: {
30
+ $fv: string;
31
+ };
32
+ $unknownFields: {};
33
+ /**
34
+ * Returns Unique UUID associated with the User-Defined Alert policy which conflicts with the given policy.
35
+ * @return {}
36
+ */
37
+ getExtId(): any;
38
+ /**
39
+ * Sets Unique UUID associated with the User-Defined Alert policy which conflicts with the given policy.
40
+ * @param {} extId Unique UUID associated with the User-Defined Alert policy which conflicts with the given policy.
41
+ */
42
+ setExtId(extId: any): void;
43
+ get$Reserved(): {
44
+ $fv: string;
45
+ };
46
+ get$ObjectType(): string;
47
+ get$UnknownFields(): {};
48
+ toJson(forMutation: any): {
49
+ $reserved: {
50
+ $fv: string;
51
+ };
52
+ $objectType: string;
53
+ $unknownFields: {};
54
+ extId?: any;
55
+ };
56
+ validate(scope: any, properties: any, ...args: any[]): Promise<any>;
57
+ validateProperty(scope: any, property: any): ValidationError;
58
+ #private;
59
+ }
60
+ import ValidationError from "../../../validation/ValidationError";
@@ -0,0 +1,250 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ValidationScopes = _interopRequireDefault(require("../../../validation/ValidationScopes"));
8
+ var _ValidationUtils = _interopRequireDefault(require("../../../../utils/ValidationUtils"));
9
+ var _ValidationError = _interopRequireDefault(require("../../../validation/ValidationError"));
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
12
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
13
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
14
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
15
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
16
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
17
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
19
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
20
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
22
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
23
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
24
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
25
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
26
+ function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
27
+ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } } /*
28
+ * Nutanix Monitoring Versioned APIs
29
+ *
30
+ * OpenAPI spec version: 4.0.1-beta-1
31
+ *
32
+ * NOTE: This class is auto generated by the Open API Dev Platform.
33
+ *
34
+ * Open API Dev Platform Codegen version: 16.8.0.7344-RELEASE
35
+ *
36
+ * Do not edit the class manually.
37
+ *
38
+ */
39
+ /**
40
+ * The ConflictingPolicy model module.
41
+ * @module Ntnx/ConflictingPolicy
42
+ * @version 4.0.1-beta-1
43
+ * @class ConflictingPolicy
44
+ *
45
+ * @param { String } extId Unique UUID associated with the User-Defined Alert policy which conflicts with the given policy.
46
+ */
47
+ var _ConflictingPolicy_brand = /*#__PURE__*/new WeakSet();
48
+ var ConflictingPolicy = exports["default"] = /*#__PURE__*/function () {
49
+ /**
50
+ * Constructs a new <code>ConflictingPolicy</code>.
51
+ * Details of the policy conflicting with a given User-Defined Alert policy.
52
+ * @alias module:Ntnx/ConflictingPolicy
53
+ *
54
+ * @param { String } extId Unique UUID associated with the User-Defined Alert policy which conflicts with the given policy.
55
+ */
56
+ function ConflictingPolicy(extId) {
57
+ _classCallCheck(this, ConflictingPolicy);
58
+ /*
59
+ * toJson method for a map type which supports map with primitive keys and values of object types
60
+ * @param {Object} obj
61
+ * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.
62
+ * Otherwise, just returns the input object.
63
+ */
64
+ _classPrivateMethodInitSpec(this, _ConflictingPolicy_brand);
65
+ this.extId = extId;
66
+ this.$objectType = "monitoring.v4.serviceability.ConflictingPolicy";
67
+ this.$reserved = {
68
+ '$fv': "v4.r0.b1"
69
+ };
70
+ this.$unknownFields = {};
71
+ }
72
+
73
+ /**
74
+ * Constructs a <code>ConflictingPolicy</code> from a plain JavaScript object, optionally creating a new instance.
75
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
76
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
77
+ * @param {module:Ntnx/ConflictingPolicy} obj Optional instance to populate.
78
+ * @param callFromChild {Boolean} Flag to recognise calling instance
79
+ * @return {module:Ntnx/ConflictingPolicy} The populated <code>ConflictingPolicy</code> instance.
80
+ */
81
+ return _createClass(ConflictingPolicy, [{
82
+ key: "getExtId",
83
+ value:
84
+ /**
85
+ * Returns Unique UUID associated with the User-Defined Alert policy which conflicts with the given policy.
86
+ * @return {}
87
+ */
88
+ function getExtId() {
89
+ return this.extId;
90
+ }
91
+
92
+ /**
93
+ * Sets Unique UUID associated with the User-Defined Alert policy which conflicts with the given policy.
94
+ * @param {} extId Unique UUID associated with the User-Defined Alert policy which conflicts with the given policy.
95
+ */
96
+ }, {
97
+ key: "setExtId",
98
+ value: function setExtId(extId) {
99
+ this.extId = extId;
100
+ }
101
+ }, {
102
+ key: "get$Reserved",
103
+ value: function get$Reserved() {
104
+ return this.$reserved;
105
+ }
106
+ }, {
107
+ key: "get$ObjectType",
108
+ value: function get$ObjectType() {
109
+ return this.$objectType;
110
+ }
111
+ }, {
112
+ key: "get$UnknownFields",
113
+ value: function get$UnknownFields() {
114
+ return this.$unknownFields;
115
+ }
116
+ }, {
117
+ key: "toJson",
118
+ value: function toJson(forMutation) {
119
+ if (forMutation === false) {
120
+ return _objectSpread(_objectSpread({}, typeof this.getExtId() !== 'undefined' && this.getExtId() !== null ? {
121
+ 'extId': this.getExtId()
122
+ } : {}), {}, {
123
+ '$reserved': this.get$Reserved(),
124
+ '$objectType': this.get$ObjectType(),
125
+ '$unknownFields': this.get$UnknownFields()
126
+ });
127
+ }
128
+ return _objectSpread(_objectSpread({}, typeof this.getExtId() !== 'undefined' && this.getExtId() !== null ? {
129
+ 'extId': this.getExtId()
130
+ } : {}), {}, {
131
+ '$reserved': this.get$Reserved(),
132
+ '$objectType': this.get$ObjectType(),
133
+ '$unknownFields': this.get$UnknownFields()
134
+ });
135
+ }
136
+ }, {
137
+ key: "validate",
138
+ value: function validate(scope, properties) {
139
+ var _this = this;
140
+ var propList = [];
141
+ if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _ValidationScopes["default"]) {
142
+ //cases validate() and validate(scope)
143
+ propList = ["extId"];
144
+ } else if (arguments.length === 1) {
145
+ //case validate(properties)
146
+ propList = arguments[0];
147
+ scope = null;
148
+ } else {
149
+ //case validate(scope, properties)
150
+ propList = arguments[1];
151
+ }
152
+ var res = [];
153
+ var err = null;
154
+ propList.forEach(function (property) {
155
+ err = _this.validateProperty(property, scope);
156
+ if (err) {
157
+ res.push(err);
158
+ }
159
+ });
160
+ return new Promise(function (resolve, reject) {
161
+ if (res.length !== 0) {
162
+ reject(err);
163
+ } else {
164
+ resolve();
165
+ }
166
+ });
167
+ }
168
+ }, {
169
+ key: "validateProperty",
170
+ value: function validateProperty(scope, property) {
171
+ if (property === "extId") {
172
+ if (typeof this.extId === 'undefined' || this.extId === null) {
173
+ return new _ValidationError["default"]("extId", "undefined or null");
174
+ }
175
+ if (!_ValidationUtils["default"].validatePattern(this.extId, /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)) {
176
+ return new _ValidationError["default"]("extId", "does not satisfy required pattern: /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/");
177
+ }
178
+ }
179
+ if (property === "$reserved") {
180
+ if (typeof this.$reserved === 'undefined' || this.$reserved === null) {
181
+ return new _ValidationError["default"]("$reserved", "undefined or null");
182
+ }
183
+ }
184
+ if (property === "$objectType") {
185
+ if (typeof this.$objectType === 'undefined' || this.$objectType === null) {
186
+ return new _ValidationError["default"]("$objectType", "undefined or null");
187
+ }
188
+ }
189
+ if (property === "$unknownFields") {
190
+ if (typeof this.$unknownFields === 'undefined' || this.$unknownFields === null) {
191
+ return new _ValidationError["default"]("$unknownFields", "undefined or null");
192
+ }
193
+ }
194
+ return new _ValidationError["default"](property, "no such property exists");
195
+ }
196
+ }], [{
197
+ key: "constructFromObject",
198
+ value: function constructFromObject(data, obj) {
199
+ var callFromChild = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
200
+ var items, item, i, itemArr, discriminator;
201
+ if (data) {
202
+ obj = obj || new ConflictingPolicy();
203
+ if (data.hasOwnProperty('extId') && data.extId !== null && data.extId !== undefined) {
204
+ obj.setExtId(data['extId']);
205
+ }
206
+ if (data.hasOwnProperty('$reserved')) {
207
+ obj.$reserved = data['$reserved'];
208
+ }
209
+ if (data.hasOwnProperty('$objectType')) {
210
+ obj.$objectType = data['$objectType'];
211
+ }
212
+ if (data.hasOwnProperty('$unknownFields')) {
213
+ obj.$unknownFields = data['$unknownFields'];
214
+ }
215
+ if (!callFromChild) {
216
+ obj.$unknownFields = _objectSpread({}, data.$unknownFields);
217
+ for (var property in data) {
218
+ if (!Object.keys(obj).includes(property) && !(property[0] === "$" && property.endsWith("ItemDiscriminator"))) {
219
+ obj.$unknownFields[property] = data[property];
220
+ }
221
+ }
222
+ }
223
+ }
224
+ return obj;
225
+ }
226
+ }]);
227
+ }();
228
+ /**
229
+ * Unique UUID associated with the User-Defined Alert policy which conflicts with the given policy.
230
+ * @memberof ConflictingPolicy
231
+ */
232
+ function _toJsonMapType(obj, forMutation) {
233
+ if (obj instanceof Map) {
234
+ return Object.fromEntries(Array.from(obj, function (_ref) {
235
+ var _ref2 = _slicedToArray(_ref, 2),
236
+ k = _ref2[0],
237
+ v = _ref2[1];
238
+ return [k, typeof v.toJson !== "undefined" ? v.toJson(forMutation) : v];
239
+ }));
240
+ } else if (_typeof(obj) === 'object' && obj != null && obj.constructor === Object) {
241
+ return Object.fromEntries(Array.from(Object.entries(obj), function (entry) {
242
+ return [entry[0], typeof entry[1].toJson !== "undefined" ? entry[1].toJson(forMutation) : entry[1]];
243
+ }));
244
+ }
245
+ return obj;
246
+ }
247
+ ConflictingPolicy.prototype.extId = undefined;
248
+ ConflictingPolicy.prototype.$reserved = undefined;
249
+ ConflictingPolicy.prototype.$objectType = undefined;
250
+ ConflictingPolicy.prototype.$unknownFields = undefined;