@nutanix-scratch/aiops-js-client 4.0.2-alpha.1 → 4.0.2

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 (529) hide show
  1. package/LICENSE.txt +202 -49
  2. package/README.md +59 -40
  3. package/dist/Ntnx-Aiops-js-client-prod.js +1 -11
  4. package/dist/Ntnx-Aiops-js-client.js +1114 -771
  5. package/dist/es/ApiClient.d.ts +20 -6
  6. package/dist/es/ApiClient.js +496 -214
  7. package/dist/es/Paginable.d.ts +1 -1
  8. package/dist/es/Paginable.js +23 -14
  9. package/dist/es/apis/scenarios-endpoints.d.ts +181 -0
  10. package/dist/es/apis/scenarios-endpoints.js +641 -0
  11. package/dist/es/apis/stats-endpoints.d.ts +93 -0
  12. package/dist/es/apis/stats-endpoints.js +264 -0
  13. package/dist/es/index.d.ts +191 -25
  14. package/dist/es/index.js +719 -56
  15. package/dist/es/models/aiops/v4/capacityplanning/CapacityDetails.d.ts +109 -0
  16. package/dist/es/models/aiops/v4/capacityplanning/CapacityDetails.js +459 -0
  17. package/dist/{lib/models/aiops/v4/blackout/ClusterEntity.d.ts → es/models/aiops/v4/capacityplanning/CapacityUnit.d.ts} +6 -6
  18. package/dist/es/models/aiops/v4/capacityplanning/CapacityUnit.js +85 -0
  19. package/dist/es/models/aiops/v4/capacityplanning/Runway.d.ts +86 -0
  20. package/dist/es/models/aiops/v4/capacityplanning/Runway.js +340 -0
  21. package/dist/es/models/aiops/v4/capacityplanning/RunwayDuration.d.ts +19 -0
  22. package/dist/es/models/aiops/v4/capacityplanning/RunwayDuration.js +91 -0
  23. package/dist/es/models/aiops/v4/clusterMetrics/Cluster.d.ts +90 -87
  24. package/dist/es/models/aiops/v4/clusterMetrics/Cluster.js +115 -43
  25. package/dist/es/models/aiops/v4/clusterMetrics/ClusterMetrics.d.ts +171 -152
  26. package/dist/es/models/aiops/v4/clusterMetrics/ClusterMetrics.js +168 -87
  27. package/dist/es/models/aiops/v4/clusterMetrics/ClusterProjection.d.ts +49 -29
  28. package/dist/es/models/aiops/v4/clusterMetrics/ClusterProjection.js +181 -40
  29. package/dist/es/models/aiops/v4/clusterMetrics/Node.d.ts +48 -45
  30. package/dist/es/models/aiops/v4/clusterMetrics/Node.js +101 -29
  31. package/dist/es/models/aiops/v4/clusterMetrics/NodeProjection.d.ts +2 -1
  32. package/dist/es/models/aiops/v4/clusterMetrics/NodeProjection.js +59 -30
  33. package/dist/es/models/aiops/v4/clusterMetrics/Vm.d.ts +48 -45
  34. package/dist/es/models/aiops/v4/clusterMetrics/Vm.js +101 -29
  35. package/dist/es/models/aiops/v4/clusterMetrics/VmProjection.d.ts +2 -1
  36. package/dist/es/models/aiops/v4/clusterMetrics/VmProjection.js +59 -30
  37. package/dist/es/models/aiops/v4/{blackout/ClusterEntity.d.ts → common/ClusterType.d.ts} +6 -6
  38. package/dist/es/models/aiops/v4/common/ClusterType.js +79 -0
  39. package/dist/es/models/aiops/v4/config/CapacityUnit.d.ts +19 -0
  40. package/dist/es/models/aiops/v4/config/CapacityUnit.js +85 -0
  41. package/dist/es/models/aiops/v4/config/CapacityUpdateConfig.d.ts +77 -0
  42. package/dist/es/models/aiops/v4/config/CapacityUpdateConfig.js +322 -0
  43. package/dist/es/models/aiops/v4/config/CapacityUpdateType.d.ts +19 -0
  44. package/dist/es/models/aiops/v4/config/CapacityUpdateType.js +85 -0
  45. package/dist/es/models/aiops/v4/config/CategoryDetail.d.ts +60 -0
  46. package/dist/es/models/aiops/v4/config/CategoryDetail.js +315 -0
  47. package/dist/es/models/aiops/v4/config/CitrixXenProvisionType.d.ts +19 -0
  48. package/dist/es/models/aiops/v4/config/CitrixXenProvisionType.js +85 -0
  49. package/dist/es/models/aiops/v4/config/CitrixXenWorkload.d.ts +83 -0
  50. package/dist/es/models/aiops/v4/config/CitrixXenWorkload.js +371 -0
  51. package/dist/es/models/aiops/v4/config/CitrixXenWorkloadVendor.d.ts +19 -0
  52. package/dist/es/models/aiops/v4/config/CitrixXenWorkloadVendor.js +79 -0
  53. package/dist/es/models/aiops/v4/config/ClusterConfig.d.ts +107 -0
  54. package/dist/es/models/aiops/v4/config/ClusterConfig.js +329 -0
  55. package/dist/es/models/aiops/v4/config/CreateScenarioApiResponse.d.ts +99 -0
  56. package/dist/es/models/aiops/v4/config/CreateScenarioApiResponse.js +343 -0
  57. package/dist/es/models/aiops/v4/config/CreateSimulationApiResponse.d.ts +102 -0
  58. package/dist/es/models/aiops/v4/config/CreateSimulationApiResponse.js +343 -0
  59. package/dist/es/models/aiops/v4/config/DataStoreConfig.d.ts +205 -0
  60. package/dist/es/models/aiops/v4/config/DataStoreConfig.js +673 -0
  61. package/dist/es/models/aiops/v4/config/DeleteScenarioApiResponse.d.ts +98 -0
  62. package/dist/es/models/aiops/v4/config/DeleteScenarioApiResponse.js +345 -0
  63. package/dist/es/models/aiops/v4/config/DeleteSimulationApiResponse.d.ts +98 -0
  64. package/dist/es/models/aiops/v4/config/DeleteSimulationApiResponse.js +345 -0
  65. package/dist/es/models/aiops/v4/config/EntityDescriptor.d.ts +68 -0
  66. package/dist/es/models/aiops/v4/config/EntityDescriptor.js +454 -0
  67. package/dist/es/models/aiops/v4/config/EntityDescriptorListApiResponse.d.ts +101 -0
  68. package/dist/es/models/aiops/v4/config/EntityDescriptorListApiResponse.js +365 -0
  69. package/dist/es/models/aiops/v4/config/EntityType.d.ts +37 -0
  70. package/dist/es/models/aiops/v4/config/EntityType.js +275 -0
  71. package/dist/es/models/aiops/v4/config/EntityTypeListApiResponse.d.ts +99 -0
  72. package/dist/es/models/aiops/v4/config/EntityTypeListApiResponse.js +365 -0
  73. package/dist/es/models/aiops/v4/config/GenerateRecommendationApiResponse.d.ts +99 -0
  74. package/dist/es/models/aiops/v4/config/GenerateRecommendationApiResponse.js +343 -0
  75. package/dist/es/models/aiops/v4/config/GenerateReportApiResponse.d.ts +99 -0
  76. package/dist/es/models/aiops/v4/config/GenerateReportApiResponse.js +343 -0
  77. package/dist/es/models/aiops/v4/config/GenerateRunwayApiResponse.d.ts +99 -0
  78. package/dist/es/models/aiops/v4/config/GenerateRunwayApiResponse.js +343 -0
  79. package/dist/es/models/aiops/v4/config/GetScenarioApiResponse.d.ts +99 -0
  80. package/dist/es/models/aiops/v4/config/GetScenarioApiResponse.js +343 -0
  81. package/dist/es/models/aiops/v4/config/GetScenarioReportApiResponse.d.ts +98 -0
  82. package/dist/es/models/aiops/v4/config/GetScenarioReportApiResponse.js +342 -0
  83. package/dist/es/models/aiops/v4/config/GetSimulationApiResponse.d.ts +99 -0
  84. package/dist/es/models/aiops/v4/config/GetSimulationApiResponse.js +343 -0
  85. package/dist/es/models/aiops/v4/config/HardwareModel.d.ts +144 -0
  86. package/dist/es/models/aiops/v4/config/HardwareModel.js +550 -0
  87. package/dist/es/models/aiops/v4/config/HardwarePart.d.ts +92 -0
  88. package/dist/es/models/aiops/v4/config/HardwarePart.js +363 -0
  89. package/dist/es/models/aiops/v4/config/IgnoreWindow.d.ts +111 -0
  90. package/dist/es/models/aiops/v4/config/IgnoreWindow.js +458 -0
  91. package/dist/es/models/aiops/v4/config/IgnoreWindowProjection.d.ts +20 -0
  92. package/dist/es/models/aiops/v4/config/IgnoreWindowProjection.js +173 -0
  93. package/dist/es/models/aiops/v4/config/ListScenariosApiResponse.d.ts +100 -0
  94. package/dist/es/models/aiops/v4/config/ListScenariosApiResponse.js +370 -0
  95. package/dist/es/models/aiops/v4/config/ListSimulationsApiResponse.d.ts +100 -0
  96. package/dist/es/models/aiops/v4/config/ListSimulationsApiResponse.js +370 -0
  97. package/dist/es/models/aiops/v4/config/MetricDescriptor.d.ts +182 -0
  98. package/dist/es/models/aiops/v4/config/MetricDescriptor.js +667 -0
  99. package/dist/es/models/aiops/v4/config/MicrosoftXenProvisionType.d.ts +19 -0
  100. package/dist/es/models/aiops/v4/config/MicrosoftXenProvisionType.js +79 -0
  101. package/dist/es/models/aiops/v4/config/MicrosoftXenWorkload.d.ts +83 -0
  102. package/dist/es/models/aiops/v4/config/MicrosoftXenWorkload.js +371 -0
  103. package/dist/es/models/aiops/v4/config/MicrosoftXenWorkloadVendor.d.ts +19 -0
  104. package/dist/es/models/aiops/v4/config/MicrosoftXenWorkloadVendor.js +79 -0
  105. package/dist/es/models/aiops/v4/config/NodeConfig.d.ts +143 -0
  106. package/dist/es/models/aiops/v4/config/NodeConfig.js +490 -0
  107. package/dist/es/models/aiops/v4/config/NodeSource.d.ts +19 -0
  108. package/dist/es/models/aiops/v4/config/NodeSource.js +91 -0
  109. package/dist/es/models/aiops/v4/config/PolicyType.d.ts +19 -0
  110. package/dist/es/models/aiops/v4/config/PolicyType.js +85 -0
  111. package/dist/es/models/aiops/v4/config/ReplicationFactor.d.ts +19 -0
  112. package/dist/es/models/aiops/v4/config/ReplicationFactor.js +85 -0
  113. package/dist/es/models/aiops/v4/config/ResourceCapacity.d.ts +126 -0
  114. package/dist/es/models/aiops/v4/config/ResourceCapacity.js +451 -0
  115. package/dist/es/models/aiops/v4/config/Runway.d.ts +134 -0
  116. package/dist/es/models/aiops/v4/config/Runway.js +484 -0
  117. package/dist/es/models/aiops/v4/config/RunwayParams.d.ts +77 -0
  118. package/dist/es/models/aiops/v4/config/RunwayParams.js +323 -0
  119. package/dist/es/models/aiops/v4/config/RunwayParamsProjection.d.ts +14 -0
  120. package/dist/es/models/aiops/v4/config/RunwayParamsProjection.js +159 -0
  121. package/dist/es/models/aiops/v4/config/Scenario.d.ts +178 -0
  122. package/dist/es/models/aiops/v4/config/Scenario.js +579 -0
  123. package/dist/es/models/aiops/v4/config/ScenarioProjection.d.ts +10 -0
  124. package/dist/es/models/aiops/v4/config/ScenarioProjection.js +156 -0
  125. package/dist/es/models/aiops/v4/config/SimulatedVmResourceSpec.d.ts +106 -0
  126. package/dist/es/models/aiops/v4/config/SimulatedVmResourceSpec.js +403 -0
  127. package/dist/es/models/aiops/v4/config/SimulatedVmResourceSpecProjection.d.ts +16 -0
  128. package/dist/es/models/aiops/v4/config/SimulatedVmResourceSpecProjection.js +162 -0
  129. package/dist/es/models/aiops/v4/config/Simulation.d.ts +56 -0
  130. package/dist/es/models/aiops/v4/config/Simulation.js +317 -0
  131. package/dist/es/models/aiops/v4/config/SimulationProjection.d.ts +10 -0
  132. package/dist/es/models/aiops/v4/config/SimulationProjection.js +153 -0
  133. package/dist/es/models/aiops/v4/config/Source.d.ts +37 -0
  134. package/dist/es/models/aiops/v4/config/Source.js +275 -0
  135. package/dist/es/models/aiops/v4/config/SourceListApiResponse.d.ts +106 -0
  136. package/dist/es/models/aiops/v4/config/SourceListApiResponse.js +365 -0
  137. package/dist/es/models/aiops/v4/config/SplunkWorkload.d.ts +118 -0
  138. package/dist/es/models/aiops/v4/config/SplunkWorkload.js +446 -0
  139. package/dist/es/models/aiops/v4/config/SqlProfileType.d.ts +19 -0
  140. package/dist/es/models/aiops/v4/config/SqlProfileType.js +91 -0
  141. package/dist/es/models/aiops/v4/config/SqlTransactionType.d.ts +19 -0
  142. package/dist/es/models/aiops/v4/config/SqlTransactionType.js +85 -0
  143. package/dist/es/models/aiops/v4/config/SqlWorkload.d.ts +110 -0
  144. package/dist/es/models/aiops/v4/config/SqlWorkload.js +415 -0
  145. package/dist/es/models/aiops/v4/config/UpdateScenarioApiResponse.d.ts +99 -0
  146. package/dist/es/models/aiops/v4/config/UpdateScenarioApiResponse.js +343 -0
  147. package/dist/es/models/aiops/v4/config/UpdateSimulationApiResponse.d.ts +99 -0
  148. package/dist/es/models/aiops/v4/config/UpdateSimulationApiResponse.js +365 -0
  149. package/dist/es/models/aiops/v4/config/ValueRange.d.ts +64 -0
  150. package/dist/es/models/aiops/v4/config/ValueRange.js +312 -0
  151. package/dist/{lib/models/aiops/v4/blackout/Operation.d.ts → es/models/aiops/v4/config/ValueType.d.ts} +6 -6
  152. package/dist/es/models/aiops/v4/config/ValueType.js +121 -0
  153. package/dist/es/models/aiops/v4/config/VdiProvisionType.d.ts +19 -0
  154. package/dist/es/models/aiops/v4/config/VdiProvisionType.js +103 -0
  155. package/dist/es/models/aiops/v4/config/VdiUserType.d.ts +19 -0
  156. package/dist/es/models/aiops/v4/config/VdiUserType.js +97 -0
  157. package/dist/es/models/aiops/v4/{blackout/Operation.d.ts → config/VdiVendor.d.ts} +6 -6
  158. package/dist/es/models/aiops/v4/config/VdiVendor.js +85 -0
  159. package/dist/es/models/aiops/v4/config/VdiWorkload.d.ts +109 -0
  160. package/dist/es/models/aiops/v4/config/VdiWorkload.js +412 -0
  161. package/dist/es/models/aiops/v4/config/Vendor.d.ts +19 -0
  162. package/dist/es/models/aiops/v4/config/Vendor.js +127 -0
  163. package/dist/es/models/aiops/v4/config/VmCategoryWorkload.d.ts +94 -0
  164. package/dist/es/models/aiops/v4/config/VmCategoryWorkload.js +370 -0
  165. package/dist/es/models/aiops/v4/config/VmWorkload.d.ts +80 -0
  166. package/dist/es/models/aiops/v4/config/VmWorkload.js +335 -0
  167. package/dist/es/models/aiops/v4/config/Workload.d.ts +122 -0
  168. package/dist/es/models/aiops/v4/config/Workload.js +447 -0
  169. package/dist/es/models/aiops/v4/config/XenOperatingSystem.d.ts +19 -0
  170. package/dist/es/models/aiops/v4/config/XenOperatingSystem.js +85 -0
  171. package/dist/es/models/aiops/v4/config/XenWorkload.d.ts +151 -0
  172. package/dist/es/models/aiops/v4/config/XenWorkload.js +532 -0
  173. package/dist/es/models/aiops/v4/config/XfitPolicy.d.ts +161 -0
  174. package/dist/es/models/aiops/v4/config/XfitPolicy.js +589 -0
  175. package/dist/es/models/aiops/v4/config/XfitPolicyProjection.d.ts +16 -0
  176. package/dist/es/models/aiops/v4/config/XfitPolicyProjection.js +167 -0
  177. package/dist/es/models/aiops/v4/error/AppMessage.d.ts +69 -51
  178. package/dist/es/models/aiops/v4/error/AppMessage.js +122 -37
  179. package/dist/es/models/aiops/v4/error/ErrorResponse.d.ts +25 -22
  180. package/dist/es/models/aiops/v4/error/ErrorResponse.js +149 -63
  181. package/dist/es/models/aiops/v4/error/SchemaValidationError.d.ts +65 -44
  182. package/dist/es/models/aiops/v4/error/SchemaValidationError.js +120 -32
  183. package/dist/es/models/aiops/v4/error/SchemaValidationErrorMessage.d.ts +42 -33
  184. package/dist/es/models/aiops/v4/error/SchemaValidationErrorMessage.js +106 -25
  185. package/dist/es/models/aiops/v4/stats/BoolList.d.ts +61 -0
  186. package/dist/es/models/aiops/v4/stats/BoolList.js +288 -0
  187. package/dist/es/models/aiops/v4/stats/BoolVal.d.ts +61 -0
  188. package/dist/es/models/aiops/v4/stats/BoolVal.js +280 -0
  189. package/dist/es/models/aiops/v4/stats/DoubleList.d.ts +61 -0
  190. package/dist/es/models/aiops/v4/stats/DoubleList.js +288 -0
  191. package/dist/es/models/aiops/v4/stats/DoubleVal.d.ts +61 -0
  192. package/dist/es/models/aiops/v4/stats/DoubleVal.js +280 -0
  193. package/dist/es/models/aiops/v4/stats/Entity.d.ts +57 -0
  194. package/dist/es/models/aiops/v4/stats/Entity.js +413 -0
  195. package/dist/es/models/aiops/v4/stats/EntityListApiResponse.d.ts +99 -0
  196. package/dist/es/models/aiops/v4/stats/EntityListApiResponse.js +365 -0
  197. package/dist/es/models/aiops/v4/stats/IntList.d.ts +61 -0
  198. package/dist/es/models/aiops/v4/stats/IntList.js +288 -0
  199. package/dist/es/models/aiops/v4/stats/IntVal.d.ts +61 -0
  200. package/dist/es/models/aiops/v4/stats/IntVal.js +280 -0
  201. package/dist/es/models/aiops/v4/stats/Metric.d.ts +75 -0
  202. package/dist/es/models/aiops/v4/stats/Metric.js +312 -0
  203. package/dist/es/models/aiops/v4/stats/Point.d.ts +72 -0
  204. package/dist/es/models/aiops/v4/stats/Point.js +356 -0
  205. package/dist/es/models/aiops/v4/stats/ScenarioStats.d.ts +79 -0
  206. package/dist/es/models/aiops/v4/stats/ScenarioStats.js +323 -0
  207. package/dist/es/models/aiops/v4/stats/ScenarioStatsProjection.d.ts +10 -0
  208. package/dist/es/models/aiops/v4/stats/ScenarioStatsProjection.js +151 -0
  209. package/dist/es/models/aiops/v4/stats/ScenarioStatsTuple.d.ts +160 -0
  210. package/dist/es/models/aiops/v4/stats/ScenarioStatsTuple.js +617 -0
  211. package/dist/es/models/aiops/v4/stats/StrList.d.ts +61 -0
  212. package/dist/es/models/aiops/v4/stats/StrList.js +288 -0
  213. package/dist/es/models/aiops/v4/stats/StrVal.d.ts +61 -0
  214. package/dist/es/models/aiops/v4/stats/StrVal.js +280 -0
  215. package/dist/es/models/aiops/v4/stats/TimeSeries.d.ts +71 -0
  216. package/dist/es/models/aiops/v4/stats/TimeSeries.js +326 -0
  217. package/dist/es/models/common/v1/config/Flag.d.ts +34 -27
  218. package/dist/es/models/common/v1/config/Flag.js +107 -23
  219. package/dist/es/models/common/v1/config/IPv4Address.d.ts +42 -27
  220. package/dist/es/models/common/v1/config/IPv4Address.js +106 -25
  221. package/dist/es/models/common/v1/config/KVPair.d.ts +37 -29
  222. package/dist/es/models/common/v1/config/KVPair.js +161 -54
  223. package/dist/es/models/common/v1/config/KVStringPair.d.ts +64 -0
  224. package/dist/es/models/common/v1/config/KVStringPair.js +318 -0
  225. package/dist/es/models/common/v1/config/MapOfStringWrapper.d.ts +58 -0
  226. package/dist/es/models/common/v1/config/MapOfStringWrapper.js +275 -0
  227. package/dist/es/models/common/v1/config/Message.d.ts +45 -39
  228. package/dist/es/models/common/v1/config/Message.js +102 -27
  229. package/dist/es/models/common/v1/config/MessageSeverity.js +15 -16
  230. package/dist/es/models/common/v1/config/TenantAwareModel.d.ts +26 -23
  231. package/dist/es/models/common/v1/config/TenantAwareModel.js +96 -24
  232. package/dist/es/models/common/v1/response/ApiLink.d.ts +34 -31
  233. package/dist/es/models/common/v1/response/ApiLink.js +102 -30
  234. package/dist/es/models/common/v1/response/ApiResponseMetadata.d.ts +89 -45
  235. package/dist/es/models/common/v1/response/ApiResponseMetadata.js +130 -34
  236. package/dist/es/models/common/v1/response/ExternalizableAbstractModel.d.ts +27 -20
  237. package/dist/es/models/common/v1/response/ExternalizableAbstractModel.js +121 -46
  238. package/dist/es/models/common/v1/stats/DownSamplingOperator.d.ts +19 -0
  239. package/dist/es/models/common/v1/stats/DownSamplingOperator.js +109 -0
  240. package/dist/es/models/prism/v4/config/TaskReference.d.ts +26 -23
  241. package/dist/es/models/prism/v4/config/TaskReference.js +102 -26
  242. package/dist/es/models/validation/ValidationError.js +12 -14
  243. package/dist/es/models/validation/ValidationScopes.js +1 -2
  244. package/dist/es/utils/ValidationUtils.js +12 -14
  245. package/dist/lib/ApiClient.d.ts +20 -6
  246. package/dist/lib/ApiClient.js +496 -214
  247. package/dist/lib/Paginable.d.ts +1 -1
  248. package/dist/lib/Paginable.js +23 -14
  249. package/dist/lib/apis/scenarios-endpoints.d.ts +181 -0
  250. package/dist/lib/apis/scenarios-endpoints.js +641 -0
  251. package/dist/lib/apis/stats-endpoints.d.ts +93 -0
  252. package/dist/lib/apis/stats-endpoints.js +264 -0
  253. package/dist/lib/index.d.ts +191 -25
  254. package/dist/lib/index.js +719 -56
  255. package/dist/lib/models/aiops/v4/capacityplanning/CapacityDetails.d.ts +109 -0
  256. package/dist/lib/models/aiops/v4/capacityplanning/CapacityDetails.js +459 -0
  257. package/dist/lib/models/aiops/v4/capacityplanning/CapacityUnit.d.ts +19 -0
  258. package/dist/lib/models/aiops/v4/capacityplanning/CapacityUnit.js +85 -0
  259. package/dist/lib/models/aiops/v4/capacityplanning/Runway.d.ts +86 -0
  260. package/dist/lib/models/aiops/v4/capacityplanning/Runway.js +340 -0
  261. package/dist/lib/models/aiops/v4/capacityplanning/RunwayDuration.d.ts +19 -0
  262. package/dist/lib/models/aiops/v4/capacityplanning/RunwayDuration.js +91 -0
  263. package/dist/lib/models/aiops/v4/clusterMetrics/Cluster.d.ts +90 -87
  264. package/dist/lib/models/aiops/v4/clusterMetrics/Cluster.js +115 -43
  265. package/dist/lib/models/aiops/v4/clusterMetrics/ClusterMetrics.d.ts +171 -152
  266. package/dist/lib/models/aiops/v4/clusterMetrics/ClusterMetrics.js +168 -87
  267. package/dist/lib/models/aiops/v4/clusterMetrics/ClusterProjection.d.ts +49 -29
  268. package/dist/lib/models/aiops/v4/clusterMetrics/ClusterProjection.js +181 -40
  269. package/dist/lib/models/aiops/v4/clusterMetrics/Node.d.ts +48 -45
  270. package/dist/lib/models/aiops/v4/clusterMetrics/Node.js +101 -29
  271. package/dist/lib/models/aiops/v4/clusterMetrics/NodeProjection.d.ts +2 -1
  272. package/dist/lib/models/aiops/v4/clusterMetrics/NodeProjection.js +59 -30
  273. package/dist/lib/models/aiops/v4/clusterMetrics/Vm.d.ts +48 -45
  274. package/dist/lib/models/aiops/v4/clusterMetrics/Vm.js +101 -29
  275. package/dist/lib/models/aiops/v4/clusterMetrics/VmProjection.d.ts +2 -1
  276. package/dist/lib/models/aiops/v4/clusterMetrics/VmProjection.js +59 -30
  277. package/dist/lib/models/aiops/v4/common/ClusterType.d.ts +19 -0
  278. package/dist/lib/models/aiops/v4/common/ClusterType.js +79 -0
  279. package/dist/lib/models/aiops/v4/config/CapacityUnit.d.ts +19 -0
  280. package/dist/lib/models/aiops/v4/config/CapacityUnit.js +85 -0
  281. package/dist/lib/models/aiops/v4/config/CapacityUpdateConfig.d.ts +77 -0
  282. package/dist/lib/models/aiops/v4/config/CapacityUpdateConfig.js +322 -0
  283. package/dist/lib/models/aiops/v4/config/CapacityUpdateType.d.ts +19 -0
  284. package/dist/lib/models/aiops/v4/config/CapacityUpdateType.js +85 -0
  285. package/dist/lib/models/aiops/v4/config/CategoryDetail.d.ts +60 -0
  286. package/dist/lib/models/aiops/v4/config/CategoryDetail.js +315 -0
  287. package/dist/lib/models/aiops/v4/config/CitrixXenProvisionType.d.ts +19 -0
  288. package/dist/lib/models/aiops/v4/config/CitrixXenProvisionType.js +85 -0
  289. package/dist/lib/models/aiops/v4/config/CitrixXenWorkload.d.ts +83 -0
  290. package/dist/lib/models/aiops/v4/config/CitrixXenWorkload.js +371 -0
  291. package/dist/lib/models/aiops/v4/config/CitrixXenWorkloadVendor.d.ts +19 -0
  292. package/dist/lib/models/aiops/v4/config/CitrixXenWorkloadVendor.js +79 -0
  293. package/dist/lib/models/aiops/v4/config/ClusterConfig.d.ts +107 -0
  294. package/dist/lib/models/aiops/v4/config/ClusterConfig.js +329 -0
  295. package/dist/lib/models/aiops/v4/config/CreateScenarioApiResponse.d.ts +99 -0
  296. package/dist/lib/models/aiops/v4/config/CreateScenarioApiResponse.js +343 -0
  297. package/dist/lib/models/aiops/v4/config/CreateSimulationApiResponse.d.ts +102 -0
  298. package/dist/lib/models/aiops/v4/config/CreateSimulationApiResponse.js +343 -0
  299. package/dist/lib/models/aiops/v4/config/DataStoreConfig.d.ts +205 -0
  300. package/dist/lib/models/aiops/v4/config/DataStoreConfig.js +673 -0
  301. package/dist/lib/models/aiops/v4/config/DeleteScenarioApiResponse.d.ts +98 -0
  302. package/dist/lib/models/aiops/v4/config/DeleteScenarioApiResponse.js +345 -0
  303. package/dist/lib/models/aiops/v4/config/DeleteSimulationApiResponse.d.ts +98 -0
  304. package/dist/lib/models/aiops/v4/config/DeleteSimulationApiResponse.js +345 -0
  305. package/dist/lib/models/aiops/v4/config/EntityDescriptor.d.ts +68 -0
  306. package/dist/lib/models/aiops/v4/config/EntityDescriptor.js +454 -0
  307. package/dist/lib/models/aiops/v4/config/EntityDescriptorListApiResponse.d.ts +101 -0
  308. package/dist/lib/models/aiops/v4/config/EntityDescriptorListApiResponse.js +365 -0
  309. package/dist/lib/models/aiops/v4/config/EntityType.d.ts +37 -0
  310. package/dist/lib/models/aiops/v4/config/EntityType.js +275 -0
  311. package/dist/lib/models/aiops/v4/config/EntityTypeListApiResponse.d.ts +99 -0
  312. package/dist/lib/models/aiops/v4/config/EntityTypeListApiResponse.js +365 -0
  313. package/dist/lib/models/aiops/v4/config/GenerateRecommendationApiResponse.d.ts +99 -0
  314. package/dist/lib/models/aiops/v4/config/GenerateRecommendationApiResponse.js +343 -0
  315. package/dist/lib/models/aiops/v4/config/GenerateReportApiResponse.d.ts +99 -0
  316. package/dist/lib/models/aiops/v4/config/GenerateReportApiResponse.js +343 -0
  317. package/dist/lib/models/aiops/v4/config/GenerateRunwayApiResponse.d.ts +99 -0
  318. package/dist/lib/models/aiops/v4/config/GenerateRunwayApiResponse.js +343 -0
  319. package/dist/lib/models/aiops/v4/config/GetScenarioApiResponse.d.ts +99 -0
  320. package/dist/lib/models/aiops/v4/config/GetScenarioApiResponse.js +343 -0
  321. package/dist/lib/models/aiops/v4/config/GetScenarioReportApiResponse.d.ts +98 -0
  322. package/dist/lib/models/aiops/v4/config/GetScenarioReportApiResponse.js +342 -0
  323. package/dist/lib/models/aiops/v4/config/GetSimulationApiResponse.d.ts +99 -0
  324. package/dist/lib/models/aiops/v4/config/GetSimulationApiResponse.js +343 -0
  325. package/dist/lib/models/aiops/v4/config/HardwareModel.d.ts +144 -0
  326. package/dist/lib/models/aiops/v4/config/HardwareModel.js +550 -0
  327. package/dist/lib/models/aiops/v4/config/HardwarePart.d.ts +92 -0
  328. package/dist/lib/models/aiops/v4/config/HardwarePart.js +363 -0
  329. package/dist/lib/models/aiops/v4/config/IgnoreWindow.d.ts +111 -0
  330. package/dist/lib/models/aiops/v4/config/IgnoreWindow.js +458 -0
  331. package/dist/lib/models/aiops/v4/config/IgnoreWindowProjection.d.ts +20 -0
  332. package/dist/lib/models/aiops/v4/config/IgnoreWindowProjection.js +173 -0
  333. package/dist/lib/models/aiops/v4/config/ListScenariosApiResponse.d.ts +100 -0
  334. package/dist/lib/models/aiops/v4/config/ListScenariosApiResponse.js +370 -0
  335. package/dist/lib/models/aiops/v4/config/ListSimulationsApiResponse.d.ts +100 -0
  336. package/dist/lib/models/aiops/v4/config/ListSimulationsApiResponse.js +370 -0
  337. package/dist/lib/models/aiops/v4/config/MetricDescriptor.d.ts +182 -0
  338. package/dist/lib/models/aiops/v4/config/MetricDescriptor.js +667 -0
  339. package/dist/lib/models/aiops/v4/config/MicrosoftXenProvisionType.d.ts +19 -0
  340. package/dist/lib/models/aiops/v4/config/MicrosoftXenProvisionType.js +79 -0
  341. package/dist/lib/models/aiops/v4/config/MicrosoftXenWorkload.d.ts +83 -0
  342. package/dist/lib/models/aiops/v4/config/MicrosoftXenWorkload.js +371 -0
  343. package/dist/lib/models/aiops/v4/config/MicrosoftXenWorkloadVendor.d.ts +19 -0
  344. package/dist/lib/models/aiops/v4/config/MicrosoftXenWorkloadVendor.js +79 -0
  345. package/dist/lib/models/aiops/v4/config/NodeConfig.d.ts +143 -0
  346. package/dist/lib/models/aiops/v4/config/NodeConfig.js +490 -0
  347. package/dist/lib/models/aiops/v4/config/NodeSource.d.ts +19 -0
  348. package/dist/lib/models/aiops/v4/config/NodeSource.js +91 -0
  349. package/dist/lib/models/aiops/v4/config/PolicyType.d.ts +19 -0
  350. package/dist/lib/models/aiops/v4/config/PolicyType.js +85 -0
  351. package/dist/lib/models/aiops/v4/config/ReplicationFactor.d.ts +19 -0
  352. package/dist/lib/models/aiops/v4/config/ReplicationFactor.js +85 -0
  353. package/dist/lib/models/aiops/v4/config/ResourceCapacity.d.ts +126 -0
  354. package/dist/lib/models/aiops/v4/config/ResourceCapacity.js +451 -0
  355. package/dist/lib/models/aiops/v4/config/Runway.d.ts +134 -0
  356. package/dist/lib/models/aiops/v4/config/Runway.js +484 -0
  357. package/dist/lib/models/aiops/v4/config/RunwayParams.d.ts +77 -0
  358. package/dist/lib/models/aiops/v4/config/RunwayParams.js +323 -0
  359. package/dist/lib/models/aiops/v4/config/RunwayParamsProjection.d.ts +14 -0
  360. package/dist/lib/models/aiops/v4/config/RunwayParamsProjection.js +159 -0
  361. package/dist/lib/models/aiops/v4/config/Scenario.d.ts +178 -0
  362. package/dist/lib/models/aiops/v4/config/Scenario.js +579 -0
  363. package/dist/lib/models/aiops/v4/config/ScenarioProjection.d.ts +10 -0
  364. package/dist/lib/models/aiops/v4/config/ScenarioProjection.js +156 -0
  365. package/dist/lib/models/aiops/v4/config/SimulatedVmResourceSpec.d.ts +106 -0
  366. package/dist/lib/models/aiops/v4/config/SimulatedVmResourceSpec.js +403 -0
  367. package/dist/lib/models/aiops/v4/config/SimulatedVmResourceSpecProjection.d.ts +16 -0
  368. package/dist/lib/models/aiops/v4/config/SimulatedVmResourceSpecProjection.js +162 -0
  369. package/dist/lib/models/aiops/v4/config/Simulation.d.ts +56 -0
  370. package/dist/lib/models/aiops/v4/config/Simulation.js +317 -0
  371. package/dist/lib/models/aiops/v4/config/SimulationProjection.d.ts +10 -0
  372. package/dist/lib/models/aiops/v4/config/SimulationProjection.js +153 -0
  373. package/dist/lib/models/aiops/v4/config/Source.d.ts +37 -0
  374. package/dist/lib/models/aiops/v4/config/Source.js +275 -0
  375. package/dist/lib/models/aiops/v4/config/SourceListApiResponse.d.ts +106 -0
  376. package/dist/lib/models/aiops/v4/config/SourceListApiResponse.js +365 -0
  377. package/dist/lib/models/aiops/v4/config/SplunkWorkload.d.ts +118 -0
  378. package/dist/lib/models/aiops/v4/config/SplunkWorkload.js +446 -0
  379. package/dist/lib/models/aiops/v4/config/SqlProfileType.d.ts +19 -0
  380. package/dist/lib/models/aiops/v4/config/SqlProfileType.js +91 -0
  381. package/dist/lib/models/aiops/v4/config/SqlTransactionType.d.ts +19 -0
  382. package/dist/lib/models/aiops/v4/config/SqlTransactionType.js +85 -0
  383. package/dist/lib/models/aiops/v4/config/SqlWorkload.d.ts +110 -0
  384. package/dist/lib/models/aiops/v4/config/SqlWorkload.js +415 -0
  385. package/dist/lib/models/aiops/v4/config/UpdateScenarioApiResponse.d.ts +99 -0
  386. package/dist/lib/models/aiops/v4/config/UpdateScenarioApiResponse.js +343 -0
  387. package/dist/lib/models/aiops/v4/config/UpdateSimulationApiResponse.d.ts +99 -0
  388. package/dist/lib/models/aiops/v4/config/UpdateSimulationApiResponse.js +365 -0
  389. package/dist/lib/models/aiops/v4/config/ValueRange.d.ts +64 -0
  390. package/dist/lib/models/aiops/v4/config/ValueRange.js +312 -0
  391. package/dist/lib/models/aiops/v4/config/ValueType.d.ts +19 -0
  392. package/dist/lib/models/aiops/v4/config/ValueType.js +121 -0
  393. package/dist/lib/models/aiops/v4/config/VdiProvisionType.d.ts +19 -0
  394. package/dist/lib/models/aiops/v4/config/VdiProvisionType.js +103 -0
  395. package/dist/lib/models/aiops/v4/config/VdiUserType.d.ts +19 -0
  396. package/dist/lib/models/aiops/v4/config/VdiUserType.js +97 -0
  397. package/dist/lib/models/aiops/v4/config/VdiVendor.d.ts +19 -0
  398. package/dist/lib/models/aiops/v4/config/VdiVendor.js +85 -0
  399. package/dist/lib/models/aiops/v4/config/VdiWorkload.d.ts +109 -0
  400. package/dist/lib/models/aiops/v4/config/VdiWorkload.js +412 -0
  401. package/dist/lib/models/aiops/v4/config/Vendor.d.ts +19 -0
  402. package/dist/lib/models/aiops/v4/config/Vendor.js +127 -0
  403. package/dist/lib/models/aiops/v4/config/VmCategoryWorkload.d.ts +94 -0
  404. package/dist/lib/models/aiops/v4/config/VmCategoryWorkload.js +370 -0
  405. package/dist/lib/models/aiops/v4/config/VmWorkload.d.ts +80 -0
  406. package/dist/lib/models/aiops/v4/config/VmWorkload.js +335 -0
  407. package/dist/lib/models/aiops/v4/config/Workload.d.ts +122 -0
  408. package/dist/lib/models/aiops/v4/config/Workload.js +447 -0
  409. package/dist/lib/models/aiops/v4/config/XenOperatingSystem.d.ts +19 -0
  410. package/dist/lib/models/aiops/v4/config/XenOperatingSystem.js +85 -0
  411. package/dist/lib/models/aiops/v4/config/XenWorkload.d.ts +151 -0
  412. package/dist/lib/models/aiops/v4/config/XenWorkload.js +532 -0
  413. package/dist/lib/models/aiops/v4/config/XfitPolicy.d.ts +161 -0
  414. package/dist/lib/models/aiops/v4/config/XfitPolicy.js +589 -0
  415. package/dist/lib/models/aiops/v4/config/XfitPolicyProjection.d.ts +16 -0
  416. package/dist/lib/models/aiops/v4/config/XfitPolicyProjection.js +167 -0
  417. package/dist/lib/models/aiops/v4/error/AppMessage.d.ts +69 -51
  418. package/dist/lib/models/aiops/v4/error/AppMessage.js +122 -37
  419. package/dist/lib/models/aiops/v4/error/ErrorResponse.d.ts +25 -22
  420. package/dist/lib/models/aiops/v4/error/ErrorResponse.js +149 -63
  421. package/dist/lib/models/aiops/v4/error/SchemaValidationError.d.ts +65 -44
  422. package/dist/lib/models/aiops/v4/error/SchemaValidationError.js +120 -32
  423. package/dist/lib/models/aiops/v4/error/SchemaValidationErrorMessage.d.ts +42 -33
  424. package/dist/lib/models/aiops/v4/error/SchemaValidationErrorMessage.js +106 -25
  425. package/dist/lib/models/aiops/v4/stats/BoolList.d.ts +61 -0
  426. package/dist/lib/models/aiops/v4/stats/BoolList.js +288 -0
  427. package/dist/lib/models/aiops/v4/stats/BoolVal.d.ts +61 -0
  428. package/dist/lib/models/aiops/v4/stats/BoolVal.js +280 -0
  429. package/dist/lib/models/aiops/v4/stats/DoubleList.d.ts +61 -0
  430. package/dist/lib/models/aiops/v4/stats/DoubleList.js +288 -0
  431. package/dist/lib/models/aiops/v4/stats/DoubleVal.d.ts +61 -0
  432. package/dist/lib/models/aiops/v4/stats/DoubleVal.js +280 -0
  433. package/dist/lib/models/aiops/v4/stats/Entity.d.ts +57 -0
  434. package/dist/lib/models/aiops/v4/stats/Entity.js +413 -0
  435. package/dist/lib/models/aiops/v4/stats/EntityListApiResponse.d.ts +99 -0
  436. package/dist/lib/models/aiops/v4/stats/EntityListApiResponse.js +365 -0
  437. package/dist/lib/models/aiops/v4/stats/IntList.d.ts +61 -0
  438. package/dist/lib/models/aiops/v4/stats/IntList.js +288 -0
  439. package/dist/lib/models/aiops/v4/stats/IntVal.d.ts +61 -0
  440. package/dist/lib/models/aiops/v4/stats/IntVal.js +280 -0
  441. package/dist/lib/models/aiops/v4/stats/Metric.d.ts +75 -0
  442. package/dist/lib/models/aiops/v4/stats/Metric.js +312 -0
  443. package/dist/lib/models/aiops/v4/stats/Point.d.ts +72 -0
  444. package/dist/lib/models/aiops/v4/stats/Point.js +356 -0
  445. package/dist/lib/models/aiops/v4/stats/ScenarioStats.d.ts +79 -0
  446. package/dist/lib/models/aiops/v4/stats/ScenarioStats.js +323 -0
  447. package/dist/lib/models/aiops/v4/stats/ScenarioStatsProjection.d.ts +10 -0
  448. package/dist/lib/models/aiops/v4/stats/ScenarioStatsProjection.js +151 -0
  449. package/dist/lib/models/aiops/v4/stats/ScenarioStatsTuple.d.ts +160 -0
  450. package/dist/lib/models/aiops/v4/stats/ScenarioStatsTuple.js +617 -0
  451. package/dist/lib/models/aiops/v4/stats/StrList.d.ts +61 -0
  452. package/dist/lib/models/aiops/v4/stats/StrList.js +288 -0
  453. package/dist/lib/models/aiops/v4/stats/StrVal.d.ts +61 -0
  454. package/dist/lib/models/aiops/v4/stats/StrVal.js +280 -0
  455. package/dist/lib/models/aiops/v4/stats/TimeSeries.d.ts +71 -0
  456. package/dist/lib/models/aiops/v4/stats/TimeSeries.js +326 -0
  457. package/dist/lib/models/common/v1/config/Flag.d.ts +34 -27
  458. package/dist/lib/models/common/v1/config/Flag.js +107 -23
  459. package/dist/lib/models/common/v1/config/IPv4Address.d.ts +42 -27
  460. package/dist/lib/models/common/v1/config/IPv4Address.js +106 -25
  461. package/dist/lib/models/common/v1/config/KVPair.d.ts +37 -29
  462. package/dist/lib/models/common/v1/config/KVPair.js +161 -54
  463. package/dist/lib/models/common/v1/config/KVStringPair.d.ts +64 -0
  464. package/dist/lib/models/common/v1/config/KVStringPair.js +318 -0
  465. package/dist/lib/models/common/v1/config/MapOfStringWrapper.d.ts +58 -0
  466. package/dist/lib/models/common/v1/config/MapOfStringWrapper.js +275 -0
  467. package/dist/lib/models/common/v1/config/Message.d.ts +45 -39
  468. package/dist/lib/models/common/v1/config/Message.js +102 -27
  469. package/dist/lib/models/common/v1/config/MessageSeverity.js +15 -16
  470. package/dist/lib/models/common/v1/config/TenantAwareModel.d.ts +26 -23
  471. package/dist/lib/models/common/v1/config/TenantAwareModel.js +96 -24
  472. package/dist/lib/models/common/v1/response/ApiLink.d.ts +34 -31
  473. package/dist/lib/models/common/v1/response/ApiLink.js +102 -30
  474. package/dist/lib/models/common/v1/response/ApiResponseMetadata.d.ts +89 -45
  475. package/dist/lib/models/common/v1/response/ApiResponseMetadata.js +130 -34
  476. package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.d.ts +27 -20
  477. package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.js +121 -46
  478. package/dist/lib/models/common/v1/stats/DownSamplingOperator.d.ts +19 -0
  479. package/dist/lib/models/common/v1/stats/DownSamplingOperator.js +109 -0
  480. package/dist/lib/models/prism/v4/config/TaskReference.d.ts +26 -23
  481. package/dist/lib/models/prism/v4/config/TaskReference.js +102 -26
  482. package/dist/lib/models/validation/ValidationError.js +12 -14
  483. package/dist/lib/models/validation/ValidationScopes.js +1 -2
  484. package/dist/lib/utils/ValidationUtils.js +12 -14
  485. package/package.json +6 -5
  486. package/dist/es/apis/cluster-endpoints.d.ts +0 -48
  487. package/dist/es/apis/cluster-endpoints.js +0 -127
  488. package/dist/es/models/aiops/v4/blackout/BlackoutOperation.d.ts +0 -39
  489. package/dist/es/models/aiops/v4/blackout/BlackoutOperation.js +0 -223
  490. package/dist/es/models/aiops/v4/blackout/BlackoutOperationsApiResponse.d.ts +0 -60
  491. package/dist/es/models/aiops/v4/blackout/BlackoutOperationsApiResponse.js +0 -292
  492. package/dist/es/models/aiops/v4/blackout/BlackoutPeriod.d.ts +0 -117
  493. package/dist/es/models/aiops/v4/blackout/BlackoutPeriod.js +0 -438
  494. package/dist/es/models/aiops/v4/blackout/BulkBlackoutPeriodDeleteApiResponse.d.ts +0 -60
  495. package/dist/es/models/aiops/v4/blackout/BulkBlackoutPeriodDeleteApiResponse.js +0 -283
  496. package/dist/es/models/aiops/v4/blackout/CalculateRunway.d.ts +0 -41
  497. package/dist/es/models/aiops/v4/blackout/CalculateRunway.js +0 -225
  498. package/dist/es/models/aiops/v4/blackout/CalculateRunwayResponse.d.ts +0 -60
  499. package/dist/es/models/aiops/v4/blackout/CalculateRunwayResponse.js +0 -284
  500. package/dist/es/models/aiops/v4/blackout/ClusterEntity.js +0 -86
  501. package/dist/es/models/aiops/v4/blackout/Operation.js +0 -86
  502. package/dist/es/models/aiops/v4/blackout/TasksListResponse.d.ts +0 -60
  503. package/dist/es/models/aiops/v4/blackout/TasksListResponse.js +0 -290
  504. package/dist/es/models/aiops/v4/clusterMetrics/ClusterApiResponse.d.ts +0 -60
  505. package/dist/es/models/aiops/v4/clusterMetrics/ClusterApiResponse.js +0 -284
  506. package/dist/es/models/aiops/v4/clusterMetrics/ClusterListApiResponse.d.ts +0 -60
  507. package/dist/es/models/aiops/v4/clusterMetrics/ClusterListApiResponse.js +0 -292
  508. package/dist/lib/apis/cluster-endpoints.d.ts +0 -48
  509. package/dist/lib/apis/cluster-endpoints.js +0 -127
  510. package/dist/lib/models/aiops/v4/blackout/BlackoutOperation.d.ts +0 -39
  511. package/dist/lib/models/aiops/v4/blackout/BlackoutOperation.js +0 -223
  512. package/dist/lib/models/aiops/v4/blackout/BlackoutOperationsApiResponse.d.ts +0 -60
  513. package/dist/lib/models/aiops/v4/blackout/BlackoutOperationsApiResponse.js +0 -292
  514. package/dist/lib/models/aiops/v4/blackout/BlackoutPeriod.d.ts +0 -117
  515. package/dist/lib/models/aiops/v4/blackout/BlackoutPeriod.js +0 -438
  516. package/dist/lib/models/aiops/v4/blackout/BulkBlackoutPeriodDeleteApiResponse.d.ts +0 -60
  517. package/dist/lib/models/aiops/v4/blackout/BulkBlackoutPeriodDeleteApiResponse.js +0 -283
  518. package/dist/lib/models/aiops/v4/blackout/CalculateRunway.d.ts +0 -41
  519. package/dist/lib/models/aiops/v4/blackout/CalculateRunway.js +0 -225
  520. package/dist/lib/models/aiops/v4/blackout/CalculateRunwayResponse.d.ts +0 -60
  521. package/dist/lib/models/aiops/v4/blackout/CalculateRunwayResponse.js +0 -284
  522. package/dist/lib/models/aiops/v4/blackout/ClusterEntity.js +0 -86
  523. package/dist/lib/models/aiops/v4/blackout/Operation.js +0 -86
  524. package/dist/lib/models/aiops/v4/blackout/TasksListResponse.d.ts +0 -60
  525. package/dist/lib/models/aiops/v4/blackout/TasksListResponse.js +0 -290
  526. package/dist/lib/models/aiops/v4/clusterMetrics/ClusterApiResponse.d.ts +0 -60
  527. package/dist/lib/models/aiops/v4/clusterMetrics/ClusterApiResponse.js +0 -284
  528. package/dist/lib/models/aiops/v4/clusterMetrics/ClusterListApiResponse.d.ts +0 -60
  529. package/dist/lib/models/aiops/v4/clusterMetrics/ClusterListApiResponse.js +0 -292
@@ -10,26 +10,52 @@ var _uuid = require("uuid");
10
10
  var _superagentRetryDelay = _interopRequireDefault(require("superagent-retry-delay"));
11
11
  var _https = _interopRequireDefault(require("https"));
12
12
  var _fs2 = _interopRequireDefault(require("fs"));
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
15
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19
- 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); } }
20
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
21
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
22
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
23
- function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
24
- function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
25
- function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
26
- function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
27
- function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
28
- function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
29
- function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
30
- function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
31
- function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
13
+ var _path = _interopRequireDefault(require("path"));
14
+ var _buffer = require("buffer");
15
+ var _ApiResponseMetadata = _interopRequireDefault(require("./models/common/v1/response/ApiResponseMetadata"));
16
+ var _Flag = _interopRequireDefault(require("./models/common/v1/config/Flag"));
17
+ var _ApiClient;
18
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
19
+ function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, void 0, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = RegExp(e, t); return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)(>|$)/g, function (e, r, t) { if ("" === t) return e; var p = o[r]; return Array.isArray(p) ? "$" + p.join("$") : "number" == typeof p ? "$" + p : ""; })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != _typeof(e[e.length - 1]) && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); }
20
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
21
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
22
+ 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; }
23
+ 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; }
24
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
25
+ 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); }
26
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
27
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
28
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
29
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
30
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
31
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
32
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
33
+ 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); }
34
+ function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
35
+ function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
36
+ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
37
+ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
38
+ function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
39
+ 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"); } /*
40
+ * Nutanix AIOps APIs
41
+ *
42
+ * OpenAPI spec version: 4.0.2
43
+ *
44
+ * NOTE: This class is auto generated by the Open API Dev Platform.
45
+ *
46
+ * Open API Dev Platform Codegen version: 17.4.0.8851-RELEASE
47
+ *
48
+ * Do not edit the class manually.
49
+ *
50
+ */
32
51
  (0, _superagentRetryDelay["default"])(_superagent["default"]);
52
+ /**
53
+ * Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an
54
+ * application to use this class directly - the *Api and model classes provide the public API for the service. The
55
+ * contents of this file should be regarded as internal but are documented for completeness.
56
+ * @module ApiClient
57
+ * @version 4.0.2
58
+ */
33
59
  var _protocol = /*#__PURE__*/new WeakMap();
34
60
  var _cookie = /*#__PURE__*/new WeakMap();
35
61
  var _logger = /*#__PURE__*/new WeakMap();
@@ -38,83 +64,36 @@ var _defaultConnectTimeout = /*#__PURE__*/new WeakMap();
38
64
  var _defaultReadTimeout = /*#__PURE__*/new WeakMap();
39
65
  var _defaultMaxTimeout = /*#__PURE__*/new WeakMap();
40
66
  var _LOG_LEVEL = /*#__PURE__*/new WeakMap();
41
- var _isJsonMime = /*#__PURE__*/new WeakSet();
42
- var _jsonPreferredMime = /*#__PURE__*/new WeakSet();
43
- var _isFileParam = /*#__PURE__*/new WeakSet();
44
- var _normalizeParams = /*#__PURE__*/new WeakSet();
45
- var _applyAuthToRequest = /*#__PURE__*/new WeakSet();
46
- var _deserialize = /*#__PURE__*/new WeakSet();
47
- var _paginateIfNeeded = /*#__PURE__*/new WeakSet();
48
- var _getValidTimeout = /*#__PURE__*/new WeakSet();
49
- var _updateCookies = /*#__PURE__*/new WeakSet();
50
- var _attachCookies = /*#__PURE__*/new WeakSet();
51
- var _log = /*#__PURE__*/new WeakSet();
52
- var _skipLogging = /*#__PURE__*/new WeakSet();
53
- var _getLocalDateTime = /*#__PURE__*/new WeakSet();
54
- var _flatten = /*#__PURE__*/new WeakSet();
55
- /**
56
- * Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an
57
- * application to use this class directly - the *Api and model classes provide the public API for the service. The
58
- * contents of this file should be regarded as internal but are documented for completeness.
59
- * @module ApiClient
60
- * @version 4.0.2-alpha-1
61
- */
62
- var ApiClient = /*#__PURE__*/function () {
63
- // PRIVATE VARIABLES
64
-
67
+ var _ApiClient_brand = /*#__PURE__*/new WeakSet();
68
+ var ApiClient = exports.ApiClient = /*#__PURE__*/function () {
65
69
  /**
66
70
  * @alias module:ApiClient
67
71
  * @class
68
72
  */
69
73
  function ApiClient() {
70
74
  _classCallCheck(this, ApiClient);
71
- _classPrivateMethodInitSpec(this, _flatten);
72
- _classPrivateMethodInitSpec(this, _getLocalDateTime);
73
- _classPrivateMethodInitSpec(this, _skipLogging);
74
- _classPrivateMethodInitSpec(this, _log);
75
- _classPrivateMethodInitSpec(this, _attachCookies);
76
- _classPrivateMethodInitSpec(this, _updateCookies);
77
- _classPrivateMethodInitSpec(this, _getValidTimeout);
78
- _classPrivateMethodInitSpec(this, _paginateIfNeeded);
79
- _classPrivateMethodInitSpec(this, _deserialize);
80
- _classPrivateMethodInitSpec(this, _applyAuthToRequest);
81
- _classPrivateMethodInitSpec(this, _normalizeParams);
82
- _classPrivateMethodInitSpec(this, _isFileParam);
83
- _classPrivateMethodInitSpec(this, _jsonPreferredMime);
84
- _classPrivateMethodInitSpec(this, _isJsonMime);
85
- _classPrivateFieldInitSpec(this, _protocol, {
86
- writable: true,
87
- value: void 0
88
- });
89
- _classPrivateFieldInitSpec(this, _cookie, {
90
- writable: true,
91
- value: void 0
92
- });
93
- _classPrivateFieldInitSpec(this, _logger, {
94
- writable: true,
95
- value: void 0
96
- });
97
- _classPrivateFieldInitSpec(this, _verifySslFlag, {
98
- writable: true,
99
- value: void 0
100
- });
101
- _classPrivateFieldInitSpec(this, _defaultConnectTimeout, {
102
- writable: true,
103
- value: void 0
104
- });
105
- _classPrivateFieldInitSpec(this, _defaultReadTimeout, {
106
- writable: true,
107
- value: void 0
108
- });
109
- _classPrivateFieldInitSpec(this, _defaultMaxTimeout, {
110
- writable: true,
111
- value: void 0
112
- });
113
- _classPrivateFieldInitSpec(this, _LOG_LEVEL, {
114
- writable: true,
115
- value: void 0
116
- });
117
- _classPrivateFieldSet(this, _LOG_LEVEL, Object.freeze({
75
+ /*
76
+ * Checks whether the given content type represents JSON.<br>
77
+ * JSON content type examples:<br>
78
+ * <ul>
79
+ * <li>application/json</li>
80
+ * <li>application/json; charset=UTF8</li>
81
+ * <li>APPLICATION/JSON</li>
82
+ * </ul>
83
+ * @param {String} contentType The MIME content type to check.
84
+ * @returns {Boolean} <code>true</code> if <code>contentType</code> represents JSON, otherwise <code>false</code>.
85
+ */
86
+ _classPrivateMethodInitSpec(this, _ApiClient_brand);
87
+ // PRIVATE VARIABLES
88
+ _classPrivateFieldInitSpec(this, _protocol, void 0);
89
+ _classPrivateFieldInitSpec(this, _cookie, void 0);
90
+ _classPrivateFieldInitSpec(this, _logger, void 0);
91
+ _classPrivateFieldInitSpec(this, _verifySslFlag, void 0);
92
+ _classPrivateFieldInitSpec(this, _defaultConnectTimeout, void 0);
93
+ _classPrivateFieldInitSpec(this, _defaultReadTimeout, void 0);
94
+ _classPrivateFieldInitSpec(this, _defaultMaxTimeout, void 0);
95
+ _classPrivateFieldInitSpec(this, _LOG_LEVEL, void 0);
96
+ _classPrivateFieldSet(_LOG_LEVEL, this, Object.freeze({
118
97
  DEBUG: {
119
98
  key: "DEBUG",
120
99
  value: Symbol(0)
@@ -159,6 +138,11 @@ var ApiClient = /*#__PURE__*/function () {
159
138
  * @type {Array.<String>}
160
139
  */
161
140
  this.authentications = {
141
+ 'apiKeyAuthScheme': {
142
+ type: 'apiKey',
143
+ 'in': 'header',
144
+ name: 'X-ntnx-api-key'
145
+ },
162
146
  'basicAuthScheme': {
163
147
  type: 'basic'
164
148
  }
@@ -170,23 +154,23 @@ var ApiClient = /*#__PURE__*/function () {
170
154
  * @default {}
171
155
  */
172
156
  this.defaultHeaders = {};
173
- _classPrivateFieldSet(this, _defaultConnectTimeout, 30000);
174
- _classPrivateFieldSet(this, _defaultReadTimeout, 30000);
175
- _classPrivateFieldSet(this, _defaultMaxTimeout, 1800000);
157
+ _classPrivateFieldSet(_defaultConnectTimeout, this, 30000);
158
+ _classPrivateFieldSet(_defaultReadTimeout, this, 30000);
159
+ _classPrivateFieldSet(_defaultMaxTimeout, this, 10800000);
176
160
 
177
161
  /**
178
162
  * The default HTTP read timeout in milliseconds for all API calls.
179
163
  * @type {Number}
180
164
  * @default 30000
181
165
  */
182
- this.readTimeout = _classPrivateFieldGet(this, _defaultReadTimeout);
166
+ this.readTimeout = _classPrivateFieldGet(_defaultReadTimeout, this);
183
167
 
184
168
  /**
185
169
  * The default HTTP connection timeout in milliseconds for all API calls.
186
170
  * @type {Number}
187
171
  * @default 30000
188
172
  */
189
- this.connectTimeout = _classPrivateFieldGet(this, _defaultConnectTimeout);
173
+ this.connectTimeout = _classPrivateFieldGet(_defaultConnectTimeout, this);
190
174
 
191
175
  /**
192
176
  * If set to false an additional timestamp parameter is added to all API GET calls to
@@ -200,7 +184,14 @@ var ApiClient = /*#__PURE__*/function () {
200
184
  * Saved Cookies
201
185
  * @default null
202
186
  */
203
- _classPrivateFieldSet(this, _cookie, null);
187
+ _classPrivateFieldSet(_cookie, this, null);
188
+
189
+ /**
190
+ * The maximum number of redirects to be followed for all API calls.
191
+ * @type {Number}
192
+ * @default 1
193
+ */
194
+ this.maxRedirects = 1;
204
195
 
205
196
  /**
206
197
  * The maximum number of retry attempts to be made by the client
@@ -216,6 +207,13 @@ var ApiClient = /*#__PURE__*/function () {
216
207
  * @default 3000
217
208
  */
218
209
  this.retryInterval = 3000;
210
+
211
+ /**
212
+ * A boolean value that indicates whether cross-site Access-Control requests should be made using auth credentials.
213
+ * @type {Boolean}
214
+ * @default false
215
+ */
216
+ this.withCredentials = false;
219
217
  if (typeof self === 'undefined') {
220
218
  this.agent = new _superagent["default"].agent();
221
219
  }
@@ -229,7 +227,7 @@ var ApiClient = /*#__PURE__*/function () {
229
227
  * Allow SDK to print debug logs
230
228
  */
231
229
  this.debug = false;
232
- _classPrivateFieldSet(this, _logger, null);
230
+ _classPrivateFieldSet(_logger, this, null);
233
231
 
234
232
  /**
235
233
  * Username for basic auth
@@ -240,7 +238,13 @@ var ApiClient = /*#__PURE__*/function () {
240
238
  * Password for basic auth
241
239
  */
242
240
  this.password = null;
243
- _classPrivateFieldSet(this, _verifySslFlag, true);
241
+ _classPrivateFieldSet(_verifySslFlag, this, true);
242
+
243
+ /*
244
+ * Non Browser Environment : path to directory where downloaded files will be stored
245
+ * Browser Environment : WritableStream to pipe downloaded file to
246
+ */
247
+ this.downloadDestination = null;
244
248
 
245
249
  /*
246
250
  * Log file to write activity logs
@@ -252,10 +256,10 @@ var ApiClient = /*#__PURE__*/function () {
252
256
  * Enable/Disable SSL Verification
253
257
  * @param verifySsl (boolean)
254
258
  */
255
- _createClass(ApiClient, [{
259
+ return _createClass(ApiClient, [{
256
260
  key: "verifySsl",
257
261
  get: function get() {
258
- return _classPrivateFieldGet(this, _verifySslFlag);
262
+ return _classPrivateFieldGet(_verifySslFlag, this);
259
263
  }
260
264
 
261
265
  /**
@@ -270,7 +274,7 @@ var ApiClient = /*#__PURE__*/function () {
270
274
  rejectUnauthorized: false
271
275
  });
272
276
  }
273
- _classPrivateFieldSet(this, _verifySslFlag, verifySsl);
277
+ _classPrivateFieldSet(_verifySslFlag, this, verifySsl);
274
278
  }
275
279
  }, {
276
280
  key: "loggerFile",
@@ -281,7 +285,7 @@ var ApiClient = /*#__PURE__*/function () {
281
285
  flags: 'a'
282
286
  });
283
287
  }
284
- _classPrivateFieldSet(this, _logger, new console.Console({
288
+ _classPrivateFieldSet(_logger, this, new console.Console({
285
289
  stdout: logfile,
286
290
  stderr: logfile
287
291
  }));
@@ -290,14 +294,14 @@ var ApiClient = /*#__PURE__*/function () {
290
294
 
291
295
  /**
292
296
  * Adds key value pair to default headers map, (to be added to every API call request)
293
- * @param key The key (string)
294
- * @param value The corresponding value (string)
297
+ * @param {String} key The key
298
+ * @param {String} value The corresponding value
295
299
  */
296
300
  }, {
297
301
  key: "addDefaultHeader",
298
302
  value: function addDefaultHeader(key, value) {
299
303
  if (key === "Authorization") {
300
- _classPrivateFieldSet(this, _cookie, null);
304
+ _classPrivateFieldSet(_cookie, this, null);
301
305
  }
302
306
  this.defaultHeaders[key] = value;
303
307
  }
@@ -327,10 +331,10 @@ var ApiClient = /*#__PURE__*/function () {
327
331
  }
328
332
 
329
333
  // The protocol of the base URL, including the colon (:).
330
- _classPrivateFieldSet(this, _protocol, typeof self === 'undefined' ? this.scheme + ':' : self.location.protocol);
334
+ _classPrivateFieldSet(_protocol, this, typeof self === 'undefined' ? this.scheme + ':' : self.location.protocol);
331
335
  var basePath = ''; //default
332
- if (_classPrivateFieldGet(this, _protocol) !== '' && this.host !== '' && this.port !== '') {
333
- basePath = _classPrivateFieldGet(this, _protocol) + '\/\/' + this.host + ':' + this.port;
336
+ if (_classPrivateFieldGet(_protocol, this) !== '' && this.host !== '' && this.port !== '') {
337
+ basePath = _classPrivateFieldGet(_protocol, this) + '\/\/' + this.host + ':' + this.port;
334
338
  } else if (typeof self !== "undefined") {
335
339
  basePath = self.origin;
336
340
  }
@@ -346,18 +350,6 @@ var ApiClient = /*#__PURE__*/function () {
346
350
  });
347
351
  return url;
348
352
  }
349
-
350
- /*
351
- * Checks whether the given content type represents JSON.<br>
352
- * JSON content type examples:<br>
353
- * <ul>
354
- * <li>application/json</li>
355
- * <li>application/json; charset=UTF8</li>
356
- * <li>APPLICATION/JSON</li>
357
- * </ul>
358
- * @param {String} contentType The MIME content type to check.
359
- * @returns {Boolean} <code>true</code> if <code>contentType</code> represents JSON, otherwise <code>false</code>.
360
- */
361
353
  }, {
362
354
  key: "buildCollectionParam",
363
355
  value:
@@ -389,6 +381,21 @@ var ApiClient = /*#__PURE__*/function () {
389
381
  }
390
382
  }
391
383
 
384
+ /*
385
+ * Sets API key for authentication
386
+ *
387
+ * @param {String} key The API key for authentication
388
+ */
389
+ }, {
390
+ key: "setApiKey",
391
+ value: function setApiKey(key) {
392
+ if (key == undefined || typeof key === 'string' || key instanceof String) {
393
+ this.authentications['apiKeyAuthScheme']['apiKey'] = key;
394
+ } else {
395
+ this.authentications['apiKeyAuthScheme']['apiKey'] = undefined;
396
+ }
397
+ }
398
+
392
399
  /*
393
400
  * Applies authentication headers to the request.
394
401
  * @param {Object} request The request object created by a <code>superagent()</code> call.
@@ -429,7 +436,7 @@ var ApiClient = /*#__PURE__*/function () {
429
436
  * which can further be used in other HTTP operations.
430
437
  *
431
438
  * @param object Object from which ETag needs to be retrieved
432
- * @returns returns ETag header in the object if it's an API response object, otherwise null
439
+ * @returns {(String|null)} returns ETag header in the object if it's an API response object, otherwise null
433
440
  */
434
441
  }, {
435
442
  key: "callApi",
@@ -460,31 +467,38 @@ var ApiClient = /*#__PURE__*/function () {
460
467
  request.callback = function (err, res) {
461
468
  if (res && res.status) {
462
469
  var status = res.status;
463
- if (status >= 400 && !(status === 401 || status === 408 || status === 503 || status === 504)) {
470
+ if (status >= 400 && !(status === 401 || status === 408 || status === 429 || status === 503 || status === 504)) {
464
471
  this._maxRetries = 0;
465
472
  }
466
473
  if (res.status === 401) {
467
474
  this.unset("Cookie");
468
475
  this._maxRetries = 1;
469
476
  }
477
+ if (status === 429) {
478
+ var retryAfter = res.headers['retry-after'];
479
+ if (retryAfter) {
480
+ var delay = parseInt(retryAfter, 10) * 1000;
481
+ this._retryDelays[this._retries] = delay;
482
+ }
483
+ }
470
484
  }
471
485
  this.oldCallback(err, res);
472
486
  };
473
487
 
474
488
  // apply authentications
475
- _classPrivateMethodGet(this, _applyAuthToRequest, _applyAuthToRequest2).call(this, request, authNames);
489
+ _assertClassBrand(_ApiClient_brand, this, _applyAuthToRequest).call(this, request, authNames);
476
490
 
477
491
  // set query parameters
478
492
  if (httpMethod.toUpperCase() === 'GET' && this.cache === false) {
479
493
  queryParams['_'] = new Date().getTime();
480
494
  }
481
- request.query(_classPrivateMethodGet(this, _normalizeParams, _normalizeParams2).call(this, queryParams));
495
+ request.query(_assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, queryParams));
482
496
 
483
497
  // set header parameters
484
- request.set(this.defaultHeaders).set(_classPrivateMethodGet(this, _normalizeParams, _normalizeParams2).call(this, headerParams));
498
+ request.set(this.defaultHeaders).set(_assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, headerParams));
485
499
  if ((this.defaultHeaders['NTNX-Request-Id'] === null || this.defaultHeaders['NTNX-Request-Id'] === undefined) && (headerParams['NTNX-Request-Id'] === null || headerParams['NTNX-Request-Id'] === undefined)) {
486
500
  var requestId = (0, _uuid.v4)();
487
- request.set(_classPrivateMethodGet(this, _normalizeParams, _normalizeParams2).call(this, {
501
+ request.set(_assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, {
488
502
  'NTNX-Request-Id': requestId
489
503
  }));
490
504
  }
@@ -492,8 +506,9 @@ var ApiClient = /*#__PURE__*/function () {
492
506
  // Set User-Agent header only if it is not a browser environment
493
507
  var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined";
494
508
  if (!isBrowser) {
495
- request.set(_classPrivateMethodGet(this, _normalizeParams, _normalizeParams2).call(this, {
496
- 'User-Agent': 'Nutanix-aiops-js-client/4.0.2-alpha.1'
509
+ this.downloadDestination = '.';
510
+ request.set(_assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, {
511
+ 'User-Agent': 'Nutanix-aiops-js-client/4.0.2'
497
512
  }));
498
513
  }
499
514
 
@@ -504,10 +519,10 @@ var ApiClient = /*#__PURE__*/function () {
504
519
 
505
520
  // set request timeouts
506
521
  var timeoutOptions = {};
507
- timeoutOptions["response"] = _classPrivateMethodGet(this, _getValidTimeout, _getValidTimeout2).call(this, this.connectTimeout, _classPrivateFieldGet(this, _defaultConnectTimeout));
508
- timeoutOptions["deadline"] = _classPrivateMethodGet(this, _getValidTimeout, _getValidTimeout2).call(this, this.readTimeout, _classPrivateFieldGet(this, _defaultReadTimeout));
522
+ timeoutOptions["response"] = _assertClassBrand(_ApiClient_brand, this, _getValidTimeout).call(this, this.connectTimeout, _classPrivateFieldGet(_defaultConnectTimeout, this));
523
+ timeoutOptions["deadline"] = _assertClassBrand(_ApiClient_brand, this, _getValidTimeout).call(this, this.readTimeout, _classPrivateFieldGet(_defaultReadTimeout, this));
509
524
  request.timeout(timeoutOptions);
510
- var contentType = _classPrivateMethodGet(this, _jsonPreferredMime, _jsonPreferredMime2).call(this, contentTypes);
525
+ var contentType = headerParams.hasOwnProperty("Content-Type") ? headerParams["Content-Type"] : _assertClassBrand(_ApiClient_brand, this, _jsonPreferredMime).call(this, contentTypes);
511
526
  if (contentType) {
512
527
  // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746)
513
528
  if (contentType != 'multipart/form-data') {
@@ -516,13 +531,15 @@ var ApiClient = /*#__PURE__*/function () {
516
531
  } else if (!request.header['Content-Type']) {
517
532
  request.type('application/json');
518
533
  }
534
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, "Request URL :", httpMethod, url);
535
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, _assertClassBrand(_ApiClient_brand, this, _flatten), "Request Headers :", typeof request.header === "undefined" ? "" : request.header);
519
536
  if (contentType === 'application/x-www-form-urlencoded') {
520
- request.send(_classPrivateMethodGet(this, _normalizeParams, _normalizeParams2).call(this, formParams));
537
+ request.send(_assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, formParams));
521
538
  } else if (contentType == 'multipart/form-data') {
522
- var _formParams = _classPrivateMethodGet(this, _normalizeParams, _normalizeParams2).call(this, formParams);
539
+ var _formParams = _assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, formParams);
523
540
  for (var key in _formParams) {
524
541
  if (_formParams.hasOwnProperty(key)) {
525
- if (_classPrivateMethodGet(this, _isFileParam, _isFileParam2).call(this, _formParams[key])) {
542
+ if (_assertClassBrand(_ApiClient_brand, this, _isFileParam).call(this, _formParams[key])) {
526
543
  // file field
527
544
  request.attach(key, _formParams[key]);
528
545
  } else {
@@ -530,47 +547,173 @@ var ApiClient = /*#__PURE__*/function () {
530
547
  }
531
548
  }
532
549
  }
550
+ } else if (contentType === 'application/octet-stream' && bodyParam !== null && typeof bodyParam !== 'undefined' && typeof bodyParam.pipe === 'function') {
551
+ // FILE UPLOAD SUPPORT
552
+
553
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, "Piping octet-stream request");
554
+ if (typeof bodyParam.pipe === 'function') {
555
+ bodyParam.pipe(request);
556
+ } else if (typeof require === 'function') {
557
+ var webstream;
558
+ try {
559
+ webstream = require('stream/web');
560
+ } catch (err) {
561
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, "Error fetching steam/web");
562
+ }
563
+ if (bodyParam instanceof webstream.ReadableStream) {
564
+ bodyParam.pipeTo(new webstream.WritableStream({
565
+ write: function write(chunk) {
566
+ request.write(chunk);
567
+ },
568
+ close: function close() {
569
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, "READABLE STREAM CLOSED");
570
+ },
571
+ abort: function abort(err) {
572
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, "READABLE STREAM ABORTED");
573
+ }
574
+ }));
575
+ } else {
576
+ request.send(bodyParam);
577
+ }
578
+ } else {
579
+ request.send(bodyParam);
580
+ }
581
+ return new Promise(function (resolve, reject) {
582
+ request.on('error', function (err) {
583
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).DEBUG, null, "Caught the following error :", err);
584
+ reject(err);
585
+ }).on('response', function (response) {
586
+ _assertClassBrand(_ApiClient_brand, _this2, _handleApiResponseForPromise).call(_this2, response, path, queryParams, returnType, resolve, reject);
587
+ });
588
+ });
533
589
  } else if (bodyParam) {
534
590
  request.send(bodyParam);
535
591
  }
536
- var accept = _classPrivateMethodGet(this, _jsonPreferredMime, _jsonPreferredMime2).call(this, accepts);
537
- if (accept) {
538
- request.accept(accept);
539
- }
540
- if (returnType === 'Blob') {
592
+ if (typeof returnType === 'Blob') {
541
593
  request.responseType('blob');
542
594
  } else if (returnType === 'String') {
543
595
  request.responseType('string');
544
596
  }
545
- _classPrivateMethodGet(this, _attachCookies, _attachCookies2).call(this, request);
546
- _classPrivateMethodGet(this, _log, _log2).call(this, _classPrivateFieldGet(this, _LOG_LEVEL).INFO, null, "Request URL :", httpMethod, url);
547
- _classPrivateMethodGet(this, _log, _log2).call(this, _classPrivateFieldGet(this, _LOG_LEVEL).DEBUG, _classPrivateMethodGet(this, _flatten, _flatten2), "Request Headers :", typeof request.header === "undefined" ? "" : request.header);
548
- _classPrivateMethodGet(this, _log, _log2).call(this, _classPrivateFieldGet(this, _LOG_LEVEL).DEBUG, null, "Request Body :", typeof request._data === "undefined" ? "" : request._data);
597
+ _assertClassBrand(_ApiClient_brand, this, _attachCookies).call(this, request);
598
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, "Request Body :", typeof request._data === "undefined" ? "" : request._data);
599
+ var accept = headerParams.hasOwnProperty("Accept") && headerParams["Accept"] != undefined ? headerParams["Accept"] : accepts.join(', ');
600
+ var binaryMediaTypes = ['application/octet-stream', 'application/pdf', 'application/zip'];
601
+ if (accept) {
602
+ request.accept(accept);
603
+ }
549
604
  return new Promise(function (resolve, reject) {
550
- request.retry(_this2.maxRetryAttempts, _this2.retryInterval, []).end(function (error, response) {
551
- _classPrivateMethodGet(_this2, _updateCookies, _updateCookies2).call(_this2, response || {});
605
+ request.buffer(false).redirects(0).retry(_this2.maxRetryAttempts, _this2.retryInterval, []).withCredentials(_this2.withCredentials).on('error', function (err) {
606
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).DEBUG, null, "Caught the following error :", err);
607
+ }).end(function (error, response) {
552
608
  if (error) {
553
- error.data = _classPrivateMethodGet(_this2, _deserialize, _deserialize2).call(_this2, response, returnType);
554
- if (response !== null && typeof response !== 'undefined') {
555
- _classPrivateMethodGet(_this2, _log, _log2).call(_this2, _classPrivateFieldGet(_this2, _LOG_LEVEL).INFO, null, "Response Status :", response.status);
609
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).DEBUG, null, "Caught error during the request!");
610
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, error);
611
+ if (error.response !== null && typeof error.response !== 'undefined') {
612
+ error.data = _assertClassBrand(_ApiClient_brand, _this2, _deserialize).call(_this2, error.response, returnType);
613
+ } else {
614
+ error.data = _assertClassBrand(_ApiClient_brand, _this2, _wrapErrorInResponse).call(_this2, error);
556
615
  }
557
- _classPrivateMethodGet(_this2, _log, _log2).call(_this2, _classPrivateFieldGet(_this2, _LOG_LEVEL).ERROR, null, "Error :", error.data);
558
616
  reject(error);
559
617
  } else {
560
- _classPrivateMethodGet(_this2, _log, _log2).call(_this2, _classPrivateFieldGet(_this2, _LOG_LEVEL).INFO, null, "Response Status :", response.status);
561
- try {
562
- var data = _classPrivateMethodGet(_this2, _deserialize, _deserialize2).call(_this2, response, returnType);
563
- _classPrivateMethodGet(_this2, _log, _log2).call(_this2, _classPrivateFieldGet(_this2, _LOG_LEVEL).DEBUG, _classPrivateMethodGet(_this2, _flatten, _flatten2), "Response Headers :", response.headers);
564
- _classPrivateMethodGet(_this2, _log, _log2).call(_this2, _classPrivateFieldGet(_this2, _LOG_LEVEL).DEBUG, null, "Response Body :", data);
565
- _this2.addEtagToReservedMap(response, data);
566
- _classPrivateMethodGet(_this2, _paginateIfNeeded, _paginateIfNeeded2).call(_this2, data, path, queryParams);
567
- resolve({
568
- data: data,
569
- response: response
618
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).INFO, null, "Response Status :", response.status);
619
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).DEBUG, _assertClassBrand(_ApiClient_brand, _this2, _flatten), "Response Headers :", response.headers);
620
+ var _contentType = '';
621
+ if (response.headers.hasOwnProperty('content-type')) {
622
+ _contentType = response.headers["content-type"];
623
+ }
624
+ var fetchStream = binaryMediaTypes.includes(_contentType);
625
+ if (fetchStream) {
626
+ /*
627
+ * Browser environment :
628
+ * uses Web Streams, downloadDestination expected to be a WritableStream (i.e. sink for response to be streamed to)
629
+ * Node.js environment :
630
+ * uses File System, downloadDestination expected to be a directory path, file is downloaded to this directory
631
+ */
632
+ if (isBrowser) {
633
+ /*
634
+ * Browser environment :
635
+ * - fetch webstream module
636
+ * - write file to WritableStream downloadDestination
637
+ * - if webstream if not available or downloadDestination is not instance of WritableStream
638
+ * code flow goes to main request.then execution
639
+ */
640
+ if (typeof require === 'function') {
641
+ var _webstream;
642
+ try {
643
+ _webstream = require('stream/web');
644
+ } catch (err) {
645
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, "Error fetching steam/web");
646
+ }
647
+ if (_this2.downloadDestination instanceof _webstream.WritableStream) {
648
+ // Piping Data
649
+ var writer = _this2.downloadDestination.getWriter();
650
+ try {
651
+ response.on('data', function (chunk) {
652
+ writer.write(chunk);
653
+ });
654
+ } catch (err) {
655
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, "Issue while downloading file", err);
656
+ }
657
+ response.on('end', function () {
658
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).INFO, null, "Finished streaming response");
659
+ writer.close();
660
+ var data = _assertClassBrand(_ApiClient_brand, _this2, _deserialize).call(_this2, response, returnType);
661
+ resolve({
662
+ data: data,
663
+ response: response
664
+ });
665
+ }).on('error', function (err) {
666
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, "Caught the following error :", err);
667
+ err.data = _assertClassBrand(_ApiClient_brand, _this2, _wrapErrorInResponse).call(_this2, err);
668
+ reject(err);
669
+ });
670
+ } else {
671
+ var errMsg = "Incompatible downloadDestination for Browser Environment, must be WritableStream";
672
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, errMsg);
673
+ reject(errMsg);
674
+ }
675
+ }
676
+ } else {
677
+ /*
678
+ * Non Browser environment :
679
+ * - stream data to file
680
+ * - fetch response headers and body (if exists)
681
+ * - return in case of error or after stream finish
682
+ *
683
+ * NOTE :
684
+ * superagent does not provide access to headers before pipe, therefore response is piped to
685
+ * file with temporary name, which is renamed to proper filename after Content-Disposition header is available
686
+ */
687
+
688
+ var tempFilename = _this2.downloadDestination + '/downloaded_file_' + Date.now() + '.txt'; // temporary filename
689
+ var stream = _fs2["default"].createWriteStream(tempFilename);
690
+ _assertClassBrand(_ApiClient_brand, _this2, _processDownloadedFile).call(_this2, response, stream, tempFilename, resolve, reject, returnType);
691
+ }
692
+ } else if (response.status == 302) {
693
+ /*
694
+ * Handling 302 Redirects
695
+ * - Reads X-Redirect-Token header from response and writes into Cookie header for redirected request
696
+ */
697
+ var _tempFilename = _this2.downloadDestination + '/downloaded_file_' + Date.now() + '.txt'; // temporary filename
698
+ var context = _this2;
699
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).INFO, null, "Redirecting to :", response.headers.location);
700
+ var redirectRequest = (0, _superagent["default"])(httpMethod, response.headers.location);
701
+ redirectRequest.set(request.header);
702
+ if (response.headers.hasOwnProperty("x-redirect-token")) {
703
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).INFO, null, "Writing X-Redirect-Token into Cookie");
704
+ redirectRequest.set("Cookie", response.headers["x-redirect-token"]);
705
+ }
706
+ redirectRequest.redirects(0);
707
+ redirectRequest.withCredentials(_this2.withCredentials);
708
+ redirectRequest.buffer(false);
709
+ var redirectedStream = _fs2["default"].createWriteStream(_tempFilename);
710
+ redirectRequest.pipe(redirectedStream);
711
+ redirectRequest.on('response', function (redirectResponse) {
712
+ _assertClassBrand(_ApiClient_brand, context, _log).call(context, _classPrivateFieldGet(_LOG_LEVEL, context).INFO, null, "Received response after redirection :", redirectResponse.status);
713
+ _assertClassBrand(_ApiClient_brand, context, _processDownloadedFile).call(context, redirectResponse, redirectedStream, _tempFilename, resolve, reject, returnType);
570
714
  });
571
- } catch (err) {
572
- _classPrivateMethodGet(_this2, _log, _log2).call(_this2, _classPrivateFieldGet(_this2, _LOG_LEVEL).ERROR, null, "Error :", err);
573
- reject(err);
715
+ } else {
716
+ _assertClassBrand(_ApiClient_brand, _this2, _handleApiResponseForPromise).call(_this2, response, path, queryParams, returnType, resolve, reject);
574
717
  }
575
718
  }
576
719
  });
@@ -743,26 +886,35 @@ var ApiClient = /*#__PURE__*/function () {
743
886
  }
744
887
  }
745
888
  }]);
746
- return ApiClient;
747
889
  }();
748
890
  /**
749
891
  * The default API client implementation.
750
892
  * @type {ApiClient}
751
893
  * @memberOf ApiClient
752
894
  */
753
- exports.ApiClient = ApiClient;
754
- function _isJsonMime2(contentType) {
895
+ _ApiClient = ApiClient;
896
+ function _isJsonMime(contentType) {
755
897
  return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i));
756
898
  }
757
- function _jsonPreferredMime2(contentTypes) {
899
+ /*
900
+ * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.
901
+ * @param {Array.<String>} contentTypes
902
+ * @returns {String} The chosen content type, preferring JSON.
903
+ */
904
+ function _jsonPreferredMime(contentTypes) {
758
905
  for (var i = 0; i < contentTypes.length; i++) {
759
- if (_classPrivateMethodGet(this, _isJsonMime, _isJsonMime2).call(this, contentTypes[i])) {
906
+ if (_assertClassBrand(_ApiClient_brand, this, _isJsonMime).call(this, contentTypes[i])) {
760
907
  return contentTypes[i];
761
908
  }
762
909
  }
763
910
  return contentTypes[0];
764
911
  }
765
- function _isFileParam2(param) {
912
+ /*
913
+ * Checks whether the given parameter value represents file-like content.
914
+ * @param param The parameter to check.
915
+ * @returns {Boolean} <code>true</code> if <code>param</code> represents a file.
916
+ */
917
+ function _isFileParam(param) {
766
918
  // fs.ReadStream in Node.js and Electron (but not in runtime like browserify)
767
919
  if (typeof require === 'function') {
768
920
  var _fs;
@@ -780,7 +932,7 @@ function _isFileParam2(param) {
780
932
  }
781
933
 
782
934
  // Blob in browser
783
- if (typeof Blob === 'function' && param instanceof Blob) {
935
+ if (typeof _buffer.Blob === 'function' && param instanceof _buffer.Blob) {
784
936
  return true;
785
937
  }
786
938
 
@@ -790,12 +942,22 @@ function _isFileParam2(param) {
790
942
  }
791
943
  return false;
792
944
  }
793
- function _normalizeParams2(params) {
945
+ /*
946
+ * Normalizes parameter values:
947
+ * <ul>
948
+ * <li>remove nils</li>
949
+ * <li>keep files and arrays</li>
950
+ * <li>format to string with `paramToString` for other cases</li>
951
+ * </ul>
952
+ * @param {Object.<String, Object>} params The parameters as object properties.
953
+ * @returns {Object.<String, Object>} normalized parameters.
954
+ */
955
+ function _normalizeParams(params) {
794
956
  var newParams = {};
795
957
  for (var key in params) {
796
958
  if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) {
797
959
  var value = params[key];
798
- if (_classPrivateMethodGet(this, _isFileParam, _isFileParam2).call(this, value) || Array.isArray(value)) {
960
+ if (_assertClassBrand(_ApiClient_brand, this, _isFileParam).call(this, value) || Array.isArray(value)) {
799
961
  newParams[key] = value;
800
962
  } else {
801
963
  newParams[key] = this.paramToString(value);
@@ -804,7 +966,7 @@ function _normalizeParams2(params) {
804
966
  }
805
967
  return newParams;
806
968
  }
807
- function _applyAuthToRequest2(request, authNames) {
969
+ function _applyAuthToRequest(request, authNames) {
808
970
  var _this3 = this;
809
971
  authNames.forEach(function (authName) {
810
972
  var auth = _this3.authentications[authName];
@@ -815,7 +977,7 @@ function _applyAuthToRequest2(request, authNames) {
815
977
  } else if (_this3.username || _this3.password) {
816
978
  request.auth(_this3.username || '', _this3.password || '');
817
979
  }
818
- _classPrivateMethodGet(_this3, _log, _log2).call(_this3, _classPrivateFieldGet(_this3, _LOG_LEVEL).DEBUG, null, "Basic Auth applied to request");
980
+ _assertClassBrand(_ApiClient_brand, _this3, _log).call(_this3, _classPrivateFieldGet(_LOG_LEVEL, _this3).DEBUG, null, "Basic Auth applied to request");
819
981
  break;
820
982
  case 'apiKey':
821
983
  if (auth.apiKey) {
@@ -831,7 +993,7 @@ function _applyAuthToRequest2(request, authNames) {
831
993
  request.query(data);
832
994
  }
833
995
  }
834
- _classPrivateMethodGet(_this3, _log, _log2).call(_this3, _classPrivateFieldGet(_this3, _LOG_LEVEL).DEBUG, null, "apiKey applied to request");
996
+ _assertClassBrand(_ApiClient_brand, _this3, _log).call(_this3, _classPrivateFieldGet(_LOG_LEVEL, _this3).DEBUG, null, "apiKey applied to request");
835
997
  break;
836
998
  case 'oauth2':
837
999
  if (auth.accessToken) {
@@ -839,19 +1001,57 @@ function _applyAuthToRequest2(request, authNames) {
839
1001
  'Authorization': 'Bearer ' + auth.accessToken
840
1002
  });
841
1003
  }
842
- _classPrivateMethodGet(_this3, _log, _log2).call(_this3, _classPrivateFieldGet(_this3, _LOG_LEVEL).DEBUG, null, "oauth2 applied to request");
1004
+ _assertClassBrand(_ApiClient_brand, _this3, _log).call(_this3, _classPrivateFieldGet(_LOG_LEVEL, _this3).DEBUG, null, "oauth2 applied to request");
843
1005
  break;
844
1006
  default:
845
- _classPrivateMethodGet(_this3, _log, _log2).call(_this3, _classPrivateFieldGet(_this3, _LOG_LEVEL).ERROR, null, "Unknown authentication type:", auth.type);
1007
+ _assertClassBrand(_ApiClient_brand, _this3, _log).call(_this3, _classPrivateFieldGet(_LOG_LEVEL, _this3).ERROR, null, "Unknown authentication type:", auth.type);
846
1008
  throw new Error('Unknown authentication type: ' + auth.type);
847
1009
  }
848
1010
  });
849
1011
  }
850
- function _deserialize2(response, returnType) {
1012
+ /**
1013
+ * Wraps errors in generic response format.
1014
+ * @param {Object} error object encountered during request.
1015
+ * @returns an error object with wrapped response within error.data .
1016
+ */
1017
+ function _wrapErrorInResponse(error) {
1018
+ var response = {
1019
+ data: {},
1020
+ metadata: {}
1021
+ };
1022
+ response.data.status = error.status;
1023
+ response.data.message = error.message;
1024
+ }
1025
+ /**
1026
+ * Deserializes an HTTP response body into a value of the specified type.
1027
+ * @param {Object} response A SuperAgent response object.
1028
+ * @param {(String|Array.<String>|Object.<String, Object>|Function)} returnType The type to return. Pass a string for simple types
1029
+ * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To
1030
+ * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:
1031
+ * all properties on <code>data<code> will be converted to this type.
1032
+ * @returns A value of the specified type.
1033
+ */
1034
+ function _deserialize(response, returnType) {
851
1035
  if (response == null || returnType == null || response.status == 204) {
852
1036
  return null;
853
1037
  }
854
1038
 
1039
+ // Handle text response
1040
+ if (response.headers && ['text/event-stream', 'text/html', 'text/xml', 'text/csv', 'text/javascript', 'text/markdown', 'text/vcard'].includes(response.headers['content-type'])) {
1041
+ var data = new returnType();
1042
+ data.data = new _buffer.Blob([response.text], {
1043
+ type: response.headers['content-type']
1044
+ });
1045
+ var flag = new _Flag["default"]();
1046
+ flag.name = "hasError";
1047
+ flag.value = false;
1048
+ var flags = [flag];
1049
+ var metadata = new _ApiResponseMetadata["default"]();
1050
+ metadata.flags = flags;
1051
+ data.metadata = metadata;
1052
+ return data;
1053
+ }
1054
+
855
1055
  // Rely on SuperAgent for parsing response body.
856
1056
  // See http://visionmedia.github.io/superagent/#parsing-response-bodies
857
1057
  var data = response.body;
@@ -859,9 +1059,15 @@ function _deserialize2(response, returnType) {
859
1059
  // SuperAgent does not always produce a body; use the unparsed response as a fallback
860
1060
  data = response.text;
861
1061
  }
862
- return ApiClient.convertToType(data, returnType);
1062
+ return _ApiClient.convertToType(data, returnType);
863
1063
  }
864
- function _paginateIfNeeded2(data, path, queryParams) {
1064
+ /**
1065
+ * Set pagination data if response is a Paginable object
1066
+ * @param {Object} data The response data already passed through deserialize
1067
+ * @param {String} path The path given to callApi method
1068
+ * @param {Object.<String, Object>} queryParams The queryParams given to callApi method
1069
+ */
1070
+ function _paginateIfNeeded(data, path, queryParams) {
865
1071
  // If response is not a Paginable instance, nothing to do
866
1072
  if (!(data instanceof _Paginable["default"])) {
867
1073
  return;
@@ -876,15 +1082,16 @@ function _paginateIfNeeded2(data, path, queryParams) {
876
1082
  // current ApiClient instance
877
1083
  page, resultsPerPage);
878
1084
  }
879
- function _getValidTimeout2(timeout, defaultTimeout) {
1085
+ function _getValidTimeout(timeout, defaultTimeout) {
880
1086
  if (timeout <= 0) {
881
1087
  timeout = defaultTimeout;
882
- } else if (timeout > _classPrivateFieldGet(this, _defaultMaxTimeout)) {
883
- timeout = _classPrivateFieldGet(this, _defaultMaxTimeout);
1088
+ } else if (timeout > _classPrivateFieldGet(_defaultMaxTimeout, this)) {
1089
+ timeout = _classPrivateFieldGet(_defaultMaxTimeout, this);
884
1090
  }
885
1091
  return timeout;
886
1092
  }
887
- function _updateCookies2(response) {
1093
+ // If enabled, update cookie information to reuse in subsequent requests for a valid response
1094
+ function _updateCookies(response) {
888
1095
  if (response.hasOwnProperty("headers") && response.headers.hasOwnProperty("set-cookie")) {
889
1096
  var finalCookie = "";
890
1097
  var cookieList = response.headers["set-cookie"];
@@ -911,61 +1118,48 @@ function _updateCookies2(response) {
911
1118
  finalCookie = finalCookie.substr(0, finalCookie.length - 1);
912
1119
  }
913
1120
  }
914
- _classPrivateFieldSet(this, _cookie, finalCookie);
915
- _classPrivateMethodGet(this, _log, _log2).call(this, _classPrivateFieldGet(this, _LOG_LEVEL).DEBUG, null, "Retained cookie :", finalCookie);
1121
+ _classPrivateFieldSet(_cookie, this, finalCookie);
1122
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, "Retained cookie :", finalCookie);
916
1123
  } else {
917
- _classPrivateFieldSet(this, _cookie, null);
1124
+ _classPrivateFieldSet(_cookie, this, null);
918
1125
  }
919
1126
  }
920
- function _attachCookies2(request) {
921
- if (_classPrivateFieldGet(this, _cookie) != null) {
922
- request.set(_classPrivateMethodGet(this, _normalizeParams, _normalizeParams2).call(this, {
923
- 'Cookie': _classPrivateFieldGet(this, _cookie)
1127
+ // If enabled, attach saved cookies to request
1128
+ function _attachCookies(request) {
1129
+ if (_classPrivateFieldGet(_cookie, this) != null) {
1130
+ request.set(_assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, {
1131
+ 'Cookie': _classPrivateFieldGet(_cookie, this)
924
1132
  }));
925
1133
  }
926
1134
  }
927
- function _log2(level, mapper) {
1135
+ function _log(level, mapper) {
928
1136
  for (var _len = arguments.length, messages = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
929
1137
  messages[_key - 2] = arguments[_key];
930
1138
  }
931
1139
  // Set default log level to INFO
932
1140
  if (_typeof(level) !== "object" || !("key" in level) || !("value" in level) || _typeof(level["value"]) !== "symbol") {
933
- level = _classPrivateFieldGet(this, _LOG_LEVEL).INFO;
1141
+ level = _classPrivateFieldGet(_LOG_LEVEL, this).INFO;
934
1142
  }
935
- if (!_classPrivateMethodGet(this, _skipLogging, _skipLogging2).call(this, level)) {
1143
+ if (!_assertClassBrand(_ApiClient_brand, this, _skipLogging).call(this, level)) {
936
1144
  // Preprocess message to prefix with timestamp and log level
937
1145
  messages = messages.map(function (message) {
938
1146
  return typeof message === "string" ? message : mapper ? mapper(message) : JSON.stringify(message);
939
1147
  });
940
1148
  var message = messages.join(' ');
941
- message = _classPrivateMethodGet(this, _getLocalDateTime, _getLocalDateTime2).call(this) + ' ' + level.key + ' - ' + message;
942
- if (typeof _classPrivateFieldGet(this, _logger) !== "undefined" && _classPrivateFieldGet(this, _logger) !== null && typeof _classPrivateFieldGet(this, _logger).log === 'function') {
943
- _classPrivateFieldGet(this, _logger).log(message);
1149
+ message = new Date().toISOString() + ' ' + level.key + ' - ' + message;
1150
+ if (typeof _classPrivateFieldGet(_logger, this) !== "undefined" && _classPrivateFieldGet(_logger, this) !== null && typeof _classPrivateFieldGet(_logger, this).log === 'function') {
1151
+ _classPrivateFieldGet(_logger, this).log(message);
944
1152
  } else {
945
1153
  console.log(message);
946
1154
  }
947
1155
  }
948
1156
  }
949
- function _skipLogging2(level) {
1157
+ function _skipLogging(level) {
950
1158
  // Skip logging if log level is DEBUG but debug is not enabled.
951
- return !this.debug && level === _classPrivateFieldGet(this, _LOG_LEVEL).DEBUG;
952
- }
953
- function _getLocalDateTime2() {
954
- // Current epoch UTC time in milliseconds
955
- var epochTime = Date.now();
956
-
957
- // "getTimezoneOffset" returns the difference, in minutes, between a date as evaluated in the UTC time zone,
958
- // and the same date as evaluated in the local time zone.
959
- // if you are in timezone UTC-1, outputs 60
960
- // if you are in timezone UTC+3, outputs -180
961
- var timezoneOffsetInMinutes = new Date().getTimezoneOffset();
962
- var timezoneOffsetInMilliseconds = timezoneOffsetInMinutes * 60 * 1000;
963
-
964
- // Create a new date with adjusted epoch time based on timezone offset
965
- var date = new Date(epochTime - timezoneOffsetInMilliseconds);
966
- return date.toISOString().slice(0, 23);
1159
+ return !this.debug && level === _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG;
967
1160
  }
968
- function _flatten2(obj) {
1161
+ // A mapper function to flatten a simple non-nested (key:value) object to string
1162
+ function _flatten(obj) {
969
1163
  if (_typeof(obj) !== "object") {
970
1164
  return obj;
971
1165
  }
@@ -977,4 +1171,92 @@ function _flatten2(obj) {
977
1171
  }
978
1172
  return output === '\n' ? obj : output;
979
1173
  }
1174
+ // handle and deserialize received response
1175
+ function _handleApiResponseForPromise(response, path, queryParams, returnType, resolve, reject) {
1176
+ try {
1177
+ var data = _assertClassBrand(_ApiClient_brand, this, _deserialize).call(this, response, returnType);
1178
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, "Response Status :", response.status);
1179
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, _assertClassBrand(_ApiClient_brand, this, _flatten), "Response Headers :", response.headers);
1180
+ _assertClassBrand(_ApiClient_brand, this, _updateCookies).call(this, response || {});
1181
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, "Response Body :", data);
1182
+ if (response.status == 204 && data == null) {
1183
+ resolve({
1184
+ data: data,
1185
+ response: response
1186
+ });
1187
+ } else if (response.ok && data != null) {
1188
+ this.addEtagToReservedMap(response, data);
1189
+ _assertClassBrand(_ApiClient_brand, this, _paginateIfNeeded).call(this, data, path, queryParams);
1190
+ resolve({
1191
+ data: data,
1192
+ response: response
1193
+ });
1194
+ } else {
1195
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, data);
1196
+ reject(_objectSpread(_objectSpread({}, response.error), {}, {
1197
+ data: data
1198
+ }));
1199
+ }
1200
+ } catch (err) {
1201
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, "Caught error while processing response!");
1202
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, err);
1203
+ err.data = _assertClassBrand(_ApiClient_brand, this, _wrapErrorInResponse).call(this, err);
1204
+ reject(err);
1205
+ }
1206
+ }
1207
+ function _processDownloadedFile(response, stream, tempFilename, resolve, reject, returnType) {
1208
+ var _this4 = this;
1209
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, "Streaming response to : ", tempFilename);
1210
+ try {
1211
+ response.on('data', function (chunk) {
1212
+ stream.write(chunk);
1213
+ });
1214
+ } catch (err) {
1215
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, "Issue while downloading file", err);
1216
+ }
1217
+ var data = new returnType();
1218
+ // Fetch filename
1219
+ var filename = "";
1220
+ if (typeof response.headers['content-disposition'] !== 'undefined' && response.headers['content-disposition'] !== null) {
1221
+ var match = response.headers['content-disposition'].match(/*#__PURE__*/_wrapRegExp(/.*filename="(.*)".*/, {
1222
+ filename: 1
1223
+ }));
1224
+ var filepath = _path["default"].parse(match.groups['filename']);
1225
+ filename = this.downloadDestination + '/' + filepath.name + '_' + Date.now() + filepath.ext;
1226
+ data.data = {
1227
+ "path": _path["default"].parse(filename),
1228
+ $objectType: "Path"
1229
+ };
1230
+ var flag = new _Flag["default"]();
1231
+ flag.name = "hasError";
1232
+ flag.value = false;
1233
+ var flags = [flag];
1234
+ var metadata = new _ApiResponseMetadata["default"]();
1235
+ metadata.flags = flags;
1236
+ data.metadata = metadata;
1237
+ }
1238
+ response.on('end', function () {
1239
+ _assertClassBrand(_ApiClient_brand, _this4, _log).call(_this4, _classPrivateFieldGet(_LOG_LEVEL, _this4).INFO, null, "Finished streaming response");
1240
+ if (filename.length !== 0) {
1241
+ _assertClassBrand(_ApiClient_brand, _this4, _log).call(_this4, _classPrivateFieldGet(_LOG_LEVEL, _this4).INFO, null, "Content-Disposition header found [", filename, "] is final filename");
1242
+ stream.close();
1243
+ _fs2["default"].renameSync(tempFilename, filename);
1244
+ resolve({
1245
+ data: data,
1246
+ response: response
1247
+ });
1248
+ } else {
1249
+ _assertClassBrand(_ApiClient_brand, _this4, _log).call(_this4, _classPrivateFieldGet(_LOG_LEVEL, _this4).ERROR, null, "Content-Disposition header not found [", tempFilename, "] is final filename");
1250
+ resolve({
1251
+ data: data,
1252
+ response: response
1253
+ });
1254
+ }
1255
+ });
1256
+ response.on('error', function (err) {
1257
+ _assertClassBrand(_ApiClient_brand, _this4, _log).call(_this4, _classPrivateFieldGet(_LOG_LEVEL, _this4).ERROR, null, "Caught the following error :", err);
1258
+ error.data = _assertClassBrand(_ApiClient_brand, _this4, _wrapErrorInResponse).call(_this4, error);
1259
+ reject(err);
1260
+ });
1261
+ }
980
1262
  ApiClient.instance = new ApiClient();